diff --git a/package.json b/package.json index 884fab93..051f2a79 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "licenses:export": "license-exporter --md" }, "dependencies": { - "@odit/lfk-client-js": "0.0.8", + "@odit/lfk-client-js": "0.0.9", "filepond": "^4.25.1", "gridjs": "^3.2.1", "localforage": "^1.9.0", diff --git a/src/components/AddUserModal.svelte b/src/components/AddUserModal.svelte new file mode 100644 index 00000000..05a2b8f8 --- /dev/null +++ b/src/components/AddUserModal.svelte @@ -0,0 +1,224 @@ + + +{#if modal_open} +
{ + modal_open = false; + }}> +
+ +
+{/if} diff --git a/src/components/Users.svelte b/src/components/Users.svelte index 9d134223..3dea5a90 100644 --- a/src/components/Users.svelte +++ b/src/components/Users.svelte @@ -1,10 +1,25 @@
- {$_('users')} + Users + -

admin users

+

+ manage admin users +

+
+ diff --git a/src/components/UsersDetail.svelte b/src/components/UsersDetail.svelte new file mode 100644 index 00000000..9f0a2c30 --- /dev/null +++ b/src/components/UsersDetail.svelte @@ -0,0 +1,131 @@ + + +{#await users_promise} + +{:then users} + {#if userscache.length === 0} + + {:else} +
+ + + + + + + + + + + + {#each users as u} + + + + + + + + {/each} + +
+ Name + + Title + + Status + + Role + + Edit +
+
+ {#if u.profilePic} +
+ +
+ {/if} +
+
+ {u.firstname} +
+
+ {u.email || u.username} +
+
+
+
+
+ Regional Paradigm Technician +
+
Optimization
+
+ {#if u.enabled} + Active + {:else} + Inactive + {/if} + + {#each u.groups as g} + {g.name} + {/each} + + Edit + Delete +
+
+ {/if} +{:catch error} +
+ + {$_('general_promise_error')} + {error} + +
+{/await} diff --git a/src/components/UsersEmptyState.svelte b/src/components/UsersEmptyState.svelte new file mode 100644 index 00000000..a4bd3ba7 --- /dev/null +++ b/src/components/UsersEmptyState.svelte @@ -0,0 +1,14 @@ + + +
+

+ There are no users added yet.
+ Add your first user +

+
+ + diff --git a/src/store.js b/src/store.js index 2131e521..d4dd9ba9 100644 --- a/src/store.js +++ b/src/store.js @@ -1,5 +1,6 @@ import { writable } from 'svelte/store'; +export let users = writable([]); export let tracks = writable([]); const store = () => { const state = {