From 7436e0da18bbf2284ad95a1094141653a4188783 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 29 Oct 2023 16:09:20 +0900 Subject: [PATCH] lint fixes --- .../src/components/MkDateSeparatedList.vue | 2 ++ packages/frontend/src/components/MkDialog.vue | 1 + packages/frontend/src/components/MkDrive.vue | 1 + .../src/components/MkFoldableSection.vue | 1 + packages/frontend/src/components/MkMenu.vue | 2 ++ .../src/components/MkNoteDetailed.vue | 2 ++ .../frontend/src/components/MkPagination.vue | 1 + .../src/components/MkPostFormAttaches.vue | 1 + .../components/global/MkPageHeader.tabs.vue | 3 +++ packages/frontend/src/pages/admin/ads.vue | 22 +++++++++++++------ packages/frontend/src/pages/instance-info.vue | 22 ++++++++++--------- .../frontend/src/pages/settings/general.vue | 3 +++ .../src/pages/settings/webhook.edit.vue | 1 + .../src/scripts/get-drive-file-menu.ts | 1 + packages/frontend/src/scripts/scroll.ts | 2 ++ 15 files changed, 48 insertions(+), 17 deletions(-) diff --git a/packages/frontend/src/components/MkDateSeparatedList.vue b/packages/frontend/src/components/MkDateSeparatedList.vue index 66d4b542be..e5bdd3781b 100644 --- a/packages/frontend/src/components/MkDateSeparatedList.vue +++ b/packages/frontend/src/components/MkDateSeparatedList.vue @@ -42,6 +42,7 @@ export default defineComponent({ setup(props, { slots, expose }) { const $style = useCssModule(); // カスタムレンダラなので使っても大丈夫 + function getDateText(time: string) { const date = new Date(time).getDate(); const month = new Date(time).getMonth() + 1; @@ -121,6 +122,7 @@ export default defineComponent({ el.style.top = `${el.offsetTop}px`; el.style.left = `${el.offsetLeft}px`; } + function onLeaveCanceled(el: HTMLElement) { el.style.top = ''; el.style.left = ''; diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue index a83c18c0b3..33757ccc83 100644 --- a/packages/frontend/src/components/MkDialog.vue +++ b/packages/frontend/src/components/MkDialog.vue @@ -160,6 +160,7 @@ async function ok() { function cancel() { done(true); } + /* function onBgClick() { if (props.cancelableByBgClick) cancel(); diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue index 648e4c4e3d..71bb4ecfef 100644 --- a/packages/frontend/src/components/MkDrive.vue +++ b/packages/frontend/src/components/MkDrive.vue @@ -505,6 +505,7 @@ function appendFile(file: Misskey.entities.DriveFile) { function appendFolder(folderToAppend: Misskey.entities.DriveFolder) { addFolder(folderToAppend); } + /* function prependFile(file: Misskey.entities.DriveFile) { addFile(file, true); diff --git a/packages/frontend/src/components/MkFoldableSection.vue b/packages/frontend/src/components/MkFoldableSection.vue index ed3cb0868b..1ffc95d944 100644 --- a/packages/frontend/src/components/MkFoldableSection.vue +++ b/packages/frontend/src/components/MkFoldableSection.vue @@ -84,6 +84,7 @@ onMounted(() => { return getParentBg(el.parentElement); } } + const rawBg = getParentBg(el.value); const _bg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg); _bg.setAlpha(0.85); diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 079f07ee47..9457bf385f 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -145,11 +145,13 @@ const onGlobalMousedown = (event: MouseEvent) => { }; let childCloseTimer: null | number = null; + function onItemMouseEnter(item) { childCloseTimer = window.setTimeout(() => { closeChild(); }, 300); } + function onItemMouseLeave(item) { if (childCloseTimer) window.clearTimeout(childCloseTimer); } diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index d17037f4f4..ce4fb79d4b 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -499,6 +499,7 @@ function blur() { } const repliesLoaded = ref(false); + function loadReplies() { repliesLoaded.value = true; os.api('notes/children', { @@ -510,6 +511,7 @@ function loadReplies() { } const conversationLoaded = ref(false); + function loadConversation() { conversationLoaded.value = true; os.api('notes/conversation', { diff --git a/packages/frontend/src/components/MkPagination.vue b/packages/frontend/src/components/MkPagination.vue index 5a87273386..80b469f632 100644 --- a/packages/frontend/src/components/MkPagination.vue +++ b/packages/frontend/src/components/MkPagination.vue @@ -87,6 +87,7 @@ function arrayToEntries(entities: MisskeyEntity[]): [string, MisskeyEntity][] { function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap { return new Map([...map, ...arrayToEntries(entities)]); } +