From 6a683744297544900367a9d5e2b025d4441ad537 Mon Sep 17 00:00:00 2001 From: Dmitry Shurco Date: Fri, 5 Jul 2024 17:20:39 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20storage=20for=20proj?= =?UTF-8?q?ects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Breadcrumbs/server-name.vue | 8 +- src/components/Pagination/index.vue | 2 +- src/pages/profile/keys/index.vue | 2 +- src/pages/profile/logs.vue | 2 +- src/pages/projects/_projectId/index.vue | 72 ++++++++--- .../projects/_projectId/members/index.vue | 2 +- .../projects/_projectId/members/invites.vue | 2 +- .../_projectId/servers/_serverId/activity.vue | 8 +- .../_projectId/servers/_serverId/destroy.vue | 8 +- .../_projectId/servers/_serverId/firewall.vue | 10 +- .../_projectId/servers/_serverId/index.vue | 8 +- .../_serverId/members/_memberId/index.vue | 8 +- .../servers/_serverId/members/add.vue | 10 +- .../servers/_serverId/members/index.vue | 10 +- .../servers/_serverId/session/_sessionId.vue | 8 +- .../servers/_serverId/session/index.vue | 8 +- .../_projectId/servers/_serverId/setting.vue | 10 +- .../projects/_projectId/servers/index.vue | 2 +- src/pages/projects/index.vue | 2 +- src/proto/project.ts | 51 ++++++-- src/store/index.ts | 6 +- src/store/modules/auth.ts | 4 +- src/store/modules/project.ts | 120 ++++++++++++++++++ src/store/modules/server.ts | 73 ----------- src/utils/time.ts | 4 +- 25 files changed, 271 insertions(+), 169 deletions(-) create mode 100644 src/store/modules/project.ts delete mode 100644 src/store/modules/server.ts diff --git a/src/components/Breadcrumbs/server-name.vue b/src/components/Breadcrumbs/server-name.vue index 2ad1399..056e715 100644 --- a/src/components/Breadcrumbs/server-name.vue +++ b/src/components/Breadcrumbs/server-name.vue @@ -1,14 +1,14 @@ diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 732b440..9eead36 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -39,7 +39,7 @@ const getQuery = (page: number) => ({ offset: (page - 1) * limit.value }); -const onSelectPage = (query: Record): void => { +const onSelectPage = (query: Record): void => { emits("selectPage", query); }; diff --git a/src/pages/profile/keys/index.vue b/src/pages/profile/keys/index.vue index 1d78071..4338637 100644 --- a/src/pages/profile/keys/index.vue +++ b/src/pages/profile/keys/index.vue @@ -96,7 +96,7 @@ const getData = async (routeQuery: any): Promise => { } }; -const onSelectPage = (e: unknown): void => { +const onSelectPage = (e: any): void => { getData(e); }; diff --git a/src/pages/profile/logs.vue b/src/pages/profile/logs.vue index d9986b8..c81512f 100644 --- a/src/pages/profile/logs.vue +++ b/src/pages/profile/logs.vue @@ -128,7 +128,7 @@ const getData = async (routeQuery?: any): Promise => { } }; -const onSelectPage = (e: unknown): void => { +const onSelectPage = (e: any): void => { getData(e); }; diff --git a/src/pages/projects/_projectId/index.vue b/src/pages/projects/_projectId/index.vue index 8ab2811..27e38f5 100644 --- a/src/pages/projects/_projectId/index.vue +++ b/src/pages/projects/_projectId/index.vue @@ -1,22 +1,35 @@ + + diff --git a/src/pages/projects/_projectId/members/index.vue b/src/pages/projects/_projectId/members/index.vue index 02329eb..dcd3350 100644 --- a/src/pages/projects/_projectId/members/index.vue +++ b/src/pages/projects/_projectId/members/index.vue @@ -124,7 +124,7 @@ const getData = async (routeQuery: any): Promise => { } }; -const onSelectPage = (e: unknown): void => { +const onSelectPage = (e: any): void => { getData(e); }; diff --git a/src/pages/projects/_projectId/members/invites.vue b/src/pages/projects/_projectId/members/invites.vue index 742b852..5a82924 100644 --- a/src/pages/projects/_projectId/members/invites.vue +++ b/src/pages/projects/_projectId/members/invites.vue @@ -106,7 +106,7 @@ const getData = async (routeQuery: any): Promise => { } }; -const onSelectPage = (e: unknown): void => { +const onSelectPage = (e: any): void => { getData(e); }; diff --git a/src/pages/projects/_projectId/servers/_serverId/activity.vue b/src/pages/projects/_projectId/servers/_serverId/activity.vue index c811b3d..786a3ed 100644 --- a/src/pages/projects/_projectId/servers/_serverId/activity.vue +++ b/src/pages/projects/_projectId/servers/_serverId/activity.vue @@ -6,7 +6,7 @@ Servers - +
Time at which access to the server is possible
@@ -68,7 +68,7 @@ diff --git a/src/pages/projects/_projectId/servers/_serverId/destroy.vue b/src/pages/projects/_projectId/servers/_serverId/destroy.vue index 482974a..fbeee43 100644 --- a/src/pages/projects/_projectId/servers/_serverId/destroy.vue +++ b/src/pages/projects/_projectId/servers/_serverId/destroy.vue @@ -6,7 +6,7 @@ Servers - + @@ -26,7 +26,7 @@ diff --git a/src/pages/projects/_projectId/servers/_serverId/firewall.vue b/src/pages/projects/_projectId/servers/_serverId/firewall.vue index 46f2f44..8faa796 100644 --- a/src/pages/projects/_projectId/servers/_serverId/firewall.vue +++ b/src/pages/projects/_projectId/servers/_serverId/firewall.vue @@ -6,7 +6,7 @@ Servers - +
In addition to creating your own, some add-ons come with their own.
@@ -99,7 +99,7 @@ diff --git a/src/pages/projects/_projectId/servers/_serverId/index.vue b/src/pages/projects/_projectId/servers/_serverId/index.vue index b633fe8..d778521 100644 --- a/src/pages/projects/_projectId/servers/_serverId/index.vue +++ b/src/pages/projects/_projectId/servers/_serverId/index.vue @@ -6,7 +6,7 @@ Servers - +
@@ -17,13 +17,13 @@ diff --git a/src/pages/projects/_projectId/servers/_serverId/members/_memberId/index.vue b/src/pages/projects/_projectId/servers/_serverId/members/_memberId/index.vue index a439828..347a416 100644 --- a/src/pages/projects/_projectId/servers/_serverId/members/_memberId/index.vue +++ b/src/pages/projects/_projectId/servers/_serverId/members/_memberId/index.vue @@ -7,7 +7,7 @@