Break the monolithic admin dialog component into a thin dispatcher plus one component per dialog type under admin/dialogs/, with a shared AdminDialog frame (Modal wrapper, title, error and Cancel/Save actions). No functional change. Also drop two unused input refs (nameInput, displayNameInput).
29 lines
569 B
Vue
29 lines
569 B
Vue
<script setup>
|
|
import AdminDialog from './AdminDialog.vue'
|
|
import NameEditForm from '@/components/NameEditForm.vue'
|
|
|
|
defineProps({
|
|
dialog: { type: Object, required: true }
|
|
})
|
|
|
|
defineEmits(['submit', 'close'])
|
|
</script>
|
|
|
|
<template>
|
|
<AdminDialog
|
|
title="Edit User Name"
|
|
:busy="dialog.busy"
|
|
bare
|
|
@submit="$emit('submit')"
|
|
@close="$emit('close')"
|
|
>
|
|
<NameEditForm
|
|
label="Display Name"
|
|
v-model="dialog.data.name"
|
|
:busy="dialog.busy"
|
|
:error="dialog.error"
|
|
@cancel="$emit('close')"
|
|
/>
|
|
</AdminDialog>
|
|
</template>
|