mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-04 21:15:45 +02:00
enhance(frontend): improve tips
This commit is contained in:
@@ -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(() => []);
|
||||
|
||||
Reference in New Issue
Block a user