From 2bfbbbf16ac1f085efa897c98913297fe09eef61 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Fri, 23 May 2025 10:46:42 +0900
Subject: enhance(frontend): improve tips

---
 packages/frontend/src/pages/settings/other.vue | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'packages/frontend/src/pages/settings/other.vue')

diff --git a/packages/frontend/src/pages/settings/other.vue b/packages/frontend/src/pages/settings/other.vue
index 7b6ad5e56e..f09cc9c9bc 100644
--- a/packages/frontend/src/pages/settings/other.vue
+++ b/packages/frontend/src/pages/settings/other.vue
@@ -123,6 +123,11 @@ SPDX-License-Identifier: AGPL-3.0-only
 
 		<hr>
 
+		<MkButton @click="resetAllTips"><i class="ti ti-bulb"></i> {{ i18n.ts.redisplayAllTips }}</MkButton>
+		<MkButton @click="hideAllTips"><i class="ti ti-bulb-off"></i> {{ i18n.ts.hideAllTips }}</MkButton>
+
+		<hr>
+
 		<FormSlot>
 			<MkButton danger @click="migrate"><i class="ti ti-refresh"></i> {{ i18n.ts.migrateOldSettings }}</MkButton>
 			<template #caption>{{ i18n.ts.migrateOldSettings_description }}</template>
@@ -152,6 +157,7 @@ import { prefer } from '@/preferences.js';
 import MkRolePreview from '@/components/MkRolePreview.vue';
 import { signout } from '@/signout.js';
 import { migrateOldSettings } from '@/pref-migrate.js';
+import { store, TIPS } from '@/store.js';
 
 const $i = ensureSignin();
 
@@ -194,6 +200,20 @@ function migrate() {
 	migrateOldSettings();
 }
 
+function resetAllTips() {
+	store.set('tips', {});
+	os.success();
+}
+
+function hideAllTips() {
+	const v = {};
+	for (const k of TIPS) {
+		v[k] = true;
+	}
+	store.set('tips', v);
+	os.success();
+}
+
 const headerActions = computed(() => []);
 
 const headerTabs = computed(() => []);
-- 
cgit v1.2.3-freya

