From 5ecf1eca18121cc2d34a648178bb37694ba9556d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Sat, 29 Nov 2025 15:53:44 +0100 Subject: [PATCH] add posibility user can change own password close #16 --- src/vueLib/login/ChangePassword.vue | 85 +++++++ src/vueLib/login/EnterNewPassword.vue | 129 +++++++++++ src/vueLib/models/users.ts | 4 +- src/vueLib/tables/users/UserTable.ts | 6 + src/vueLib/tables/users/UserTable.vue | 305 ++++++++++++++------------ 5 files changed, 388 insertions(+), 141 deletions(-) create mode 100644 src/vueLib/login/ChangePassword.vue create mode 100644 src/vueLib/login/EnterNewPassword.vue diff --git a/src/vueLib/login/ChangePassword.vue b/src/vueLib/login/ChangePassword.vue new file mode 100644 index 0000000..d816732 --- /dev/null +++ b/src/vueLib/login/ChangePassword.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/vueLib/login/EnterNewPassword.vue b/src/vueLib/login/EnterNewPassword.vue new file mode 100644 index 0000000..c87f2ba --- /dev/null +++ b/src/vueLib/login/EnterNewPassword.vue @@ -0,0 +1,129 @@ + + diff --git a/src/vueLib/models/users.ts b/src/vueLib/models/users.ts index 697d224..ffccdfa 100644 --- a/src/vueLib/models/users.ts +++ b/src/vueLib/models/users.ts @@ -1,12 +1,14 @@ +import type { Role } from './roles'; import type { Settings } from './settings'; export interface User { id?: number; user: string; email: string; - role: string; + role?: Role; expiration?: string; password?: string; + newPassword?: string; settings?: Settings; } diff --git a/src/vueLib/tables/users/UserTable.ts b/src/vueLib/tables/users/UserTable.ts index 7f5ad7d..c6bf364 100644 --- a/src/vueLib/tables/users/UserTable.ts +++ b/src/vueLib/tables/users/UserTable.ts @@ -29,6 +29,12 @@ export function useUserTable() { field: 'email', sortable: true, }, + { + name: 'newPassword', + align: 'left' as const, + label: '', + field: 'newPassword', + }, { name: 'role', align: 'left' as const, diff --git a/src/vueLib/tables/users/UserTable.vue b/src/vueLib/tables/users/UserTable.vue index de6cf5b..47bd32d 100644 --- a/src/vueLib/tables/users/UserTable.vue +++ b/src/vueLib/tables/users/UserTable.vue @@ -1,133 +1,148 @@