From 086f7220740425a3da83280d52a677abfde55005 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 2 Jul 2025 00:27:04 +0200 Subject: [PATCH] =?UTF-8?q?Benutzerliste=20(f=C3=BCr=20Admin)=20vorbereite?= =?UTF-8?q?t,=20=C3=BCbersetzungen=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/routes/user/EditPassword.svelte | 7 +++++++ frontend/src/routes/user/User.svelte | 6 ++++++ translations/src/main/resources/de.json | 8 ++++++++ web/src/main/resources/web/css/default.css | 6 ++++++ 4 files changed, 27 insertions(+) diff --git a/frontend/src/routes/user/EditPassword.svelte b/frontend/src/routes/user/EditPassword.svelte index 3b81942..a667396 100644 --- a/frontend/src/routes/user/EditPassword.svelte +++ b/frontend/src/routes/user/EditPassword.svelte @@ -11,6 +11,8 @@ let newEmpty = $derived(!/\S/.test(newPass)); let mismatch = $derived(newPass != repeat); + let error = $state(""); + function abort(){ editPassword = false; } @@ -29,6 +31,8 @@ if (resp.ok){ const json = await resp.json(); console.log(json); + } else { + error = await resp.text(); } } @@ -61,4 +65,7 @@ + {#if error} + {error} + {/if} \ No newline at end of file diff --git a/frontend/src/routes/user/User.svelte b/frontend/src/routes/user/User.svelte index d74b32f..d743db4 100644 --- a/frontend/src/routes/user/User.svelte +++ b/frontend/src/routes/user/User.svelte @@ -91,4 +91,10 @@ +{#if user.permissions.includes('LIST_USERS')} +
+ {t('user.list')} + User list goes here… +
+{/if} diff --git a/translations/src/main/resources/de.json b/translations/src/main/resources/de.json index f1ac7b0..df87438 100644 --- a/translations/src/main/resources/de.json +++ b/translations/src/main/resources/de.json @@ -18,6 +18,7 @@ "tutorial": "Tutorial" }, "user" : { + "abort": "abbrechen", "CREATE_USERS": "NUTZER ANLEGEN", "DELETE_USERS": "NUTZER LÖSCHEN", "edit_password": "Passwort ändern", @@ -25,14 +26,21 @@ "id": "Id", "IMPERSONATE": "NUTZER WECHSELN", "language": "Sprache", + "list": "Benutzer-Liste", "LIST_USERS": "NUTZER AUFLISTEN", "login": "Login", "MANAGE_LOGIN_SERVICES": "LOGIN-SERVICES VERWALTEN", + "mismatch": "ungleich", + "must_not_be_empty": "darf nicht leer sein", "name": "Name", + "new_password": "neues Passwort", + "old_password": "altes Passwort", "password": "Passwort", "permissions": "Berechtigungen", "profile": "Profil", + "repeat_new_password": "Wiederholung", "theme": "Design", + "update": "aktualisieren", "user_module" : "Umbrella User-Verwaltung" } } \ No newline at end of file diff --git a/web/src/main/resources/web/css/default.css b/web/src/main/resources/web/css/default.css index c4d3002..4940b0c 100644 --- a/web/src/main/resources/web/css/default.css +++ b/web/src/main/resources/web/css/default.css @@ -34,4 +34,10 @@ footer { width: 100%; text-align: center; margin: 5px; +} +.error { + background: red; + color: black; + padding: 5px; + border-radius: 6px; } \ No newline at end of file