feat: switch to global auth and tenant route prefix

This commit is contained in:
2026-01-26 18:04:05 +08:00
parent 8addf6f900
commit cde4fb8594
25 changed files with 479 additions and 7196 deletions

View File

@@ -248,7 +248,7 @@ onMounted(fetchData);
v-for="creator in matchedCreators"
:key="creator.id"
class="flex items-center gap-3 p-3 rounded-xl hover:bg-slate-50 transition-colors cursor-pointer border border-transparent hover:border-slate-200"
@click="$router.push(tenantRoute(`/t/${creator.id}`))"
@click="$router.push(`/t/${creator.id}`)"
>
<img
:src="
@@ -397,12 +397,12 @@ onMounted(fetchData);
`https://api.dicebear.com/7.x/avataaars/svg?seed=${creator.id}`
"
class="w-10 h-10 rounded-full cursor-pointer"
@click="$router.push(tenantRoute(`/t/${creator.id}`))"
@click="$router.push(`/t/${creator.id}`)"
/>
<div class="flex-1 min-w-0">
<div
class="font-bold text-slate-900 text-sm truncate hover:text-primary-600 cursor-pointer"
@click="$router.push(tenantRoute(`/t/${creator.id}`))"
@click="$router.push(`/t/${creator.id}`)"
>
{{ creator.name }}
</div>

View File

@@ -47,7 +47,9 @@ const login = async () => {
life: 1000,
});
setTimeout(() => {
router.push(tenantPath("/", route));
const fallback = tenantPath("/", route);
const target = route.query?.redirect || fallback;
router.push(target);
}, 1000);
} catch (e) {
toast.add({