From a14adb7cfd0f1789c8189aa4d1bce92843e023c5 Mon Sep 17 00:00:00 2001 From: Joep Date: Sun, 10 Sep 2023 16:21:57 +0200 Subject: [PATCH] converted views/settings/Users.vue to composition api --- frontend/src/types/user.d.ts | 33 +++++++++++++-- frontend/src/views/settings/Users.vue | 58 ++++++++++++--------------- 2 files changed, 55 insertions(+), 36 deletions(-) diff --git a/frontend/src/types/user.d.ts b/frontend/src/types/user.d.ts index 73596e64..9757afae 100644 --- a/frontend/src/types/user.d.ts +++ b/frontend/src/types/user.d.ts @@ -1,7 +1,34 @@ -interface user { +type UserKey = keyof IUser; + +interface IUser { id: number; + username: string; + password: string; + scope: string; locale: string; - perm: any; + lockPassword: boolean; + viewMode: string; + singleClick: boolean; + perm: UserPerm; + commands: any[]; + sorting: UserSorting; + rules: any[]; + hideDotfiles: boolean; + dateFormat: boolean; } -type userKey = keyof user; +interface UserPerm { + admin: boolean; + execute: boolean; + create: boolean; + rename: boolean; + modify: boolean; + delete: boolean; + share: boolean; + download: boolean; +} + +interface UserSorting { + by: string; + asc: boolean; +} diff --git a/frontend/src/views/settings/Users.vue b/frontend/src/views/settings/Users.vue index a60494f0..5c609b9a 100644 --- a/frontend/src/views/settings/Users.vue +++ b/frontend/src/views/settings/Users.vue @@ -1,13 +1,13 @@ -