Browse Source

Benutzerliste (für Admin) vorbereitet, übersetzungen hinzugefügt

feature/document
Stephan Richter 4 months ago
parent
commit
086f722074
  1. 7
      frontend/src/routes/user/EditPassword.svelte
  2. 6
      frontend/src/routes/user/User.svelte
  3. 8
      translations/src/main/resources/de.json
  4. 6
      web/src/main/resources/web/css/default.css

7
frontend/src/routes/user/EditPassword.svelte

@ -11,6 +11,8 @@ @@ -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 @@ @@ -29,6 +31,8 @@
if (resp.ok){
const json = await resp.json();
console.log(json);
} else {
error = await resp.text();
}
}
</script>
@ -61,4 +65,7 @@ @@ -61,4 +65,7 @@
</label>
<button onclick={submit} disabled={oldEmpty||newEmpty||mismatch}>{t('user.update')}</button>
<button onclick={abort}>{t('user.abort')}</button>
{#if error}
<span class="error">{error}</span>
{/if}
</fieldset>

6
frontend/src/routes/user/User.svelte

@ -91,4 +91,10 @@ @@ -91,4 +91,10 @@
</table>
</fieldset>
{#if user.permissions.includes('LIST_USERS')}
<fieldset>
<legend>{t('user.list')}</legend>
User list goes here…
</fieldset>
{/if}

8
translations/src/main/resources/de.json

@ -18,6 +18,7 @@ @@ -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 @@ @@ -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"
}
}

6
web/src/main/resources/web/css/default.css

@ -34,4 +34,10 @@ footer { @@ -34,4 +34,10 @@ footer {
width: 100%;
text-align: center;
margin: 5px;
}
.error {
background: red;
color: black;
padding: 5px;
border-radius: 6px;
}
Loading…
Cancel
Save