From 37a14182c06f5b6071096b1cb0a3e355cfb387e0 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 20 Oct 2023 00:02:01 +0200 Subject: [PATCH] add: approval section in control panel --- locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + .../src/components/SkApprovalUser.vue | 114 ++++++++++++++++++ .../frontend/src/pages/admin/approvals.vue | 72 +++++++++++ packages/frontend/src/pages/admin/index.vue | 7 +- packages/frontend/src/router.ts | 4 + 6 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 packages/frontend/src/components/SkApprovalUser.vue create mode 100644 packages/frontend/src/pages/admin/approvals.vue diff --git a/locales/index.d.ts b/locales/index.d.ts index 6745be3a752f..abb8ceedd8ab 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -37,6 +37,7 @@ export interface Locale { "uploading": string; "save": string; "users": string; + "approvals": string; "addUser": string; "favorite": string; "favorites": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 26b46dd413cb..ef30d7a1fc94 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -34,6 +34,7 @@ signup: "新規登録" uploading: "アップロード中" save: "保存" users: "ユーザー" +approvals: "承認" addUser: "ユーザーを追加" favorite: "お気に入り" favorites: "お気に入り" diff --git a/packages/frontend/src/components/SkApprovalUser.vue b/packages/frontend/src/components/SkApprovalUser.vue new file mode 100644 index 000000000000..332997ca6b63 --- /dev/null +++ b/packages/frontend/src/components/SkApprovalUser.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/packages/frontend/src/pages/admin/approvals.vue b/packages/frontend/src/pages/admin/approvals.vue new file mode 100644 index 000000000000..a326e15ef701 --- /dev/null +++ b/packages/frontend/src/pages/admin/approvals.vue @@ -0,0 +1,72 @@ + + + + + + + diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index 83b02006687e..7b99ec5e1244 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.noMaintainerInformationWarning }} {{ i18n.ts.configure }} {{ i18n.ts.noBotProtectionWarning }} {{ i18n.ts.configure }} {{ i18n.ts.noEmailServerWarning }} {{ i18n.ts.configure }} - {{ i18n.ts.pendingUserApprovals }} {{ i18n.ts.check }} + {{ i18n.ts.pendingUserApprovals }} {{ i18n.ts.check }} @@ -114,6 +114,11 @@ const menuDef = computed(() => [{ text: i18n.ts.invite, to: '/admin/invites', active: currentPage.value?.route.name === 'invites', + }, { + icon: 'ti ti-check', + text: i18n.ts.approvals, + to: '/admin/approvals', + active: currentPage.value?.route.name === 'approvals', }, { icon: 'ti ti-badges', text: i18n.ts.roles, diff --git a/packages/frontend/src/router.ts b/packages/frontend/src/router.ts index baee85866cfc..cb214ac87b98 100644 --- a/packages/frontend/src/router.ts +++ b/packages/frontend/src/router.ts @@ -459,6 +459,10 @@ export const routes = [{ path: '/invites', name: 'invites', component: page(() => import('./pages/admin/invites.vue')), + }, { + path: '/approvals', + name: 'approvals', + component: page(() => import('./pages/admin/approvals.vue')), }, { path: '/', component: page(() => import('./pages/_empty_.vue')),