Compare commits

...

2 commits

Author SHA1 Message Date
fly_mc
6e35b9378a lint 2024-11-23 21:55:07 +08:00
fly_mc
600a978f22 lint 2024-11-23 21:44:19 +08:00
2 changed files with 198 additions and 198 deletions

View file

@ -36,12 +36,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, watch, provide, shallowRef, ref, onMounted, onActivated } from 'vue';
import { scroll } from '@@/js/scroll.js';
import type { Tab } from '@/components/global/MkPageHeader.tabs.vue';
import type { MenuItem } from '@/types/menu.js';
import type { BasicTimelineType } from '@/timelines.js';
import MkTimeline from '@/components/MkTimeline.vue';
import MkInfo from '@/components/MkInfo.vue';
import MkPostForm from '@/components/MkPostForm.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { scroll } from '@@/js/scroll.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { defaultStore } from '@/store.js';
@ -51,10 +53,8 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import { antennasCache, userListsCache, favoritedChannelsCache } from '@/cache.js';
import { deviceKind } from '@/scripts/device-kind.js';
import { deepMerge } from '@/scripts/merge.js';
import type { MenuItem } from '@/types/menu.js';
import { miLocalStorage } from '@/local-storage.js';
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
import type { BasicTimelineType } from '@/timelines.js';
provide('shouldOmitHeaderTitle', true);

View file

@ -20,7 +20,7 @@ async function cacheWithFallback(cache, paths) {
try {
await cache.add(new Request(path, { credentials: 'same-origin' }));
} catch (error) {
// eslint-disable-next-line no-empty
}
}
}
@ -66,7 +66,7 @@ globalThis.addEventListener('fetch', (ev) => {
if (response) return response;
return fetch(ev.request).then((response) => {
if (!response || response.status !== 200 || response.type !== 'basic') return response;
if (response.status !== 200 || response.type !== 'basic') return response;
const responseToCache = response.clone();
caches.open(STATIC_CACHE_NAME)
.then((cache) => {