landing desktop

This commit is contained in:
2026-06-12 20:16:14 +03:30
parent 820e80ac16
commit 5eec309b54
89 changed files with 4343 additions and 2309 deletions
+19
View File
@@ -0,0 +1,19 @@
import type { LocationQuery } from 'vue-router';
export function sanitizeRedirectPath(value: unknown): string | null {
if (typeof value !== 'string' || !value.startsWith('/') || value.startsWith('//')) {
return null;
}
return value;
}
export function redirectFromQuery(query: LocationQuery, fallback = '/app'): string {
return sanitizeRedirectPath(query.redirect) ?? fallback;
}
export function loginRouteWithRedirect(redirectPath: string) {
return {
name: 'login' as const,
query: { redirect: redirectPath },
};
}