-
+
+
+
\ No newline at end of file
diff --git a/frontend/app/components/FormFields/FileUploadField.vue b/frontend/app/components/FormFields/FileUploadField.vue
index b721fe7..937d26f 100644
--- a/frontend/app/components/FormFields/FileUploadField.vue
+++ b/frontend/app/components/FormFields/FileUploadField.vue
@@ -33,7 +33,7 @@ const emit = defineEmits<{
const { t } = useI18n();
const config = useRuntimeConfig();
-const apiUrl = config.public.apiUrl;
+const apiUrl = config.public.apiUrl as string;
const uploadedFiles = ref
([]);
const isUploading = ref(false);
diff --git a/frontend/app/composables/useApi.ts b/frontend/app/composables/useApi.ts
index 8d862b7..ae39fe7 100644
--- a/frontend/app/composables/useApi.ts
+++ b/frontend/app/composables/useApi.ts
@@ -6,14 +6,15 @@ export const getFileUrl = (pathOrUrl: string | undefined | null): string => {
}
const config = useRuntimeConfig();
- const apiUrl = config.public.apiUrl;
+ const apiUrl = config.public.apiUrl as string;
+
const cleanPath = pathOrUrl.startsWith("/") ? pathOrUrl.slice(1) : pathOrUrl;
return `${apiUrl}/files/${cleanPath}`;
};
export const useApi = () => {
const config = useRuntimeConfig();
- const apiUrl = config.public.apiUrl;
+ const apiUrl = config.public.apiUrl as string;
const getToken = () => {
return localStorage.getItem("token");
diff --git a/frontend/app/layouts/auth.vue b/frontend/app/layouts/auth.vue
deleted file mode 100644
index 28cc527..0000000
--- a/frontend/app/layouts/auth.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/frontend/app/layouts/default.vue b/frontend/app/layouts/default.vue
index 6c799dc..413a26c 100644
--- a/frontend/app/layouts/default.vue
+++ b/frontend/app/layouts/default.vue
@@ -7,8 +7,60 @@ const localePath = useLocalePath();
const isMobileMenuOpen = ref(false);
-// Show loading while stores initialize
-const isInitializing = computed(() => authStore.isLoading || setupStore.isLoading);
+// Helper to extract locale prefix from path (e.g., '/de', '/fr')
+function getLocalePrefix(path: string): string | null {
+ const match = path.match(/^\/([a-zA-Z-]{2,5})(?=\/|$)/);
+ return match ? `/${match[1]}` : null;
+}
+
+// Determine layout type based on route
+const layoutType = computed(() => {
+ const path = route.path;
+ const localePrefix = getLocalePrefix(path);
+
+ // Build base paths for matching
+ const base = localePrefix ? localePrefix : "";
+
+ // Auth pages: login, register, setup, index (landing)
+ if (
+ path === "/" + (localePrefix ? localePrefix.slice(1) : "") || // e.g., "/de"
+ path === base + "/login" ||
+ path === base + "/register" ||
+ path === base + "/setup" ||
+ path === "/" ||
+ path === "/login" ||
+ path === "/register" ||
+ path === "/setup"
+ ) {
+ return "auth";
+ }
+ // Public form pages
+ if (path.startsWith(base + "/f/") || path.startsWith("/f/")) {
+ return "public";
+ }
+ // Dashboard pages (default)
+ return "dashboard";
+});
+
+const isAuthLayout = computed(() => layoutType.value === "auth");
+const isPublicLayout = computed(() => layoutType.value === "public");
+const isDashboardLayout = computed(() => layoutType.value === "dashboard");
+
+// Auth layout background style
+const backgroundStyle = computed(() => {
+ if (!isAuthLayout.value) return {};
+ if (setupStore.loginBackgroundDisplayURL) {
+ return {
+ backgroundImage: `url(${setupStore.loginBackgroundDisplayURL})`,
+ backgroundSize: "cover",
+ backgroundPosition: "center",
+ backgroundRepeat: "no-repeat",
+ };
+ }
+ return {
+ background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
+ };
+});
const handleLogout = () => {
authStore.logout();
@@ -33,7 +85,35 @@ watch(
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+