dont use [...path] routing since it breaks building statically

This commit is contained in:
2025-07-18 11:02:48 +02:00
parent 5ff19ef372
commit ecb201dc69
13 changed files with 300 additions and 188 deletions

View File

@@ -9,21 +9,27 @@ import {
} from '@/components/ui/dialog';
import { renameWarrenEntry } from '~/lib/api/warrens';
const warrenRoute = useWarrenRoute();
const warrenStore = useWarrenStore();
const dialog = useRenameDirectoryDialog();
const renaming = ref(false);
const directoryNameValid = computed(() => dialog.value.trim().length > 0);
async function submit() {
if (dialog.entry == null || !directoryNameValid.value || renaming.value) {
if (
dialog.entry == null ||
!directoryNameValid.value ||
renaming.value ||
warrenStore.current == null
) {
return;
}
renaming.value = true;
const { success } = await renameWarrenEntry(
warrenRoute.value,
warrenStore.current.warrenId,
warrenStore.current.path,
dialog.entry.name,
dialog.value
);