High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(web): redirect to login from getting started (#1755)
Michel Heusschen1361f1896407
diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelteindex 1cd6e0ab6e..85103992a7 100644--- a/web/src/routes/+page.svelte+++ b/web/src/routes/+page.svelte@@ -15,7 +15,7 @@</h1><buttonclass="border px-4 py-4 rounded-md bg-immich-primary dark:bg-immich-dark-primary dark:text-immich-dark-gray dark:border-immich-dark-gray hover:bg-immich-primary/75 text-white font-bold w-[200px]"- on:click={() => goto('/auth/login')}+ on:click={() => goto('/auth/register')}>Getting Started</button></div>diff --git a/web/src/routes/+page.ts b/web/src/routes/+page.tsindex e46d955b5f..5d95f568b6 100644--- a/web/src/routes/+page.ts+++ b/web/src/routes/+page.ts@@ -1,4 +1,5 @@export const prerender = false;+import { serverApi } from '@api';import { redirect } from '@sveltejs/kit';import type { PageLoad } from './$types';@@ -8,6 +9,12 @@ export const load: PageLoad = async ({ parent }) => {throw redirect(302, '/photos');}+ const { data } = await serverApi.userApi.getUserCount(true);+ if (data.userCount > 0) {+ // Redirect to login page if an admin is already registered.+ throw redirect(302, '/auth/login');+ }+return {meta: {title: 'Welcome 🎉',