diff --git a/docs/TASKS/frontend/001-vuetify-native-form-controls.md b/docs/TASKS/frontend/001-vuetify-native-form-controls.md new file mode 100644 index 00000000..1eb91de2 --- /dev/null +++ b/docs/TASKS/frontend/001-vuetify-native-form-controls.md @@ -0,0 +1,26 @@ +# Task: Replace native form controls with Vuetify controls + +## Goal + +Move interactive form fields from native `input`, `select`, and `textarea` elements to Vuetify form components so form theming flows through `createVuetify`. + +## Scope + +- Replace native text, email, URL, search, date, and number inputs with `v-text-field`. +- Replace native selects with `v-select`. +- Replace native textareas with `v-textarea`. +- Replace native checkboxes/radios with Vuetify selection controls where practical. +- Preserve file inputs where Vuetify would reduce custom upload behavior. +- Keep custom navigation and row action buttons out of this pass unless they are part of a form. + +## Validation + +```bash +cd frontend +npm run build +``` + +## Done + +- [x] Native form controls under `frontend/src/**/*.vue` were replaced with Vuetify form components. +- [x] Frontend build passes. diff --git a/frontend/src/components/ImageCropperDialog.vue b/frontend/src/components/ImageCropperDialog.vue index c11bdab0..8e7b9396 100644 --- a/frontend/src/components/ImageCropperDialog.vue +++ b/frontend/src/components/ImageCropperDialog.vue @@ -44,7 +44,6 @@ const emit = defineEmits(['update:modelValue', 'save']); - const fileInput = ref(null); const cropper = ref(null); const imageUrl = ref(null); const remoteUrl = ref(''); @@ -67,17 +66,11 @@ imageUrl.value = props.initialUrl || null; remoteUrl.value = props.initialUrl || ''; error.value = null; - if (fileInput.value) { - fileInput.value.value = ''; - } } - function chooseImage() { - fileInput.value?.click(); - } + function onFileSelected(value) { + const file = Array.isArray(value) ? value[0] : value; - function onFileSelected(event) { - const [file] = event.target.files ?? []; if (!file) { return; } @@ -165,28 +158,25 @@