diff --git a/docker/.env.example b/docker/.env.example index 35cc56f104..c7609e6e0c 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -51,7 +51,7 @@ MAPBOX_KEY= ################################################################################### -# WEB +# WEB - Required ################################################################################### # This is the URL of your vm/server where you host Immich, so that the web frontend @@ -61,3 +61,13 @@ MAPBOX_KEY= # !CAUTION! THERE IS NO FORWARD SLASH AT THE END VITE_SERVER_ENDPOINT= + + +#################################################################################### +# WEB - Optional +#################################################################################### + +# Custom message on the login page, should be written in HTML form. +# For example VITE_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.

Email: demo@demo.de
Password: demo" + +VITE_LOGIN_PAGE_MESSAGE= \ No newline at end of file diff --git a/web/src/lib/components/forms/login-form.svelte b/web/src/lib/components/forms/login-form.svelte index 96b7c13824..7b20c4402f 100644 --- a/web/src/lib/components/forms/login-form.svelte +++ b/web/src/lib/components/forms/login-form.svelte @@ -2,6 +2,7 @@ import { goto } from '$app/navigation'; import { session } from '$app/stores'; import { sendLoginForm } from '$lib/auth-api'; + import { loginPageMessage } from '$lib/constants'; import { createEventDispatcher } from 'svelte'; let error: string; @@ -43,6 +44,16 @@

Login

+ {#if loginPageMessage} + + +

+ {@html loginPageMessage} +

+ {/if} +
diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.ts index 2a403bfb31..0fce83a452 100644 --- a/web/src/lib/constants.ts +++ b/web/src/lib/constants.ts @@ -1 +1,2 @@ export const serverEndpoint: string = import.meta.env.VITE_SERVER_ENDPOINT; +export const loginPageMessage: string = import.meta.env.VITE_LOGIN_PAGE_MESSAGE;