summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-06-06 21:03:35 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-06-06 21:03:35 +0900
commitbe35fe468b5093fb7395e176a0d8361a45f2529b (patch)
tree1298968318b4a769375b70dd109f5b3226993b36 /packages/frontend/src/components
parentenhance(frontend): improve MkTip usability (diff)
downloadmisskey-be35fe468b5093fb7395e176a0d8361a45f2529b.tar.gz
misskey-be35fe468b5093fb7395e176a0d8361a45f2529b.tar.bz2
misskey-be35fe468b5093fb7395e176a0d8361a45f2529b.zip
refactor(frontend): refactor tips
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/global/MkTip.vue13
1 files changed, 5 insertions, 8 deletions
diff --git a/packages/frontend/src/components/global/MkTip.vue b/packages/frontend/src/components/global/MkTip.vue
index afe204cfcb..231957a232 100644
--- a/packages/frontend/src/components/global/MkTip.vue
+++ b/packages/frontend/src/components/global/MkTip.vue
@@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div style="font-weight: bold;"><i class="ti ti-bulb"></i> {{ i18n.ts.tip }}:</div>
<div><slot></slot></div>
<div>
- <MkButton inline primary rounded small @click="closeTip()"><i class="ti ti-check"></i> {{ i18n.ts.gotIt }}</MkButton>
+ <MkButton inline primary rounded small @click="_closeTip()"><i class="ti ti-check"></i> {{ i18n.ts.gotIt }}</MkButton>
<button class="_button" style="padding: 8px; margin-left: 4px;" @click="showMenu"><i class="ti ti-dots"></i></button>
</div>
</div>
@@ -19,20 +19,17 @@ import { i18n } from '@/i18n.js';
import { store } from '@/store.js';
import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
-import { hideAllTips } from '@/store.js';
+import { TIPS, hideAllTips, closeTip } from '@/tips.js';
const props = withDefaults(defineProps<{
- k: keyof (typeof store['s']['tips']);
+ k: typeof TIPS[number];
warn?: boolean;
}>(), {
warn: false,
});
-function closeTip() {
- store.set('tips', {
- ...store.r.tips.value,
- [props.k]: true,
- });
+function _closeTip() {
+ closeTip(props.k);
}
function showMenu(ev: MouseEvent) {