From 6aeb7dcbc9957aa1f211840d7a5999797c3ba099 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Mon, 29 Jan 2024 08:55:56 +0100 Subject: [PATCH] Add User management features to front-end --- resources/js/assets/app.scss | 26 +- resources/js/layouts/AdminTabs.vue | 35 +++ resources/js/layouts/Footer.vue | 7 +- resources/js/layouts/ListItem.vue | 17 ++ resources/js/router/index.js | 6 + resources/js/router/middlewares/adminOnly.js | 14 + resources/js/router/middlewares/authGuard.js | 1 + resources/js/services/userService.js | 69 ++++- resources/js/stores/user.js | 1 + resources/js/views/admin/AppSetup.vue | 58 ++++ resources/js/views/admin/Users.vue | 180 +++++++++++ resources/js/views/admin/users/Create.vue | 44 +++ resources/js/views/admin/users/Manage.vue | 304 +++++++++++++++++++ resources/js/views/auth/Login.vue | 2 + resources/js/views/settings/Options.vue | 32 -- resources/lang/en/admin.php | 81 +++++ resources/lang/en/auth.php | 2 +- resources/lang/en/commons.php | 3 + resources/lang/en/errors.php | 3 +- resources/lang/en/settings.php | 15 - 20 files changed, 844 insertions(+), 56 deletions(-) create mode 100644 resources/js/layouts/AdminTabs.vue create mode 100644 resources/js/layouts/ListItem.vue create mode 100644 resources/js/router/middlewares/adminOnly.js create mode 100644 resources/js/views/admin/AppSetup.vue create mode 100644 resources/js/views/admin/Users.vue create mode 100644 resources/js/views/admin/users/Create.vue create mode 100644 resources/js/views/admin/users/Manage.vue create mode 100644 resources/lang/en/admin.php diff --git a/resources/js/assets/app.scss b/resources/js/assets/app.scss index 875a6013..d0747da6 100644 --- a/resources/js/assets/app.scss +++ b/resources/js/assets/app.scss @@ -120,14 +120,18 @@ a:hover { } // has-text-weight-semibold / $weight-semibold -.group-item { +.group-item, .list-item { border-bottom: 1px solid $grey-lighter; padding: 0.75rem; } -:root[data-theme="dark"] .group-item { +:root[data-theme="dark"] .group-item, +:root[data-theme="dark"] .list-item { border-color: $grey-darker; color: $light; } +:root[data-theme="dark"] .list-item { + color: $grey-lighter; +} .group-item:first-of-type { margin-top: 2.5rem; @@ -386,6 +390,24 @@ a:hover { background: none !important; } +.is-left-bordered-link, +.is-left-bordered-warning, +.is-left-bordered-danger { + border: none; + border-left-style: solid; + border-left-width: 3px; + padding-left: $size-normal; +} +.is-left-bordered-link { + border-left-color: $link; +} +.is-left-bordered-warning { + border-left-color: $warning; +} +.is-left-bordered-danger { + border-left-color: $danger; +} + .add-icon-button { height: 64px; width: 64px; diff --git a/resources/js/layouts/AdminTabs.vue b/resources/js/layouts/AdminTabs.vue new file mode 100644 index 00000000..252cec35 --- /dev/null +++ b/resources/js/layouts/AdminTabs.vue @@ -0,0 +1,35 @@ + + + +
+ \ No newline at end of file diff --git a/resources/js/layouts/Footer.vue b/resources/js/layouts/Footer.vue index 2e95a5cf..571c97d8 100644 --- a/resources/js/layouts/Footer.vue +++ b/resources/js/layouts/Footer.vue @@ -46,8 +46,11 @@+ #{{ managedUser.info.id }}{{ managedUser.info.name }}
+{{ managedUser.info.email }}
+