co-authored by
Jun Siang Cheah
parent
00f32e2651
commit
242d4f0c8d
@@ -22,6 +22,7 @@
|
||||
prompts,
|
||||
documents,
|
||||
tags,
|
||||
banners,
|
||||
showChangelog,
|
||||
config
|
||||
} from '$lib/stores';
|
||||
@@ -33,6 +34,7 @@
|
||||
import ShortcutsModal from '$lib/components/chat/ShortcutsModal.svelte';
|
||||
import ChangelogModal from '$lib/components/ChangelogModal.svelte';
|
||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||
import { getBanners } from '$lib/apis/configs';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -82,6 +84,14 @@
|
||||
(async () => {
|
||||
documents.set(await getDocs(localStorage.token));
|
||||
})(),
|
||||
(async () => {
|
||||
let _banners = await getBanners(localStorage.token);
|
||||
const dismissedBannerIds = JSON.parse(localStorage.getItem('dismissedBannerIds') ?? '[]');
|
||||
_banners = _banners.filter((banner) =>
|
||||
banner.dismissible ? !dismissedBannerIds.includes(banner.id) : true
|
||||
);
|
||||
banners.set(_banners);
|
||||
})(),
|
||||
(async () => {
|
||||
tags.set(await getAllChatTags(localStorage.token));
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user