~cytrogen/masto-fe

adf075d19f1aaaa1ca017a067be8e1afa991c4d9 — Zoë Bijl 6 months ago 8a26776
[bugfix] Fix linter issues (#85)

- [x] .js
- [x] .json
- [x] .md
- [x] .scss
- [x] .yml

Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/85
Co-authored-by: Zoë Bijl <code@moiety.me>
Co-committed-by: Zoë Bijl <code@moiety.me>
M .woodpecker/lint.yaml => .woodpecker/lint.yaml +4 -4
@@ 2,22 2,22 @@ steps:
  lint:
    image: node:22-alpine
    pull: true
    

    # https://woodpecker-ci.org/docs/usage/volumes
    volumes:
      - /woodpecker/masto-fe-standalone/node_modules:/woodpecker/src/codeberg.org/superseriousbusiness/masto-fe-standalone/node_modules
      - /woodpecker/masto-fe-standalone/.eslintcache:/woodpecker/src/codeberg.org/superseriousbusiness/masto-fe-standalone/.eslintcache
    

    # https://woodpecker-ci.org/docs/administration/configuration/backends/docker#run-user
    backend_options:
      docker:
        user: 1000:1000
    

    # https://woodpecker-ci.org/docs/usage/workflow-syntax#commands
    commands:
      - yarn
      - yarn lint:js
    

    # https://woodpecker-ci.org/docs/usage/workflow-syntax#when---conditional-execution
    when:
      - event: pull_request

M app/javascript/flavours/glitch/actions/server.js => app/javascript/flavours/glitch/actions/server.js +7 -4
@@ 21,17 21,20 @@ export const fetchServer = () => (dispatch, getState) => {

  dispatch(fetchServerRequest());

  /* global data */
  try {
    api(getState)
      .get('/api/v2/instance').then({ data })
        if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
        dispatch(fetchServerSuccess(data));
      .get('/api/v2/instance').then({ data }).catch(error => {
        console.error(error);
      });
    if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
    dispatch(fetchServerSuccess(data));
  } catch (e) {
    api(getState)
      .get('/api/v1/instance').then(({ data }) => {
        if (data.contact_account) dispatch(importFetchedAccount(data.contact_account));
        dispatch(fetchServerSuccess(data));
    }).catch(err => dispatch(fetchServerFail(err)));
      }).catch(err => dispatch(fetchServerFail(err)));
  }
};


M app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx => app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx +1 -2
@@ 24,9 24,8 @@ import CharacterCounter from 'flavours/glitch/features/compose/components/charac
import UploadProgress from 'flavours/glitch/features/compose/components/upload_progress';
import { Tesseract as fetchTesseract } from 'flavours/glitch/features/ui/util/async-components';
import Video, { getPointerPosition } from 'flavours/glitch/features/video';
import { me } from 'flavours/glitch/initial_state';
import { me , maxMediaDescChars } from 'flavours/glitch/initial_state';
import { assetHost } from 'flavours/glitch/utils/config';
import { maxMediaDescChars } from 'flavours/glitch/initial_state';

import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose';


M app/javascript/flavours/glitch/styles/login.scss => app/javascript/flavours/glitch/styles/login.scss +3 -3
@@ 5,7 5,7 @@
@import 'basics';

body {
    font-family: ui-rounded, 'mastodon-font-sans-serif', sans-serif;
    font-family: ui-rounded, mastodon-font-sans-serif, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}


@@ 88,7 88,7 @@ button {

input[type='text'] {
    display: block;
    marhing: 0;
    margin: 0;
    padding: 15px;
    border: 1px solid lighten(#282c37, 7%);
    border-radius: 4px;


@@ 102,7 102,7 @@ input[type='text'] {
}

.content {
    padding: 20px 15px 20px;
    padding: 20px 15px;
    border-radius: 4px;
    border: 1px solid lighten(#39404f, 7%);
    color: #fff;

M app/javascript/mastodon/actions/server.js => app/javascript/mastodon/actions/server.js +7 -4
@@ 17,17 17,20 @@ export const fetchServer = () => (dispatch, getState) => {

  dispatch(fetchServerRequest());

  /* global data */
  try {
    api(getState)
      .get('/api/v2/instance').then({ data });
        if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
        dispatch(fetchServerSuccess(data));
      .get('/api/v2/instance').then({ data }).catch(error => {
        console.error(error);
      });
    if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
    dispatch(fetchServerSuccess(data));
  } catch (e) {
    api(getState)
      .get('/api/v1/instance').then(({ data }) => {
        if (data.contact_account) dispatch(importFetchedAccount(data.contact_account));
        dispatch(fetchServerSuccess(data));
    }).catch(err => dispatch(fetchServerFail(err)));
      }).catch(err => dispatch(fetchServerFail(err)));
  }
};


M app/javascript/mastodon/features/ui/components/focal_point_modal.jsx => app/javascript/mastodon/features/ui/components/focal_point_modal.jsx +1 -2
@@ 23,9 23,8 @@ import Audio from 'mastodon/features/audio';
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
import UploadProgress from 'mastodon/features/compose/components/upload_progress';
import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components';
import { me } from 'mastodon/initial_state';
import { me , maxMediaDescChars } from 'mastodon/initial_state';
import { assetHost } from 'mastodon/utils/config';
import { maxMediaDescChars } from 'mastodon/initial_state';

import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose';
import Video, { getPointerPosition } from '../../video';