diff --git a/.woodpecker/lint.yaml b/.woodpecker/lint.yaml index ef0894315..bd9fd34f1 100644 --- a/.woodpecker/lint.yaml +++ b/.woodpecker/lint.yaml @@ -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 diff --git a/app/javascript/flavours/glitch/actions/server.js b/app/javascript/flavours/glitch/actions/server.js index 75509f1e2..eb4c572a9 100644 --- a/app/javascript/flavours/glitch/actions/server.js +++ b/app/javascript/flavours/glitch/actions/server.js @@ -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))); } }; diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx index f0a5f32e0..6298ec293 100644 --- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx @@ -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'; diff --git a/app/javascript/flavours/glitch/styles/login.scss b/app/javascript/flavours/glitch/styles/login.scss index f8848ebea..607160a65 100644 --- a/app/javascript/flavours/glitch/styles/login.scss +++ b/app/javascript/flavours/glitch/styles/login.scss @@ -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; diff --git a/app/javascript/mastodon/actions/server.js b/app/javascript/mastodon/actions/server.js index dedbbbccb..ddebaecfc 100644 --- a/app/javascript/mastodon/actions/server.js +++ b/app/javascript/mastodon/actions/server.js @@ -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))); } }; diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx index c6fe48493..b54118644 100644 --- a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx @@ -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';