11<script setup lang="ts">
2- import { Button , TransitionVertical } from ' @proj-airi/ui'
2+ import { Button , Checkbox , TransitionVertical } from ' @proj-airi/ui'
33import { refDebounced , useDark , useMouseInElement } from ' @vueuse/core'
4+ import { storeToRefs } from ' pinia'
45import { computed , onBeforeUnmount , onMounted , ref } from ' vue'
56import { useI18n } from ' vue-i18n'
67import { useRoute } from ' vue-router'
@@ -10,6 +11,7 @@ import VideoTutorialFadeOnHoverLight from '../../assets/videos/tutorial/tutorial
1011
1112import { noticeWindowEventa } from ' ../../../shared/eventa'
1213import { useElectronEventaContext , useElectronEventaInvoke } from ' ../../composables/electron-vueuse'
14+ import { useControlsIslandStore } from ' ../../stores/controls-island'
1315
1416const context = useElectronEventaContext ()
1517const sendAction = useElectronEventaInvoke (noticeWindowEventa .windowAction , context .value )
@@ -18,6 +20,10 @@ const notifyUnmounted = useElectronEventaInvoke(noticeWindowEventa.pageUnmounted
1820const route = useRoute ()
1921const { t } = useI18n ()
2022
23+ const controlsIslandStore = useControlsIslandStore ()
24+ const dontShowItAgainNoticeFadeOnHoverPending = ref (false )
25+ const { dontShowItAgainNoticeFadeOnHover } = storeToRefs (controlsIslandStore )
26+
2127const descriptionContainerRef = ref <HTMLDivElement >()
2228const { isOutside } = useMouseInElement (descriptionContainerRef )
2329const descriptionOpenImmediate = computed (() => ! isOutside .value )
@@ -61,6 +67,8 @@ async function handleAction(action: 'confirm' | 'cancel' | 'close') {
6167 }
6268
6369 try {
70+ if (action === ' confirm' )
71+ dontShowItAgainNoticeFadeOnHover .value = dontShowItAgainNoticeFadeOnHoverPending .value
6472 await sendAction ({ id , action })
6573 }
6674 catch (error ) {
@@ -213,6 +221,12 @@ async function handleAction(action: 'confirm' | 'cancel' | 'close') {
213221 :loading =" waitingForRequest"
214222 @click =" handleAction('confirm')"
215223 />
224+ <div class =" flex items-center gap-2 whitespace-nowrap px-2" >
225+ <Checkbox v-model =" dontShowItAgainNoticeFadeOnHoverPending" />
226+ <div class =" whitespace-nowrap text-sm" >
227+ {{ t('tamagotchi.stage.notice.fade-on-hover.dont-show-again') }}
228+ </div >
229+ </div >
216230 </div >
217231 </div >
218232 </TransitionVertical >
0 commit comments