From 50efcd72577f1bf13d5cf106d0393a63f1189d6f Mon Sep 17 00:00:00 2001 From: Mahdi Khanzadi Date: Fri, 16 Aug 2024 14:27:44 +0200 Subject: [PATCH] tidy --- frontend/components/card/large.vue | 35 +-- frontend/components/card/list/index.vue | 6 +- frontend/components/card/list/item.vue | 24 +- frontend/components/card/medium.vue | 71 ++--- frontend/components/card/small.vue | 24 +- frontend/components/comments/create.vue | 13 +- frontend/components/comments/index.vue | 5 +- frontend/components/comments/item.vue | 12 +- frontend/components/dashboard/alert.vue | 2 +- frontend/components/dashboard/fileManager.vue | 184 ++++++------ frontend/components/dashboard/navbar.vue | 30 +- frontend/components/dashboard/sidebar.vue | 80 +++-- frontend/components/featured.vue | 30 +- frontend/components/modal/confirm.vue | 12 +- frontend/composables/auth.ts | 30 +- frontend/composables/dashboardArticles.ts | 113 ++++--- frontend/composables/dashboardComments.ts | 84 ++++++ frontend/composables/dashboardFiles.ts | 91 +++--- frontend/composables/dashboardPermissions.ts | 16 + frontend/composables/dashboardRoles.ts | 80 +++++ frontend/composables/dashboardUsers.ts | 84 ++++++ frontend/composables/time.ts | 2 +- frontend/composables/user.ts | 54 ++-- frontend/layouts/dashboard.vue | 12 +- frontend/layouts/default.vue | 12 +- frontend/middleware/auth.global.ts | 4 +- frontend/pages/articles/[uuid].vue | 52 ++-- frontend/pages/articles/index.vue | 54 ++-- frontend/pages/auth/forgot-password.vue | 120 ++++---- frontend/pages/auth/login.vue | 145 ++++----- frontend/pages/auth/register.vue | 23 +- frontend/pages/auth/reset-password.vue | 179 +++++------ frontend/pages/dashboard/articles/create.vue | 235 ++++++++------- .../pages/dashboard/articles/edit/[uuid].vue | 277 +++++++++--------- frontend/pages/dashboard/articles/index.vue | 176 +++++------ frontend/pages/dashboard/comments/create.vue | 162 ++++++++++ .../pages/dashboard/comments/edit/[uuid].vue | 177 +++++++++++ frontend/pages/dashboard/comments/index.vue | 130 ++++++++ frontend/pages/dashboard/files/index.vue | 36 +-- frontend/pages/dashboard/index.vue | 154 +++++----- frontend/pages/dashboard/profile/index.vue | 220 +++++++------- frontend/pages/dashboard/profile/password.vue | 208 ++++++------- frontend/pages/dashboard/roles/create.vue | 143 +++++++++ .../pages/dashboard/roles/edit/[uuid].vue | 159 ++++++++++ frontend/pages/dashboard/roles/index.vue | 106 +++++++ frontend/pages/dashboard/users/create.vue | 162 ++++++++++ .../pages/dashboard/users/edit/[uuid].vue | 184 ++++++++++++ frontend/pages/dashboard/users/index.vue | 120 ++++++++ frontend/pages/hashtags/[hashtag].vue | 52 ++-- frontend/pages/index.vue | 67 ++--- frontend/plugins/zoom.client.ts | 20 +- 51 files changed, 3079 insertions(+), 1392 deletions(-) create mode 100644 frontend/composables/dashboardComments.ts create mode 100644 frontend/composables/dashboardPermissions.ts create mode 100644 frontend/composables/dashboardRoles.ts create mode 100644 frontend/composables/dashboardUsers.ts create mode 100644 frontend/pages/dashboard/comments/create.vue create mode 100644 frontend/pages/dashboard/comments/edit/[uuid].vue create mode 100644 frontend/pages/dashboard/comments/index.vue create mode 100644 frontend/pages/dashboard/roles/create.vue create mode 100644 frontend/pages/dashboard/roles/edit/[uuid].vue create mode 100644 frontend/pages/dashboard/roles/index.vue create mode 100644 frontend/pages/dashboard/users/create.vue create mode 100644 frontend/pages/dashboard/users/edit/[uuid].vue create mode 100644 frontend/pages/dashboard/users/index.vue diff --git a/frontend/components/card/large.vue b/frontend/components/card/large.vue index 4cc8e26a..c1efad0a 100644 --- a/frontend/components/card/large.vue +++ b/frontend/components/card/large.vue @@ -1,23 +1,24 @@ diff --git a/frontend/components/card/list/index.vue b/frontend/components/card/list/index.vue index e9de87e1..3ea83d7b 100644 --- a/frontend/components/card/list/index.vue +++ b/frontend/components/card/list/index.vue @@ -1,5 +1,5 @@ diff --git a/frontend/components/card/list/item.vue b/frontend/components/card/list/item.vue index d322e0e0..05e611df 100644 --- a/frontend/components/card/list/item.vue +++ b/frontend/components/card/list/item.vue @@ -1,17 +1,17 @@ diff --git a/frontend/components/card/medium.vue b/frontend/components/card/medium.vue index 49b8e4f7..27e0f8cd 100644 --- a/frontend/components/card/medium.vue +++ b/frontend/components/card/medium.vue @@ -21,49 +21,50 @@ diff --git a/frontend/components/card/small.vue b/frontend/components/card/small.vue index 831fdeb0..0fb2929d 100644 --- a/frontend/components/card/small.vue +++ b/frontend/components/card/small.vue @@ -1,18 +1,18 @@ diff --git a/frontend/components/comments/create.vue b/frontend/components/comments/create.vue index 4aeea0a7..156677bd 100644 --- a/frontend/components/comments/create.vue +++ b/frontend/components/comments/create.vue @@ -1,9 +1,12 @@ @@ -35,7 +36,7 @@ const props = defineProps({ }, }) -const data = await $fetch( useApiUrlResolver().resolve('api/comments'), { +const data = await $fetch(useApiUrlResolver().resolve('api/comments'), { query: { object_type: props.objectType, object_uuid: props.objectUUID, diff --git a/frontend/components/comments/item.vue b/frontend/components/comments/item.vue index 09967635..e78dfdbe 100644 --- a/frontend/components/comments/item.vue +++ b/frontend/components/comments/item.vue @@ -2,7 +2,8 @@
- avatar + avatar

@@ -22,15 +23,18 @@

-

{{ props.data.body }}

+

+ {{ props.data.body }}

- +
diff --git a/frontend/components/dashboard/alert.vue b/frontend/components/dashboard/alert.vue index dfafa276..89ec3a76 100644 --- a/frontend/components/dashboard/alert.vue +++ b/frontend/components/dashboard/alert.vue @@ -1,7 +1,7 @@ diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index 241176e9..5fed672e 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -1,13 +1,13 @@ diff --git a/frontend/middleware/auth.global.ts b/frontend/middleware/auth.global.ts index 21ebd413..0808cdc9 100644 --- a/frontend/middleware/auth.global.ts +++ b/frontend/middleware/auth.global.ts @@ -1,9 +1,9 @@ export default defineNuxtRouteMiddleware((to, from) => { - if (! to.path.startsWith("/dashboard")) { + if (!to.path.startsWith("/dashboard")) { return } - if (! useAuth().isLogin()) { + if (!useAuth().isLogin()) { return navigateTo("/auth/login") } }); \ No newline at end of file diff --git a/frontend/pages/articles/[uuid].vue b/frontend/pages/articles/[uuid].vue index fd2d1a9e..8fbb011e 100644 --- a/frontend/pages/articles/[uuid].vue +++ b/frontend/pages/articles/[uuid].vue @@ -1,37 +1,37 @@