mirror of
https://github.com/paricafe/misskey.git
synced 2025-02-17 13:37:29 -06:00
Compare commits
2 commits
0145477c96
...
6e35b9378a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6e35b9378a | ||
![]() |
600a978f22 |
2 changed files with 198 additions and 198 deletions
|
@ -36,12 +36,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, provide, shallowRef, ref, onMounted, onActivated } from 'vue';
|
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 { 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 MkTimeline from '@/components/MkTimeline.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
import MkPostForm from '@/components/MkPostForm.vue';
|
import MkPostForm from '@/components/MkPostForm.vue';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
import { scroll } from '@@/js/scroll.js';
|
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||||
import { defaultStore } from '@/store.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 { antennasCache, userListsCache, favoritedChannelsCache } from '@/cache.js';
|
||||||
import { deviceKind } from '@/scripts/device-kind.js';
|
import { deviceKind } from '@/scripts/device-kind.js';
|
||||||
import { deepMerge } from '@/scripts/merge.js';
|
import { deepMerge } from '@/scripts/merge.js';
|
||||||
import type { MenuItem } from '@/types/menu.js';
|
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
||||||
import type { BasicTimelineType } from '@/timelines.js';
|
|
||||||
|
|
||||||
provide('shouldOmitHeaderTitle', true);
|
provide('shouldOmitHeaderTitle', true);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ async function cacheWithFallback(cache, paths) {
|
||||||
try {
|
try {
|
||||||
await cache.add(new Request(path, { credentials: 'same-origin' }));
|
await cache.add(new Request(path, { credentials: 'same-origin' }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-empty
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ globalThis.addEventListener('fetch', (ev) => {
|
||||||
if (response) return response;
|
if (response) return response;
|
||||||
|
|
||||||
return fetch(ev.request).then((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();
|
const responseToCache = response.clone();
|
||||||
caches.open(STATIC_CACHE_NAME)
|
caches.open(STATIC_CACHE_NAME)
|
||||||
.then((cache) => {
|
.then((cache) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue