refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
parent
81ac71f7e5
commit
7b323031b7
127 changed files with 353 additions and 359 deletions
|
|
@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { shallowRef, ref } from 'vue';
|
||||
import { useTemplateRef, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkInput from './MkInput.vue';
|
||||
import MkSwitch from './MkSwitch.vue';
|
||||
|
|
@ -77,7 +77,7 @@ const emit = defineEmits<{
|
|||
const defaultPermissions = Misskey.permissions.filter(p => !p.startsWith('read:admin') && !p.startsWith('write:admin'));
|
||||
const adminPermissions = Misskey.permissions.filter(p => p.startsWith('read:admin') || p.startsWith('write:admin'));
|
||||
|
||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
const dialog = useTemplateRef('dialog');
|
||||
const name = ref(props.initialName);
|
||||
const permissionSwitches = ref({} as Record<(typeof Misskey.permissions)[number], boolean>);
|
||||
const permissionSwitchesForAdmin = ref({} as Record<(typeof Misskey.permissions)[number], boolean>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue