-
- {{ `${repo.owner} / ${repo.name}` }}
-
+
+
{{ $t('repo.user_none') }}
@@ -28,19 +26,25 @@
import { computed, onMounted, ref } from 'vue';
import IconButton from '~/components/atomic/IconButton.vue';
-import ListItem from '~/components/atomic/ListItem.vue';
import Scaffold from '~/components/layout/scaffold/Scaffold.vue';
+import RepoItem from '~/components/repo/RepoItem.vue';
import { inject } from '~/compositions/useInjectProvide';
+import useRepos from '~/compositions/useRepos';
import { useRepoSearch } from '~/compositions/useRepoSearch';
import { useRepoStore } from '~/store/repos';
const repoStore = useRepoStore();
+const { repoWithLastPipeline } = useRepos();
const org = inject('org');
const orgPermissions = inject('org-permissions');
const search = ref('');
-const repos = computed(() => Array.from(repoStore.repos.values()).filter((repo) => repo.org_id === org.value?.id));
+const repos = computed(() =>
+ Array.from(repoStore.repos.values())
+ .filter((repo) => repo.org_id === org.value?.id)
+ .map(repoWithLastPipeline),
+);
const { searchedRepos } = useRepoSearch(repos, search);
onMounted(async () => {
diff --git a/web/src/views/repo/RepoWrapper.vue b/web/src/views/repo/RepoWrapper.vue
index 522dbe411..b387bc20f 100644
--- a/web/src/views/repo/RepoWrapper.vue
+++ b/web/src/views/repo/RepoWrapper.vue
@@ -67,6 +67,7 @@ import useAuthentication from '~/compositions/useAuthentication';
import useConfig from '~/compositions/useConfig';
import { useForgeStore } from '~/compositions/useForgeStore';
import useNotifications from '~/compositions/useNotifications';
+import useRepos from '~/compositions/useRepos';
import type { Forge, RepoPermissions } from '~/lib/api/types';
import { usePipelineStore } from '~/store/pipelines';
import { useRepoStore } from '~/store/repos';
@@ -87,6 +88,7 @@ const router = useRouter();
const i18n = useI18n();
const config = useConfig();
const forgeStore = useForgeStore();
+const { updateLastAccess } = useRepos();
const repo = repoStore.getRepo(repositoryId);
const repoPermissions = ref();
@@ -121,6 +123,7 @@ async function loadRepo() {
if (repo.value) {
forge.value = (await forgeStore.getForge(repo.value?.forge_id)).value;
}
+ updateLastAccess(repositoryId.value);
}
onMounted(() => {
diff --git a/web/src/views/repo/settings/Badge.vue b/web/src/views/repo/settings/Badge.vue
index 0ace5d1bb..b7171a66c 100644
--- a/web/src/views/repo/settings/Badge.vue
+++ b/web/src/views/repo/settings/Badge.vue
@@ -55,7 +55,7 @@ import type { Repo } from '~/lib/api/types';
const apiClient = useApiClient();
const repo = inject[>('repo');
-const badgeType = useStorage('last-badge-type', 'markdown');
+const badgeType = useStorage('woodpecker:last-badge-type', 'markdown');
if (!repo) {
throw new Error('Unexpected: "repo" should be provided at this place');
diff --git a/web/src/views/repo/settings/General.vue b/web/src/views/repo/settings/General.vue
index e57bdc149..f6e148fa3 100644
--- a/web/src/views/repo/settings/General.vue
+++ b/web/src/views/repo/settings/General.vue
@@ -74,10 +74,7 @@
-
+
@@ -215,18 +212,18 @@ onMounted(() => {
const projectVisibilityOptions: RadioOption[] = [
{
value: RepoVisibility.Public,
- text: i18n.t('repo.settings.general.visibility.public.public'),
- description: i18n.t('repo.settings.general.visibility.public.desc'),
+ text: i18n.t('repo.visibility.public.public'),
+ description: i18n.t('repo.visibility.public.desc'),
},
{
value: RepoVisibility.Internal,
- text: i18n.t('repo.settings.general.visibility.internal.internal'),
- description: i18n.t('repo.settings.general.visibility.internal.desc'),
+ text: i18n.t('repo.visibility.internal.internal'),
+ description: i18n.t('repo.visibility.internal.desc'),
},
{
value: RepoVisibility.Private,
- text: i18n.t('repo.settings.general.visibility.private.private'),
- description: i18n.t('repo.settings.general.visibility.private.desc'),
+ text: i18n.t('repo.visibility.private.private'),
+ description: i18n.t('repo.visibility.private.desc'),
},
];
diff --git a/web/src/views/user/UserGeneral.vue b/web/src/views/user/UserGeneral.vue
index fea7cc833..f46dc44d6 100644
--- a/web/src/views/user/UserGeneral.vue
+++ b/web/src/views/user/UserGeneral.vue
@@ -18,7 +18,7 @@
]