High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
Add message to login screen (useful for demo instances) (#329)
Matthias Rupp19b1fad27484
diff --git a/docker/.env.example b/docker/.env.exampleindex 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 ENDVITE_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.<br><br>Email: <i>[email protected]</i><br>Password: <i>demo</i>"++VITE_LOGIN_PAGE_MESSAGE=\ No newline at end of filediff --git a/web/src/lib/components/forms/login-form.svelte b/web/src/lib/components/forms/login-form.svelteindex 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 @@<h1 class="text-2xl text-immich-primary font-medium">Login</h1></div>+ {#if loginPageMessage}+ <!-- <div class="bg-blue-100 m-4 p-2 border-t border-b border-blue-500 text-blue-700" role="alert">+ <p>{@html loginPageMessage}</p>+ </div> -->++ <p class="text-sm border rounded-md m-4 p-4 text-immich-primary font-medium bg-immich-primary/5">+ {@html loginPageMessage}+ </p>+ {/if}+<form on:submit|preventDefault={login} method="post" action="" autocomplete="off"><div class="m-4 flex flex-col gap-2"><label class="immich-form-label" for="email">Email</label>diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.tsindex 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;