rename directory entries
This commit is contained in:
@@ -14,24 +14,17 @@ const warrenRoute = useWarrenRoute();
|
||||
const dialog = useCreateDirectoryDialog();
|
||||
|
||||
const creating = ref(false);
|
||||
const directoryName = ref('');
|
||||
const directoryNameValid = computed(
|
||||
() => directoryName.value.trim().length > 0
|
||||
);
|
||||
const directoryNameValid = computed(() => dialog.value.trim().length > 0);
|
||||
|
||||
async function submit() {
|
||||
creating.value = true;
|
||||
|
||||
const { success } = await createDirectory(
|
||||
warrenRoute.value,
|
||||
directoryName.value
|
||||
);
|
||||
const { success } = await createDirectory(warrenRoute.value, dialog.value);
|
||||
|
||||
creating.value = false;
|
||||
|
||||
if (success) {
|
||||
directoryName.value = '';
|
||||
dialog.open = false;
|
||||
dialog.reset();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -50,7 +43,7 @@ async function submit() {
|
||||
</DialogHeader>
|
||||
|
||||
<Input
|
||||
v-model="directoryName"
|
||||
v-model="dialog.value"
|
||||
type="text"
|
||||
name="directory-name"
|
||||
placeholder="my-awesome-directory"
|
||||
|
||||
Reference in New Issue
Block a user