From 5af0359725e70cc6345745d8c17aaddf69b1c725 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Sat, 2 Nov 2024 16:15:34 +0200 Subject: [PATCH 01/10] Use separate routes instead of anchors --- web/src/components/layout/header/Navbar.vue | 9 +- web/src/router.ts | 148 +++++++++++++++++- web/src/views/User.vue | 35 ----- .../admin/AdminAgents.vue} | 0 .../admin/AdminInfo.vue} | 0 .../admin/AdminOrgs.vue} | 0 .../admin/AdminQueue.vue} | 3 +- .../admin/AdminRegistries.vue} | 0 .../admin/AdminRepos.vue} | 0 .../admin/AdminSecrets.vue} | 0 web/src/views/admin/AdminSettings.vue | 67 -------- web/src/views/admin/AdminSettingsWrapper.vue | 92 +++++++++++ .../admin/AdminUsers.vue} | 0 web/src/views/org/OrgRepos.vue | 2 +- web/src/views/org/OrgWrapper.vue | 2 +- .../org/settings/OrgAgents.vue} | 0 .../org/settings/OrgRegistries.vue} | 0 .../org/settings/OrgSecrets.vue} | 0 .../OrgSettingsWrapper.vue} | 50 ++++-- web/src/views/repo/RepoWrapper.vue | 2 +- .../repo/settings/Actions.vue} | 0 .../repo/settings/Badge.vue} | 0 .../repo/settings/Crons.vue} | 0 .../repo/settings/General.vue} | 0 .../repo/settings/Registries.vue} | 0 .../repo/{ => settings}/RepoSettings.vue | 75 +++++---- .../repo/settings/Secrets.vue} | 0 .../user/UserAgents.vue} | 0 .../user/UserCLIAndAPI.vue} | 0 .../user/UserGeneral.vue} | 0 .../user/UserRegistries.vue} | 0 .../user/UserSecrets.vue} | 0 web/src/views/user/UserWrapper.vue | 60 +++++++ 33 files changed, 389 insertions(+), 156 deletions(-) delete mode 100644 web/src/views/User.vue rename web/src/{components/admin/settings/AdminAgentsTab.vue => views/admin/AdminAgents.vue} (100%) rename web/src/{components/admin/settings/AdminInfoTab.vue => views/admin/AdminInfo.vue} (100%) rename web/src/{components/admin/settings/AdminOrgsTab.vue => views/admin/AdminOrgs.vue} (100%) rename web/src/{components/admin/settings/AdminQueueTab.vue => views/admin/AdminQueue.vue} (98%) rename web/src/{components/admin/settings/AdminRegistriesTab.vue => views/admin/AdminRegistries.vue} (100%) rename web/src/{components/admin/settings/AdminReposTab.vue => views/admin/AdminRepos.vue} (100%) rename web/src/{components/admin/settings/AdminSecretsTab.vue => views/admin/AdminSecrets.vue} (100%) delete mode 100644 web/src/views/admin/AdminSettings.vue create mode 100644 web/src/views/admin/AdminSettingsWrapper.vue rename web/src/{components/admin/settings/AdminUsersTab.vue => views/admin/AdminUsers.vue} (100%) rename web/src/{components/org/settings/OrgAgentsTab.vue => views/org/settings/OrgAgents.vue} (100%) rename web/src/{components/org/settings/OrgRegistriesTab.vue => views/org/settings/OrgRegistries.vue} (100%) rename web/src/{components/org/settings/OrgSecretsTab.vue => views/org/settings/OrgSecrets.vue} (100%) rename web/src/views/org/{OrgSettings.vue => settings/OrgSettingsWrapper.vue} (53%) rename web/src/{components/repo/settings/ActionsTab.vue => views/repo/settings/Actions.vue} (100%) rename web/src/{components/repo/settings/BadgeTab.vue => views/repo/settings/Badge.vue} (100%) rename web/src/{components/repo/settings/CronTab.vue => views/repo/settings/Crons.vue} (100%) rename web/src/{components/repo/settings/GeneralTab.vue => views/repo/settings/General.vue} (100%) rename web/src/{components/repo/settings/RegistriesTab.vue => views/repo/settings/Registries.vue} (100%) rename web/src/views/repo/{ => settings}/RepoSettings.vue (53%) rename web/src/{components/repo/settings/SecretsTab.vue => views/repo/settings/Secrets.vue} (100%) rename web/src/{components/user/UserAgentsTab.vue => views/user/UserAgents.vue} (100%) rename web/src/{components/user/UserCLIAndAPITab.vue => views/user/UserCLIAndAPI.vue} (100%) rename web/src/{components/user/UserGeneralTab.vue => views/user/UserGeneral.vue} (100%) rename web/src/{components/user/UserRegistriesTab.vue => views/user/UserRegistries.vue} (100%) rename web/src/{components/user/UserSecretsTab.vue => views/user/UserSecrets.vue} (100%) create mode 100644 web/src/views/user/UserWrapper.vue diff --git a/web/src/components/layout/header/Navbar.vue b/web/src/components/layout/header/Navbar.vue index 59a869ba75..c578f672f7 100644 --- a/web/src/components/layout/header/Navbar.vue +++ b/web/src/components/layout/header/Navbar.vue @@ -20,7 +20,7 @@
- +
- +
- + - + diff --git a/web/src/views/repo/settings/RepoSettings.vue b/web/src/views/repo/settings/RepoSettings.vue index dda94087cb..b033027425 100644 --- a/web/src/views/repo/settings/RepoSettings.vue +++ b/web/src/views/repo/settings/RepoSettings.vue @@ -16,12 +16,12 @@ - - - - - - + + + + + + diff --git a/web/src/views/user/UserWrapper.vue b/web/src/views/user/UserWrapper.vue index 9e446f4afa..ac70ae85a9 100644 --- a/web/src/views/user/UserWrapper.vue +++ b/web/src/views/user/UserWrapper.vue @@ -3,11 +3,11 @@ - - - - - + + + + + From 1f09f76f2d7cc3e2897de45f4a7afe28ecc6fd40 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 8 Nov 2024 14:22:02 +0200 Subject: [PATCH 04/10] format --- web/src/components/layout/scaffold/Scaffold.vue | 1 - web/src/components/layout/scaffold/Tabs.vue | 1 - web/src/compositions/useTabs.ts | 4 ++-- web/src/views/user/UserWrapper.vue | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/web/src/components/layout/scaffold/Scaffold.vue b/web/src/components/layout/scaffold/Scaffold.vue index cdd1eea246..c6fee08248 100644 --- a/web/src/components/layout/scaffold/Scaffold.vue +++ b/web/src/components/layout/scaffold/Scaffold.vue @@ -18,7 +18,6 @@ From fe9c0eced8d9982c3235d82ab8a4298eefc89f5e Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Mon, 18 Nov 2024 16:32:51 +0200 Subject: [PATCH 06/10] No unnecessary route names --- web/src/components/layout/header/Navbar.vue | 4 ++-- web/src/router.ts | 9 +++------ web/src/views/admin/AdminSettingsWrapper.vue | 2 +- web/src/views/repo/RepoWrapper.vue | 2 +- web/src/views/repo/settings/RepoSettings.vue | 2 +- web/src/views/user/UserWrapper.vue | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/web/src/components/layout/header/Navbar.vue b/web/src/components/layout/header/Navbar.vue index 733d27ddd4..73dbf3553c 100644 --- a/web/src/components/layout/header/Navbar.vue +++ b/web/src/components/layout/header/Navbar.vue @@ -23,7 +23,7 @@ v-if="user?.admin" class="navbar-icon relative" :title="$t('settings')" - :to="{ name: 'admin-settings-info' }" + :to="{ name: 'admin-settings' }" > - + diff --git a/web/src/views/repo/settings/RepoSettings.vue b/web/src/views/repo/settings/RepoSettings.vue index 537af21cb4..05c826a7ae 100644 --- a/web/src/views/repo/settings/RepoSettings.vue +++ b/web/src/views/repo/settings/RepoSettings.vue @@ -16,12 +16,12 @@ - - - - - - + + + + + + diff --git a/web/src/views/user/UserWrapper.vue b/web/src/views/user/UserWrapper.vue index e5e2bc30f0..43cf4afd22 100644 --- a/web/src/views/user/UserWrapper.vue +++ b/web/src/views/user/UserWrapper.vue @@ -3,11 +3,15 @@ - - - - - + + + + + From e6bfeb745d8893c307185bd932bfd015e92ff505 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Mon, 18 Nov 2024 17:46:28 +0200 Subject: [PATCH 08/10] fix chevron --- web/src/components/layout/scaffold/Tabs.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/layout/scaffold/Tabs.vue b/web/src/components/layout/scaffold/Tabs.vue index fb42fd4e1c..090389800a 100644 --- a/web/src/components/layout/scaffold/Tabs.vue +++ b/web/src/components/layout/scaffold/Tabs.vue @@ -3,13 +3,13 @@ - + From 53e39e5b5426042cccd97de2d2cb05fa4640573d Mon Sep 17 00:00:00 2001 From: Anbraten Date: Tue, 19 Nov 2024 11:43:05 +0100 Subject: [PATCH 09/10] fix route and inject / provide --- web/src/compositions/useInjectProvide.ts | 4 +++- web/src/router.ts | 1 + .../views/repo/pipeline/PipelineConfig.vue | 19 ++++++++++--------- .../views/repo/pipeline/PipelineWrapper.vue | 5 +++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/web/src/compositions/useInjectProvide.ts b/web/src/compositions/useInjectProvide.ts index 5fc7685a8f..f2d4e46535 100644 --- a/web/src/compositions/useInjectProvide.ts +++ b/web/src/compositions/useInjectProvide.ts @@ -1,12 +1,14 @@ import type { InjectionKey, Ref } from 'vue'; import { inject as vueInject, provide as vueProvide } from 'vue'; -import type { Org, OrgPermissions, Repo } from '~/lib/api/types'; +import type { Org, OrgPermissions, Pipeline, PipelineConfig, Repo } from '~/lib/api/types'; export interface InjectKeys { repo: Ref; org: Ref; 'org-permissions': Ref; + pipeline: Ref; + 'pipeline-configs': Ref; } export function inject(key: T): InjectKeys[T] { diff --git a/web/src/router.ts b/web/src/router.ts index d36b4cce3c..18d3d1edd0 100644 --- a/web/src/router.ts +++ b/web/src/router.ts @@ -107,6 +107,7 @@ const routes: RouteRecordRaw[] = [ path: 'debug', name: 'repo-pipeline-debug', component: (): Component => import('~/views/repo/pipeline/PipelineDebug.vue'), + props: true, }, ], }, diff --git a/web/src/views/repo/pipeline/PipelineConfig.vue b/web/src/views/repo/pipeline/PipelineConfig.vue index d77c1d6d07..982f5e37bc 100644 --- a/web/src/views/repo/pipeline/PipelineConfig.vue +++ b/web/src/views/repo/pipeline/PipelineConfig.vue @@ -1,7 +1,7 @@