refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -66,7 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { shallowRef, computed } from 'vue';
|
||||
import { useTemplateRef, computed } from 'vue';
|
||||
import { notificationTypes } from '@@/js/const.js';
|
||||
import XNotificationConfig from './notifications.notification-config.vue';
|
||||
import type { NotificationConfig } from './notifications.notification-config.vue';
|
||||
@@ -88,7 +88,7 @@ const nonConfigurableNotificationTypes = ['note', 'roleAssigned', 'followRequest
|
||||
|
||||
const onlyOnOrOffNotificationTypes = ['app', 'achievementEarned', 'login', 'createToken'] satisfies (typeof notificationTypes[number])[] as string[];
|
||||
|
||||
const allowButton = shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
|
||||
const allowButton = useTemplateRef('allowButton');
|
||||
const pushRegistrationInServer = computed(() => allowButton.value?.pushRegistrationInServer);
|
||||
const sendReadMessage = computed(() => pushRegistrationInServer.value?.sendReadMessage || false);
|
||||
const userLists = await misskeyApi('users/lists/list');
|
||||
|
Reference in New Issue
Block a user