From d2a4d6d9e0ab112fe812bf91d61c50e9dc1b2e3d Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sat, 26 Oct 2024 12:58:07 -0400 Subject: [PATCH] fix lint errors in home.vue / index.listenbrainz.vue --- locales/index.d.ts | 36 ++++++ .../backend/src/models/json-schema/user.ts | 2 +- packages/frontend/src/pages/user/home.vue | 16 +-- .../src/pages/user/index.listenbrainz.vue | 116 +++++++++--------- packages/misskey-js/src/autogen/types.ts | 2 +- 5 files changed, 101 insertions(+), 71 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 535e88f7c7..d1cb1f97ea 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5353,6 +5353,10 @@ export interface Locale extends ILocale { * オンにすると、このお知らせは通知されず、既読にする必要もなくなります。 */ "silenceDescription": string; + /** + * New + */ + "new": string; }; "_initialAccountSetting": { /** @@ -8442,6 +8446,10 @@ export interface Locale extends ILocale { * アプリケーションにアクセス許可を与えるには、ログインが必要です。 */ "pleaseLogin": string; + /** + * Allowed + */ + "allowed": string; }; "_antennaSources": { /** @@ -10603,6 +10611,30 @@ export interface Locale extends ILocale { * Mutuals */ "mutuals": string; + /** + * Private account + */ + "isLocked": string; + /** + * Administrator + */ + "isAdmin": string; + /** + * Bot user + */ + "isBot": string; + /** + * Open + */ + "open": string; + /** + * Destination address + */ + "emailDestination": string; + /** + * Date + */ + "date": string; /** * Quoted. */ @@ -10964,6 +10996,10 @@ export interface Locale extends ILocale { * Blocking you */ "blockingYou": string; + /** + * Show warning when opening external URLs + */ + "warnExternalUrl": string; "_mfm": { /** * This is not a widespread feature, it may not display properly on most other fedi software, including other Misskey forks diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index fdbd5fa8e2..d5e847cc40 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -300,7 +300,7 @@ export const packedUserDetailedNotMeOnlySchema = { nullable: true, optional: false, example: '2018-03-12', }, - ListenBrainz: { + listenbrainz: { type: 'string', nullable: true, optional: false, diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue index d37bf58164..f7dd28c80a 100644 --- a/packages/frontend/src/pages/user/home.vue +++ b/packages/frontend/src/pages/user/home.vue @@ -215,9 +215,9 @@ import { getStaticImageUrl } from '@/scripts/media-proxy.js'; import { infoImageUrl } from '@/instance.js'; const MkNote = defineAsyncComponent(() => - (defaultStore.state.noteDesign === 'misskey') ? import('@/components/MkNote.vue') : - (defaultStore.state.noteDesign === 'sharkey') ? import('@/components/SkNote.vue') : - null + defaultStore.state.noteDesign === 'sharkey' + ? import('@/components/SkNote.vue') + : import('@/components/MkNote.vue'), ); function calcAge(birthdate: string): number { @@ -237,7 +237,7 @@ function calcAge(birthdate: string): number { const XFiles = defineAsyncComponent(() => import('./index.files.vue')); const XActivity = defineAsyncComponent(() => import('./index.activity.vue')); -const XListenBrainz = defineAsyncComponent(() => import("./index.listenbrainz.vue")); +const XListenBrainz = defineAsyncComponent(() => import('./index.listenbrainz.vue')); //const XTimeline = defineAsyncComponent(() => import('./index.timeline.vue')); const props = withDefaults(defineProps<{ @@ -269,7 +269,7 @@ if (props.user.listenbrainz) { const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, { method: 'GET', headers: { - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', }, }); const data = await response.json(); @@ -286,11 +286,11 @@ const background = computed(() => { if (props.user.backgroundUrl == null) return {}; if (defaultStore.state.disableShowingAnimatedImages) { return { - '--backgroundImageStatic': `url('${getStaticImageUrl(props.user.backgroundUrl)}')` + '--backgroundImageStatic': `url('${getStaticImageUrl(props.user.backgroundUrl)}')`, }; } else { return { - '--backgroundImageStatic': `url('${props.user.backgroundUrl}')` + '--backgroundImageStatic': `url('${props.user.backgroundUrl}')`, }; } }); @@ -303,7 +303,7 @@ const pagination = { endpoint: 'users/featured-notes' as const, limit: 10, params: computed(() => ({ - userId: props.user.id + userId: props.user.id, })), }; diff --git a/packages/frontend/src/pages/user/index.listenbrainz.vue b/packages/frontend/src/pages/user/index.listenbrainz.vue index 296f5436e3..1c9ef8dd22 100644 --- a/packages/frontend/src/pages/user/index.listenbrainz.vue +++ b/packages/frontend/src/pages/user/index.listenbrainz.vue @@ -4,42 +4,39 @@ SPDX-License-Identifier: AGPL-3.0-only --> @@ -121,8 +116,7 @@ if (props.user.listenbrainz) { } .text-sm { font-size: 0.875rem; - margin: 0; - margin-bottom: 0.3rem; + margin: 0 0 0.3rem; } .font-bold { font-weight: 700; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index d41e7ab1c9..072c5c761d 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3939,7 +3939,7 @@ export type components = { /** @example 2018-03-12 */ birthday: string | null; /** @example Steve */ - ListenBrainz: string | null; + listenbrainz: string | null; /** @example ja-JP */ lang: string | null; fields: {