From 4fa7be51c70a7066629dc7b2b9fed3e97293ef89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 26 Nov 2021 23:23:10 +0100 Subject: [PATCH] [cleanup] prettier and better session view --- src/components/NewUser.vue | 21 ++++---- src/components/settings/Session.vue | 76 ++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/src/components/NewUser.vue b/src/components/NewUser.vue index e7ee402..177635c 100644 --- a/src/components/NewUser.vue +++ b/src/components/NewUser.vue @@ -27,31 +27,30 @@ export default defineComponent({ lastname: '', mail: '', roles: [], - } + }; const user = ref(emptyUser); - async function setUser(value: FG.User) { try { await userStore.createUser(value); Notify.create({ - color: "positive", - message: "Neuer User wurde angelegt.", + color: 'positive', + message: 'Neuer User wurde angelegt.', timeout: 5000, group: false, actions: [{ icon: 'mdi-close', color: 'white' }], - textColor: "white" - }) - user.value = emptyUser + textColor: 'white', + }); + user.value = emptyUser; } catch { Notify.create({ - color: "negative", - message: "Neuer User konnte nicht angelegt werden.", + color: 'negative', + message: 'Neuer User konnte nicht angelegt werden.', timeout: 10000, group: false, actions: [{ icon: 'mdi-close', color: 'white' }], - textColor: "white" - }) + textColor: 'white', + }); } } return { user, setUser }; diff --git a/src/components/settings/Session.vue b/src/components/settings/Session.vue index 9fc5337..4630d6c 100644 --- a/src/components/settings/Session.vue +++ b/src/components/settings/Session.vue @@ -5,21 +5,24 @@
-
- Browser: - - {{ modelValue.browser }} +
+
Browser:
+
+ +
-
- Plattform: - - {{ modelValue.platform }} +
+
Plattform:
+
+ + +
Lebenszeit: - {{ modelValue.lifetime }} + {{ computeShownLifeTime }}
Läuft aus: {{ dateTime(modelValue.expires) }}
@@ -47,7 +50,8 @@