From 8bb0adf70044b5315293eae6927c54cde0185f6e Mon Sep 17 00:00:00 2001 From: upsiflu Date: Mon, 24 Feb 2025 15:17:18 +0100 Subject: [PATCH] chore(format): [WIP] run eslint and fix most stylistic/formatting errors --- front/.eslintrc.cjs | 3 +- front/package.json | 1 + front/src/App.vue | 3 +- front/src/components/About.vue | 8 +- front/src/components/Queue.vue | 19 +- front/src/components/album/Card.vue | 5 +- front/src/components/album/Widget.vue | 3 +- front/src/components/artist/Card.vue | 3 +- front/src/components/artist/Widget.vue | 3 +- .../components/audio/ArtistCreditLabel.vue | 2 +- front/src/components/audio/ChannelCard.vue | 9 +- front/src/components/audio/ChannelsWidget.vue | 7 +- front/src/components/audio/Search.vue | 1 - front/src/components/audio/track/Row.vue | 93 ++-- front/src/components/audio/track/Widget.vue | 12 +- front/src/components/auth/SignupForm.vue | 15 +- front/src/components/channels/AlbumModal.vue | 4 +- front/src/components/channels/AlbumSelect.vue | 1 - front/src/components/channels/UploadForm.vue | 44 +- front/src/components/channels/UploadModal.vue | 14 +- front/src/components/favorites/List.vue | 45 +- front/src/components/library/AlbumBase.vue | 204 ++++---- front/src/components/library/Albums.vue | 2 +- front/src/components/library/ArtistBase.vue | 43 +- front/src/components/library/EditForm.vue | 3 +- front/src/components/library/TrackBase.vue | 473 +++++++++--------- front/src/components/library/TrackDetail.vue | 51 +- .../components/manage/library/AlbumsTable.vue | 1 - front/src/components/playlists/CardList.vue | 16 +- front/src/components/tags/List.vue | 2 +- front/src/components/ui/Activity.vue | 13 +- front/src/components/ui/Button.vue | 9 +- front/src/components/ui/Modal.vue | 18 +- front/src/components/ui/Pagination.vue | 22 +- front/src/components/ui/Pill.vue | 15 +- front/src/components/ui/Pills.vue | 44 +- front/src/components/ui/Popover.vue | 8 +- front/src/components/ui/SanitizedHtml.vue | 12 +- front/src/components/ui/Slider.vue | 4 +- front/src/components/ui/Tabs.vue | 3 +- front/src/components/ui/Textarea.vue | 20 +- front/src/components/ui/button/Play.vue | 2 +- front/src/composables/alignment.ts | 3 +- front/src/composables/useWebSocketHandler.ts | 2 +- front/src/composables/width.ts | 6 +- front/src/main.ts | 3 + front/src/ui/components/UploadList.vue | 8 +- front/src/ui/components/UploadModal.vue | 14 +- front/src/ui/components/UserMenu.vue | 3 +- front/src/views/auth/ProfileOverview.vue | 15 +- front/src/views/channels/DetailBase.vue | 75 ++- front/src/views/channels/List.vue | 15 +- front/src/views/content/Home.vue | 2 +- front/src/views/content/libraries/Home.vue | 2 +- front/src/views/content/upload/Home.vue | 1 + front/src/views/playlists/List.vue | 66 +-- front/yarn.lock | 16 +- 57 files changed, 818 insertions(+), 673 deletions(-) diff --git a/front/.eslintrc.cjs b/front/.eslintrc.cjs index bf893b886..d368a5c6e 100644 --- a/front/.eslintrc.cjs +++ b/front/.eslintrc.cjs @@ -6,8 +6,7 @@ module.exports = { extends: [ 'plugin:@intlify/vue-i18n/recommended', 'plugin:vue/vue3-recommended', - '@vue/typescript/recommended', - '@vue/standard' + '@vue/typescript/recommended' ], globals: { SharedArrayBuffer: 'readonly', diff --git a/front/package.json b/front/package.json index c74c5a4be..93ca73245 100644 --- a/front/package.json +++ b/front/package.json @@ -60,6 +60,7 @@ "universal-cookie": "4.0.4", "vite-plugin-pwa": "0.14.4", "vue": "3.5.13", + "vue-dompurify-html": "5.2.0", "vue-gettext": "2.1.12", "vue-i18n": "9.9.1", "vue-router": "4.2.5", diff --git a/front/src/App.vue b/front/src/App.vue index eb011e685..7832ed209 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -21,6 +21,7 @@ import ShortcutsModal from '~/ui/modals/Shortcuts.vue' import LanguagesModal from '~/ui/modals/Language.vue' import SearchModal from '~/ui/modals/Search.vue' import UploadModal from '~/ui/modals/Upload.vue' +import Loader from '~/components/ui/Loader.vue' // Fake content onMounted(async () => { @@ -93,7 +94,7 @@ store.dispatch('auth/fetchUser') diff --git a/front/src/components/About.vue b/front/src/components/About.vue index 79b78bd3a..7dbfbcacb 100644 --- a/front/src/components/About.vue +++ b/front/src/components/About.vue @@ -147,7 +147,7 @@ const federationEnabled = computed(() => {

@@ -219,14 +219,14 @@ const federationEnabled = computed(() => { {{ stats.users?.toLocaleString(store.state.ui.momentLocale) }}
- {{ stats.users ? t('components.About.stat.activeUsers', stats.users) : "—" }} + {{ stats.users ? t('components.About.stat.activeUsers', stats.users) : "" }}

- {{ stats.hours ? stats.hours.toLocaleString(store.state.ui.momentLocale) : "—" }} + {{ stats.hours ? stats.hours.toLocaleString(store.state.ui.momentLocale) : "" }}
- {{ stats.hours ? t('components.About.stat.hoursOfMusic', stats.hours) : "—" }} + {{ stats.hours ? t('components.About.stat.hoursOfMusic', stats.hours) : "" }}
diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 479125271..2426fd804 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -246,8 +246,8 @@ if (!isWebGLSupported) { @click="enter" />