From af8721cc95fa40851340a4bdc763269953a1864f Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Mon, 18 Nov 2024 23:31:47 +0100 Subject: [PATCH 01/17] improve project settings descriptions --- web/src/assets/locales/en.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 4df57fb0bb..c33ab2a4a0 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -70,8 +70,8 @@ "settings": { "not_allowed": "You are not allowed to access this repository's settings", "general": { - "general": "General", - "project": "Project settings", + "general": "Repository settings", + "project": "General", "save": "Save settings", "success": "Repository settings updated", "pipeline_path": { @@ -82,29 +82,29 @@ }, "allow_pr": { "allow": "Allow Pull Requests", - "desc": "Pipelines can run on pull requests." + "desc": "Allows pipelines to run on pull request events." }, "allow_deploy": { "allow": "Allow deployments", - "desc": "Allow deployments from successful pipelines. Only use if you trust all users with push access." + "desc": "Allow deployments from successful pipelines. Use this option only if you trust all users with push permissions." }, "netrc_only_trusted": { - "netrc_only_trusted": "Only inject netrc credentials into trusted clone plugins", - "desc": "If enabled, git netrc credentials are only available for trusted clone plugins set in `WOODPECKER_PLUGINS_TRUSTED_CLONE`. Otherwise, all clone plugins can use the netrc credentials. This option has no effect on non-clone steps." + "netrc_only_trusted": "Only inject git credentials into trusted clone plugins", + "desc": "When enabled, Git credentials are accessible only to trusted clone plugins specified in WOODPECKER_PLUGINS_TRUSTED_CLONE. Otherwise, custom clone plugins can use git credentials. This setting has no affect on non-clone steps." }, "trusted": { "trusted": "Trusted", "network": { "network": "Network", - "desc": "Underlying pipeline containers get access to network privileges like changing DNS." + "desc": "Pipeline container get access to network privileges like changing DNS." }, "volumes": { "volumes": "Volumes", - "desc": "Underlying pipeline containers get access to volume privileges." + "desc": "Pipeline container are allowed to mount volumes." }, "security": { "security": "Security", - "desc": "Underlying pipeline containers get access to security privileges." + "desc": "Pipeline container get access to security privileges." } }, "visibility": { @@ -128,7 +128,7 @@ }, "cancel_prev": { "cancel": "Cancel previous pipelines", - "desc": "Enable to cancel pending and running pipelines of the same event and context before starting the newly triggered one." + "desc": "Selected event triggers will cancel pending and running pipelines of the same event before starting the most recent one." } }, "crons": { @@ -502,12 +502,12 @@ "access_denied": "You are not allowed to access this instance", "invalid_state": "The OAuth state is invalid", "require_approval": { - "require_approval_for": "Require approval for", - "none": "No approval required", - "none_desc": "This setting can be dangerous and should only be used on private forges where all users are trusted.", - "forks": "Pull request from forked repositories", - "pull_requests": "All pull requests", - "all_events": "All events from forge", - "desc": "Prevent malicious pipelines from exposing secrets or running harmful tasks by approving them before execution." + "desc": "Prevent malicious pipelines from exposing secrets or running harmful tasks by approving them before execution.", + "require_approval_for": "Approval requirements", + "none": "None", + "none_desc": "Any event can trigger builds, including Pull Requests. This setting can be dangerous in public instances and is only recommended for private instances", + "forks": "Pull request from forked repository", + "pull_requests": "Any pull requests", + "all_events": "Any event trigger" } } From 7b44e2e20eae1edeb540870cf2c2334b6fc4f172 Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Tue, 19 Nov 2024 10:49:59 +0100 Subject: [PATCH 02/17] Update web/src/assets/locales/en.json Co-authored-by: Robert Kaussow --- web/src/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index c33ab2a4a0..2a36bcd8ff 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -505,7 +505,7 @@ "desc": "Prevent malicious pipelines from exposing secrets or running harmful tasks by approving them before execution.", "require_approval_for": "Approval requirements", "none": "None", - "none_desc": "Any event can trigger builds, including Pull Requests. This setting can be dangerous in public instances and is only recommended for private instances", + "none_desc": "Every event triggers builds, including pull requests. This setting can be dangerous and is only recommended for private instances.", "forks": "Pull request from forked repository", "pull_requests": "Any pull requests", "all_events": "Any event trigger" From 00d3a34d4f404e70fb89e5907d5f52d9fd4f15a4 Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Tue, 19 Nov 2024 10:50:41 +0100 Subject: [PATCH 03/17] Update web/src/assets/locales/en.json Co-authored-by: Robert Kaussow --- web/src/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 2a36bcd8ff..2b56b6ec2e 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -507,7 +507,7 @@ "none": "None", "none_desc": "Every event triggers builds, including pull requests. This setting can be dangerous and is only recommended for private instances.", "forks": "Pull request from forked repository", - "pull_requests": "Any pull requests", + "pull_requests": "All pull requests", "all_events": "Any event trigger" } } From 28d5452c854ef4d31b85cc7eaff1da7a33464a61 Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Tue, 19 Nov 2024 10:54:07 +0100 Subject: [PATCH 04/17] Update web/src/assets/locales/en.json Co-authored-by: Robert Kaussow --- web/src/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 2b56b6ec2e..890aa46140 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -90,7 +90,7 @@ }, "netrc_only_trusted": { "netrc_only_trusted": "Only inject git credentials into trusted clone plugins", - "desc": "When enabled, Git credentials are accessible only to trusted clone plugins specified in WOODPECKER_PLUGINS_TRUSTED_CLONE. Otherwise, custom clone plugins can use git credentials. This setting has no affect on non-clone steps." + "desc": "When enabled, git credentials are accessible only to trusted clone plugins specified in WOODPECKER_PLUGINS_TRUSTED_CLONE. Otherwise, custom clone plugins can use git credentials. This setting has no affect on non-clone steps." }, "trusted": { "trusted": "Trusted", From 5ee25d378d7fc6acd78e15cc6a67b76038cb3750 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 19 Nov 2024 10:58:05 +0100 Subject: [PATCH 05/17] chore: swap project and general settings in code and align text settings --- web/src/assets/locales/en.json | 4 ++-- web/src/components/repo/settings/GeneralTab.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 890aa46140..86a0b68ec0 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -70,8 +70,8 @@ "settings": { "not_allowed": "You are not allowed to access this repository's settings", "general": { - "general": "Repository settings", - "project": "General", + "general": "General", + "project": "Repository settings", "save": "Save settings", "success": "Repository settings updated", "pipeline_path": { diff --git a/web/src/components/repo/settings/GeneralTab.vue b/web/src/components/repo/settings/GeneralTab.vue index e57bdc1498..4e884d95b6 100644 --- a/web/src/components/repo/settings/GeneralTab.vue +++ b/web/src/components/repo/settings/GeneralTab.vue @@ -1,9 +1,9 @@ diff --git a/web/src/components/layout/scaffold/Tab.vue b/web/src/components/layout/scaffold/Tab.vue index 23acb9799d..3bc833a3ea 100644 --- a/web/src/components/layout/scaffold/Tab.vue +++ b/web/src/components/layout/scaffold/Tab.vue @@ -1,38 +1,40 @@ - + diff --git a/web/src/components/layout/scaffold/Tabs.vue b/web/src/components/layout/scaffold/Tabs.vue index d74cdc0f0e..090389800a 100644 --- a/web/src/components/layout/scaffold/Tabs.vue +++ b/web/src/components/layout/scaffold/Tabs.vue @@ -1,46 +1,27 @@ diff --git a/web/src/compositions/useInjectProvide.ts b/web/src/compositions/useInjectProvide.ts index 5fc7685a8f..949950eaaf 100644 --- a/web/src/compositions/useInjectProvide.ts +++ b/web/src/compositions/useInjectProvide.ts @@ -1,12 +1,17 @@ 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'; + +import type { Tab } from './useTabs'; export interface InjectKeys { repo: Ref; org: Ref; 'org-permissions': Ref; + pipeline: Ref; + 'pipeline-configs': Ref; + tabs: Ref; } export function inject(key: T): InjectKeys[T] { diff --git a/web/src/compositions/useTabs.ts b/web/src/compositions/useTabs.ts index a9538979ad..6f8bb626c1 100644 --- a/web/src/compositions/useTabs.ts +++ b/web/src/compositions/useTabs.ts @@ -1,49 +1,24 @@ -import { inject, onMounted, provide, ref, type Ref } from 'vue'; -import { useRoute } from 'vue-router'; +import { ref } from 'vue'; +import type { RouteLocationRaw } from 'vue-router'; import type { IconNames } from '~/components/atomic/Icon.vue'; +import { inject, provide } from './useInjectProvide'; + export interface Tab { - id: string; + to: RouteLocationRaw; title: string; icon?: IconNames; iconClass?: string; + matchChildren?: boolean; } -export function useTabsProvider({ - activeTab, - disableUrlHashMode, -}: { - activeTab: Ref; - disableUrlHashMode: Ref; -}) { - const route = useRoute(); - +export function useTabsProvider() { const tabs = ref([]); - provide('tabs', tabs); - provide('disable-url-hash-mode', disableUrlHashMode); - provide('active-tab', activeTab); - - onMounted(() => { - if (activeTab.value !== undefined) { - return; - } - - const hashTab = route.hash.replace(/^#/, ''); - - activeTab.value = hashTab || tabs.value[0].id; - }); } export function useTabsClient() { - const tabs = inject>('tabs'); - const disableUrlHashMode = inject>('disable-url-hash-mode'); - const activeTab = inject>('active-tab'); - - if (activeTab === undefined || tabs === undefined || disableUrlHashMode === undefined) { - throw new Error('Please use this "useTabsClient" composition inside a component running "useTabsProvider".'); - } - - return { activeTab, tabs, disableUrlHashMode }; + const tabs = inject('tabs'); + return { tabs }; } diff --git a/web/src/router.ts b/web/src/router.ts index ad807561bb..18d3d1edd0 100644 --- a/web/src/router.ts +++ b/web/src/router.ts @@ -42,29 +42,38 @@ const routes: RouteRecordRaw[] = [ }, { path: 'branches', - name: 'repo-branches', - component: (): Component => import('~/views/repo/RepoBranches.vue'), meta: { repoHeader: true }, + children: [ + { + path: '', + name: 'repo-branches', + component: (): Component => import('~/views/repo/RepoBranches.vue'), + }, + { + path: ':branch', + name: 'repo-branch', + component: (): Component => import('~/views/repo/RepoBranch.vue'), + props: (route) => ({ branch: route.params.branch }), + }, + ], }, - { - path: 'branches/:branch', - name: 'repo-branch', - component: (): Component => import('~/views/repo/RepoBranch.vue'), - meta: { repoHeader: true }, - props: (route) => ({ branch: route.params.branch }), - }, + { path: 'pull-requests', - name: 'repo-pull-requests', - component: (): Component => import('~/views/repo/RepoPullRequests.vue'), - meta: { repoHeader: true }, - }, - { - path: 'pull-requests/:pullRequest', - name: 'repo-pull-request', - component: (): Component => import('~/views/repo/RepoPullRequest.vue'), meta: { repoHeader: true }, - props: (route) => ({ pullRequest: route.params.pullRequest }), + children: [ + { + path: '', + name: 'repo-pull-requests', + component: (): Component => import('~/views/repo/RepoPullRequests.vue'), + }, + { + path: ':pullRequest', + name: 'repo-pull-request', + component: (): Component => import('~/views/repo/RepoPullRequest.vue'), + props: (route) => ({ pullRequest: route.params.pullRequest }), + }, + ], }, { path: 'pipeline/:pipelineId', @@ -98,15 +107,53 @@ const routes: RouteRecordRaw[] = [ path: 'debug', name: 'repo-pipeline-debug', component: (): Component => import('~/views/repo/pipeline/PipelineDebug.vue'), + props: true, }, ], }, { path: 'settings', - name: 'repo-settings', - component: (): Component => import('~/views/repo/RepoSettings.vue'), + component: (): Component => import('~/views/repo/settings/RepoSettings.vue'), meta: { authentication: 'required' }, props: true, + children: [ + { + path: '', + name: 'repo-settings', + component: (): Component => import('~/views/repo/settings/General.vue'), + props: true, + }, + { + path: 'secrets', + name: 'repo-settings-secrets', + component: (): Component => import('~/views/repo/settings/Secrets.vue'), + props: true, + }, + { + path: 'registries', + name: 'repo-settings-registries', + component: (): Component => import('~/views/repo/settings/Registries.vue'), + props: true, + }, + { + path: 'crons', + name: 'repo-settings-crons', + component: (): Component => import('~/views/repo/settings/Crons.vue'), + props: true, + }, + { + path: 'badge', + name: 'repo-settings-badge', + component: (): Component => import('~/views/repo/settings/Badge.vue'), + props: true, + }, + { + path: 'actions', + name: 'repo-settings-actions', + component: (): Component => import('~/views/repo/settings/Actions.vue'), + props: true, + }, + ], }, { path: 'manual', @@ -137,9 +184,29 @@ const routes: RouteRecordRaw[] = [ { path: 'settings', name: 'org-settings', - component: (): Component => import('~/views/org/OrgSettings.vue'), + component: (): Component => import('~/views/org/settings/OrgSettingsWrapper.vue'), meta: { authentication: 'required' }, props: true, + children: [ + { + path: 'secrets', + name: 'org-settings-secrets', + component: (): Component => import('~/views/org/settings/OrgSecrets.vue'), + props: true, + }, + { + path: 'registries', + name: 'org-settings-registries', + component: (): Component => import('~/views/org/settings/OrgRegistries.vue'), + props: true, + }, + { + path: 'agents', + name: 'org-settings-agents', + component: (): Component => import('~/views/org/settings/OrgAgents.vue'), + props: true, + }, + ], }, ], }, @@ -150,18 +217,98 @@ const routes: RouteRecordRaw[] = [ }, { path: `${rootPath}/admin`, - name: 'admin-settings', - component: (): Component => import('~/views/admin/AdminSettings.vue'), + component: (): Component => import('~/views/admin/AdminSettingsWrapper.vue'), props: true, meta: { authentication: 'required' }, + children: [ + { + path: '', + name: 'admin-settings', + component: (): Component => import('~/views/admin/AdminInfo.vue'), + props: true, + }, + { + path: 'secrets', + name: 'admin-settings-secrets', + component: (): Component => import('~/views/admin/AdminSecrets.vue'), + props: true, + }, + { + path: 'registries', + name: 'admin-settings-registries', + component: (): Component => import('~/views/admin/AdminRegistries.vue'), + props: true, + }, + { + path: 'repos', + name: 'admin-settings-repos', + component: (): Component => import('~/views/admin/AdminRepos.vue'), + props: true, + }, + { + path: 'users', + name: 'admin-settings-users', + component: (): Component => import('~/views/admin/AdminUsers.vue'), + props: true, + }, + { + path: 'orgs', + name: 'admin-settings-orgs', + component: (): Component => import('~/views/admin/AdminOrgs.vue'), + props: true, + }, + { + path: 'agents', + name: 'admin-settings-agents', + component: (): Component => import('~/views/admin/AdminAgents.vue'), + props: true, + }, + { + path: 'queue', + name: 'admin-settings-queue', + component: (): Component => import('~/views/admin/AdminQueue.vue'), + props: true, + }, + ], }, { path: `${rootPath}/user`, - name: 'user', - component: (): Component => import('~/views/User.vue'), + component: (): Component => import('~/views/user/UserWrapper.vue'), meta: { authentication: 'required' }, props: true, + children: [ + { + path: '', + name: 'user', + component: (): Component => import('~/views/user/UserGeneral.vue'), + props: true, + }, + { + path: 'secrets', + name: 'user-secrets', + component: (): Component => import('~/views/user/UserSecrets.vue'), + props: true, + }, + { + path: 'registries', + name: 'user-registries', + component: (): Component => import('~/views/user/UserRegistries.vue'), + props: true, + }, + { + path: 'cli-and-api', + name: 'user-cli-and-api', + component: (): Component => import('~/views/user/UserCLIAndAPI.vue'), + props: true, + }, + { + path: 'agents', + name: 'user-agents', + component: (): Component => import('~/views/user/UserAgents.vue'), + props: true, + }, + ], }, { path: `${rootPath}/login`, diff --git a/web/src/views/User.vue b/web/src/views/User.vue deleted file mode 100644 index 14a5ad934a..0000000000 --- a/web/src/views/User.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/web/src/components/admin/settings/AdminAgentsTab.vue b/web/src/views/admin/AdminAgents.vue similarity index 100% rename from web/src/components/admin/settings/AdminAgentsTab.vue rename to web/src/views/admin/AdminAgents.vue diff --git a/web/src/components/admin/settings/AdminInfoTab.vue b/web/src/views/admin/AdminInfo.vue similarity index 100% rename from web/src/components/admin/settings/AdminInfoTab.vue rename to web/src/views/admin/AdminInfo.vue diff --git a/web/src/components/admin/settings/AdminOrgsTab.vue b/web/src/views/admin/AdminOrgs.vue similarity index 100% rename from web/src/components/admin/settings/AdminOrgsTab.vue rename to web/src/views/admin/AdminOrgs.vue diff --git a/web/src/components/admin/settings/AdminQueueTab.vue b/web/src/views/admin/AdminQueue.vue similarity index 98% rename from web/src/components/admin/settings/AdminQueueTab.vue rename to web/src/views/admin/AdminQueue.vue index 4469fb3b05..660fe34c17 100644 --- a/web/src/components/admin/settings/AdminQueueTab.vue +++ b/web/src/views/admin/AdminQueue.vue @@ -78,6 +78,7 @@ import { computed, onBeforeUnmount, onMounted, ref } from 'vue'; import { useI18n } from 'vue-i18n'; +import AdminQueueStats from '~/components/admin/settings/queue/AdminQueueStats.vue'; import Badge from '~/components/atomic/Badge.vue'; import Button from '~/components/atomic/Button.vue'; import Icon from '~/components/atomic/Icon.vue'; @@ -87,8 +88,6 @@ import useApiClient from '~/compositions/useApiClient'; import useNotifications from '~/compositions/useNotifications'; import type { QueueInfo } from '~/lib/api/types'; -import AdminQueueStats from './queue/AdminQueueStats.vue'; - const apiClient = useApiClient(); const notifications = useNotifications(); const { t } = useI18n(); diff --git a/web/src/components/admin/settings/AdminRegistriesTab.vue b/web/src/views/admin/AdminRegistries.vue similarity index 100% rename from web/src/components/admin/settings/AdminRegistriesTab.vue rename to web/src/views/admin/AdminRegistries.vue diff --git a/web/src/components/admin/settings/AdminReposTab.vue b/web/src/views/admin/AdminRepos.vue similarity index 100% rename from web/src/components/admin/settings/AdminReposTab.vue rename to web/src/views/admin/AdminRepos.vue diff --git a/web/src/components/admin/settings/AdminSecretsTab.vue b/web/src/views/admin/AdminSecrets.vue similarity index 100% rename from web/src/components/admin/settings/AdminSecretsTab.vue rename to web/src/views/admin/AdminSecrets.vue diff --git a/web/src/views/admin/AdminSettings.vue b/web/src/views/admin/AdminSettings.vue deleted file mode 100644 index 3ff1d36af4..0000000000 --- a/web/src/views/admin/AdminSettings.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/web/src/views/admin/AdminSettingsWrapper.vue b/web/src/views/admin/AdminSettingsWrapper.vue new file mode 100644 index 0000000000..da9a0c44b9 --- /dev/null +++ b/web/src/views/admin/AdminSettingsWrapper.vue @@ -0,0 +1,40 @@ + + + diff --git a/web/src/components/admin/settings/AdminUsersTab.vue b/web/src/views/admin/AdminUsers.vue similarity index 100% rename from web/src/components/admin/settings/AdminUsersTab.vue rename to web/src/views/admin/AdminUsers.vue diff --git a/web/src/views/org/OrgRepos.vue b/web/src/views/org/OrgRepos.vue index 84aeec8b96..0c895ac23b 100644 --- a/web/src/views/org/OrgRepos.vue +++ b/web/src/views/org/OrgRepos.vue @@ -8,7 +8,7 @@ diff --git a/web/src/views/org/OrgWrapper.vue b/web/src/views/org/OrgWrapper.vue index 3ba7bfc863..a73099603e 100644 --- a/web/src/views/org/OrgWrapper.vue +++ b/web/src/views/org/OrgWrapper.vue @@ -7,7 +7,7 @@ - - - - - - - - - - - + + + + + @@ -32,9 +30,6 @@ import { useRouter } from 'vue-router'; import Scaffold from '~/components/layout/scaffold/Scaffold.vue'; import Tab from '~/components/layout/scaffold/Tab.vue'; -import OrgAgentsTab from '~/components/org/settings/OrgAgentsTab.vue'; -import OrgRegistriesTab from '~/components/org/settings/OrgRegistriesTab.vue'; -import OrgSecretsTab from '~/components/org/settings/OrgSecretsTab.vue'; import useConfig from '~/compositions/useConfig'; import { inject } from '~/compositions/useInjectProvide'; import useNotifications from '~/compositions/useNotifications'; diff --git a/web/src/views/repo/RepoWrapper.vue b/web/src/views/repo/RepoWrapper.vue index a6a798566c..522dbe411f 100644 --- a/web/src/views/repo/RepoWrapper.vue +++ b/web/src/views/repo/RepoWrapper.vue @@ -1,10 +1,5 @@ @@ -44,12 +34,6 @@ import { useRouter } from 'vue-router'; import Scaffold from '~/components/layout/scaffold/Scaffold.vue'; import Tab from '~/components/layout/scaffold/Tab.vue'; -import ActionsTab from '~/components/repo/settings/ActionsTab.vue'; -import BadgeTab from '~/components/repo/settings/BadgeTab.vue'; -import CronTab from '~/components/repo/settings/CronTab.vue'; -import GeneralTab from '~/components/repo/settings/GeneralTab.vue'; -import RegistriesTab from '~/components/repo/settings/RegistriesTab.vue'; -import SecretsTab from '~/components/repo/settings/SecretsTab.vue'; import useNotifications from '~/compositions/useNotifications'; import { useRouteBack } from '~/compositions/useRouteBack'; import type { Repo, RepoPermissions } from '~/lib/api/types'; diff --git a/web/src/components/repo/settings/SecretsTab.vue b/web/src/views/repo/settings/Secrets.vue similarity index 100% rename from web/src/components/repo/settings/SecretsTab.vue rename to web/src/views/repo/settings/Secrets.vue diff --git a/web/src/components/user/UserAgentsTab.vue b/web/src/views/user/UserAgents.vue similarity index 100% rename from web/src/components/user/UserAgentsTab.vue rename to web/src/views/user/UserAgents.vue diff --git a/web/src/components/user/UserCLIAndAPITab.vue b/web/src/views/user/UserCLIAndAPI.vue similarity index 100% rename from web/src/components/user/UserCLIAndAPITab.vue rename to web/src/views/user/UserCLIAndAPI.vue diff --git a/web/src/components/user/UserGeneralTab.vue b/web/src/views/user/UserGeneral.vue similarity index 100% rename from web/src/components/user/UserGeneralTab.vue rename to web/src/views/user/UserGeneral.vue diff --git a/web/src/components/user/UserRegistriesTab.vue b/web/src/views/user/UserRegistries.vue similarity index 100% rename from web/src/components/user/UserRegistriesTab.vue rename to web/src/views/user/UserRegistries.vue diff --git a/web/src/components/user/UserSecretsTab.vue b/web/src/views/user/UserSecrets.vue similarity index 100% rename from web/src/components/user/UserSecretsTab.vue rename to web/src/views/user/UserSecrets.vue diff --git a/web/src/views/user/UserWrapper.vue b/web/src/views/user/UserWrapper.vue new file mode 100644 index 0000000000..43cf4afd22 --- /dev/null +++ b/web/src/views/user/UserWrapper.vue @@ -0,0 +1,27 @@ + + + From 0216955002c42f4f92d761e0c573cfb9be7e26a5 Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Tue, 19 Nov 2024 20:30:05 +0100 Subject: [PATCH 09/17] Update web/src/assets/locales/en.json Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com> --- web/src/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 750505f7f0..f4b2c09bcf 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -505,7 +505,7 @@ "desc": "Prevent malicious pipelines from exposing secrets or running harmful tasks by approving them before execution.", "require_approval_for": "Approval requirements", "none": "None", - "none_desc": "Every event triggers builds, including pull requests. This setting can be dangerous and is only recommended for private instances.", + "none_desc": "Every event triggers pipelines, including pull requests. This setting can be dangerous and is only recommended for private instances.", "forks": "Pull request from forked repository", "pull_requests": "All pull requests", "all_events": "Any event trigger" From 86d43bcfdc65558001c7fbf45a494bfa7ac2434c Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 19 Nov 2024 20:29:40 +0100 Subject: [PATCH 10/17] chore: plural --- web/src/assets/locales/en.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index f4b2c09bcf..2424d7fc52 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -96,15 +96,15 @@ "trusted": "Trusted", "network": { "network": "Network", - "desc": "Pipeline container get access to network privileges like changing DNS." + "desc": "Pipeline containers get access to network privileges like changing DNS." }, "volumes": { "volumes": "Volumes", - "desc": "Pipeline container are allowed to mount volumes." + "desc": "Pipeline containers are allowed to mount volumes." }, "security": { "security": "Security", - "desc": "Pipeline container get access to security privileges." + "desc": "Pipeline containers get access to security privileges." } }, "visibility": { From 3157dd4cf86d0406ee0d3b94814265cc2c2237a4 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 19 Nov 2024 20:36:13 +0100 Subject: [PATCH 11/17] netrc -> git --- cli/lint/lint.go | 2 +- cmd/server/flags.go | 2 +- docs/docs/20-usage/75-project-settings.md | 6 +++--- docs/docs/30-administration/10-server-config.md | 4 ++-- .../version-1.0/20-usage/71-project-settings.md | 2 +- .../version-2.5/20-usage/75-project-settings.md | 2 +- .../version-2.6/20-usage/75-project-settings.md | 2 +- .../version-2.7/20-usage/75-project-settings.md | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cli/lint/lint.go b/cli/lint/lint.go index d28a860336..3872ef0930 100644 --- a/cli/lint/lint.go +++ b/cli/lint/lint.go @@ -45,7 +45,7 @@ var Command = &cli.Command{ &cli.StringSliceFlag{ Sources: cli.EnvVars("WOODPECKER_PLUGINS_TRUSTED_CLONE"), Name: "plugins-trusted-clone", - Usage: "Plugins which are trusted to handle the netrc info in clone steps", + Usage: "Plugins which are trusted to handle Git credentials in clone steps", Value: constant.TrustedClonePlugins, }, &cli.BoolFlag{ diff --git a/cmd/server/flags.go b/cmd/server/flags.go index 6ef1f37f0e..86f7a9abb7 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -192,7 +192,7 @@ var flags = append([]cli.Flag{ &cli.StringSliceFlag{ Sources: cli.EnvVars("WOODPECKER_PLUGINS_TRUSTED_CLONE"), Name: "plugins-trusted-clone", - Usage: "Plugins which are trusted to handle the netrc info in clone steps", + Usage: "Plugins which are trusted to handle Git credentials in clone steps", Value: constant.TrustedClonePlugins, }, &cli.StringSliceFlag{ diff --git a/docs/docs/20-usage/75-project-settings.md b/docs/docs/20-usage/75-project-settings.md index 26f2c0a1fd..c15bba2eca 100644 --- a/docs/docs/20-usage/75-project-settings.md +++ b/docs/docs/20-usage/75-project-settings.md @@ -39,12 +39,12 @@ Only server admins can set this option. If you are not a server admin this optio ::: -## Only inject netrc credentials into trusted clone plugins +## Only inject Git credentials into trusted clone plugins -The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. +The clone step may require Git credentials (e.g. for private repos) which are injected via `netrc`. By default, they are only injected into trusted clone plugins listed in the env var `WOODPECKER_PLUGINS_TRUSTED_CLONE`. -If this option is disabled, the git credentials are injected into every clone plugin, regardless of whether it is trusted or not. +If this option is disabled, the Git credentials are injected into every clone plugin, regardless of whether it is trusted or not. :::note This option has no effect on steps other than the clone step. diff --git a/docs/docs/30-administration/10-server-config.md b/docs/docs/30-administration/10-server-config.md index 2556ef664d..902edf82c2 100644 --- a/docs/docs/30-administration/10-server-config.md +++ b/docs/docs/30-administration/10-server-config.md @@ -396,8 +396,8 @@ You should specify the tag of your images too, as this enforces exact matches. > Defaults are defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/main/shared/constant/constant.go) -Plugins which are trusted to handle the netrc info in clone steps. -If a clone step use an image not in this list, the netrc will not be injected and an user has to use other methods (e.g. secrets) to clone non public repos. +Plugins which are trusted to handle the Git credential info in clone steps. +If a clone step use an image not in this list, Git credentials will not be injected and users have to use other methods (e.g. secrets) to clone non-public repos. You should specify the tag of your images too, as this enforces exact matches. diff --git a/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md b/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md index ef2d85d520..10b0b0301a 100644 --- a/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md +++ b/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md @@ -33,7 +33,7 @@ Only server admins can set this option. If you are not a server admin this optio ::: -### Only inject netrc credentials into trusted clone plugins +### Only inject Git credentials into trusted clone plugins The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. diff --git a/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md index e9b21c0ad7..9dcb9c9b62 100644 --- a/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md @@ -40,7 +40,7 @@ Only server admins can set this option. If you are not a server admin this optio ::: -## Only inject netrc credentials into trusted clone plugins +## Only inject Git credentials into trusted clone plugins The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. diff --git a/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md index e9b21c0ad7..9dcb9c9b62 100644 --- a/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md @@ -40,7 +40,7 @@ Only server admins can set this option. If you are not a server admin this optio ::: -## Only inject netrc credentials into trusted clone plugins +## Only inject Git credentials into trusted clone plugins The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. diff --git a/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md index e9b21c0ad7..9dcb9c9b62 100644 --- a/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md @@ -40,7 +40,7 @@ Only server admins can set this option. If you are not a server admin this optio ::: -## Only inject netrc credentials into trusted clone plugins +## Only inject Git credentials into trusted clone plugins The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. From 05db1e04385a6e6314888a149b02565a5eeb6030 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 19 Nov 2024 20:38:56 +0100 Subject: [PATCH 12/17] chore: quote deployment --- web/src/assets/locales/en.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 2424d7fc52..93bd526ebe 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -42,8 +42,8 @@ "show_pipelines": "Show pipelines" }, "deploy_pipeline": { - "title": "Trigger deployment event for current pipeline #{pipelineId}", - "enter_target": "Target deployment environment", + "title": "Trigger a 'deployment' event for current pipeline #{pipelineId}", + "enter_target": "Target 'deployment' environment", "enter_task": "Deployment task", "trigger": "Deploy", "variables": { @@ -85,7 +85,7 @@ "desc": "Allow pipelines to run on pull requests." }, "allow_deploy": { - "allow": "Allow deployments", + "allow": "Allow 'deployment' events.", "desc": "Permit 'deployment' runs for successful pipelines. All users with with push permissions can trigger these, so use with caution." }, "netrc_only_trusted": { From 7b025b190be9f48046addd1782ab6cd318f557b3 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 19 Nov 2024 20:40:29 +0100 Subject: [PATCH 13/17] chore: use 'project' again --- web/src/assets/locales/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 93bd526ebe..b972f9cf2e 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -71,9 +71,9 @@ "not_allowed": "You are not allowed to access this repository's settings", "general": { "general": "General", - "project": "Repository settings", + "project": "Project settings", "save": "Save settings", - "success": "Repository settings updated", + "success": "Project settings updated", "pipeline_path": { "path": "Pipeline path", "default": "By default: .woodpecker/*.{'{yaml,yml}'} -> .woodpecker.yaml -> .woodpecker.yml", From 06f222cf243ba9d504a0fd93a80e39b64152a304 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 20 Nov 2024 23:36:22 +0100 Subject: [PATCH 14/17] . --- web/src/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 9cd7512740..8b4624e97b 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -310,7 +310,7 @@ "placeholder": "Stop agent from taking new tasks" }, "token": "Token", - "platform": {gg + "platform": { "platform": "Platform", "badge": "platform" }, From 1e30e65efd639001d765d19d900043696d3e00f6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 21 Nov 2024 21:14:45 +0100 Subject: [PATCH 15/17] pin node to 23.1 --- .woodpecker/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/docs.yaml b/.woodpecker/docs.yaml index bc2849f058..a43b073ce5 100644 --- a/.woodpecker/docs.yaml +++ b/.woodpecker/docs.yaml @@ -1,6 +1,6 @@ variables: - &golang_image 'docker.io/golang:1.23' - - &node_image 'docker.io/node:23-alpine' + - &node_image 'docker.io/node:23.1-alpine' - &alpine_image 'docker.io/alpine:3.20' - path: &when_path - 'docs/**' From 4c433acfcd8b9278ffcf010a953ebb3312df2f92 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 22 Nov 2024 08:59:05 +0100 Subject: [PATCH 16/17] uppercase Git --- .../version-1.0/20-usage/71-project-settings.md | 4 ++-- .../version-2.5/20-usage/75-project-settings.md | 4 ++-- .../version-2.6/20-usage/75-project-settings.md | 4 ++-- .../version-2.7/20-usage/75-project-settings.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md b/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md index 10b0b0301a..6626cf1a32 100644 --- a/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md +++ b/docs/versioned_docs/version-1.0/20-usage/71-project-settings.md @@ -35,10 +35,10 @@ Only server admins can set this option. If you are not a server admin this optio ### Only inject Git credentials into trusted clone plugins -The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. +The clone step may require Git credentials (e.g. for private repos) which are injected via `netrc`. By default, they are only injected into trusted clone plugins listed in the env var `WOODPECKER_PLUGINS_TRUSTED_CLONE`. -If this option is disabled, the git credentials are injected into every clone plugin, regardless of whether it is trusted or not. +If this option is disabled, the Git credentials are injected into every clone plugin, regardless of whether it is trusted or not. :::note This option has no effect on steps other than the clone step. diff --git a/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md index 9dcb9c9b62..d57b3a9323 100644 --- a/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.5/20-usage/75-project-settings.md @@ -42,10 +42,10 @@ Only server admins can set this option. If you are not a server admin this optio ## Only inject Git credentials into trusted clone plugins -The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. +The clone step may require Git credentials (e.g. for private repos) which are injected via `netrc`. By default, they are only injected into trusted clone plugins listed in the env var `WOODPECKER_PLUGINS_TRUSTED_CLONE`. -If this option is disabled, the git credentials are injected into every clone plugin, regardless of whether it is trusted or not. +If this option is disabled, the Git credentials are injected into every clone plugin, regardless of whether it is trusted or not. :::note This option has no effect on steps other than the clone step. diff --git a/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md index 9dcb9c9b62..d57b3a9323 100644 --- a/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.6/20-usage/75-project-settings.md @@ -42,10 +42,10 @@ Only server admins can set this option. If you are not a server admin this optio ## Only inject Git credentials into trusted clone plugins -The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. +The clone step may require Git credentials (e.g. for private repos) which are injected via `netrc`. By default, they are only injected into trusted clone plugins listed in the env var `WOODPECKER_PLUGINS_TRUSTED_CLONE`. -If this option is disabled, the git credentials are injected into every clone plugin, regardless of whether it is trusted or not. +If this option is disabled, the Git credentials are injected into every clone plugin, regardless of whether it is trusted or not. :::note This option has no effect on steps other than the clone step. diff --git a/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md b/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md index 9dcb9c9b62..d57b3a9323 100644 --- a/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md +++ b/docs/versioned_docs/version-2.7/20-usage/75-project-settings.md @@ -42,10 +42,10 @@ Only server admins can set this option. If you are not a server admin this optio ## Only inject Git credentials into trusted clone plugins -The clone step may require git credentials (e.g. for private repos) which are injected via `netrc`. +The clone step may require Git credentials (e.g. for private repos) which are injected via `netrc`. By default, they are only injected into trusted clone plugins listed in the env var `WOODPECKER_PLUGINS_TRUSTED_CLONE`. -If this option is disabled, the git credentials are injected into every clone plugin, regardless of whether it is trusted or not. +If this option is disabled, the Git credentials are injected into every clone plugin, regardless of whether it is trusted or not. :::note This option has no effect on steps other than the clone step. From 2f3d63ff68f072847f7738ee7bbc129ca5794c3e Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Fri, 22 Nov 2024 09:10:47 +0100 Subject: [PATCH 17/17] Update .woodpecker/docs.yaml Co-authored-by: Robert Kaussow --- .woodpecker/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/docs.yaml b/.woodpecker/docs.yaml index a43b073ce5..bc2849f058 100644 --- a/.woodpecker/docs.yaml +++ b/.woodpecker/docs.yaml @@ -1,6 +1,6 @@ variables: - &golang_image 'docker.io/golang:1.23' - - &node_image 'docker.io/node:23.1-alpine' + - &node_image 'docker.io/node:23-alpine' - &alpine_image 'docker.io/alpine:3.20' - path: &when_path - 'docs/**'