summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNotificationSelectWindow.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 18:46:03 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 18:46:03 +0900
commit7b323031b774745ee2146c89ead2a9ebe628d613 (patch)
tree69c6bc1f101826b13fb18df8aebc0fd9fc5c6377 /packages/frontend/src/components/MkNotificationSelectWindow.vue
parentrefactor(frontend): router refactoring (diff)
downloadsharkey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.gz
sharkey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.bz2
sharkey-7b323031b774745ee2146c89ead2a9ebe628d613.zip
refactor(frontend): use useTemplateRef for DOM referencing
Diffstat (limited to 'packages/frontend/src/components/MkNotificationSelectWindow.vue')
-rw-r--r--packages/frontend/src/components/MkNotificationSelectWindow.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkNotificationSelectWindow.vue b/packages/frontend/src/components/MkNotificationSelectWindow.vue
index a0fb7fea83..d074dceb2f 100644
--- a/packages/frontend/src/components/MkNotificationSelectWindow.vue
+++ b/packages/frontend/src/components/MkNotificationSelectWindow.vue
@@ -30,13 +30,13 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
-import { ref, shallowRef } from 'vue';
-import type { Ref } from 'vue';
+import { ref, useTemplateRef } from 'vue';
+import { notificationTypes } from '@@/js/const.js';
import MkSwitch from './MkSwitch.vue';
import MkInfo from './MkInfo.vue';
import MkButton from './MkButton.vue';
+import type { Ref } from 'vue';
import MkModalWindow from '@/components/MkModalWindow.vue';
-import { notificationTypes } from '@@/js/const.js';
import { i18n } from '@/i18n.js';
type TypesMap = Record<typeof notificationTypes[number], Ref<boolean>>;
@@ -52,7 +52,7 @@ const props = withDefaults(defineProps<{
excludeTypes: () => [],
});
-const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
+const dialog = useTemplateRef('dialog');
const typesMap = notificationTypes.reduce((p, t) => ({ ...p, [t]: ref<boolean>(!props.excludeTypes.includes(t)) }), {} as TypesMap);