-
+
+ {{ i18n.ts._timelineDescription[src] }}
+
@@ -34,6 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { defineAsyncComponent, computed, watch, provide } from 'vue';
import type { Tab } from '@/components/global/MkPageHeader.tabs.vue';
import MkTimeline from '@/components/MkTimeline.vue';
+import MkInfo from '@/components/MkInfo.vue';
import MkPostForm from '@/components/MkPostForm.vue';
import { scroll } from '@/scripts/scroll.js';
import * as os from '@/os.js';
@@ -47,8 +50,6 @@ import { antennasCache, userListsCache } from '@/cache.js';
provide('shouldOmitHeaderTitle', true);
-const XTutorial = defineAsyncComponent(() => import('./timeline.tutorial.vue'));
-
const isLocalTimelineAvailable = ($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable);
const isGlobalTimelineAvailable = ($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable);
const keymap = {
@@ -139,6 +140,13 @@ function focus(): void {
tlComponent.focus();
}
+function closeTutorial(): void {
+ if (!['home', 'local', 'social', 'global'].includes(src)) return;
+ const before = defaultStore.state.timelineTutorials;
+ before[src] = true;
+ defaultStore.set('timelineTutorials', before);
+}
+
const headerActions = $computed(() => [{
icon: 'ti ti-dots',
text: i18n.ts.options,
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index 6196e684e1..2d2f25bc7a 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -49,9 +49,14 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: 0,
},
- timelineTutorial: {
+ timelineTutorials: {
where: 'account',
- default: 0,
+ default: {
+ home: false,
+ local: false,
+ social: false,
+ global: false,
+ },
},
keepCw: {
where: 'account',