From ae1cfd2ecd545d36e2bad7630d73cbb5c7782ae0 Mon Sep 17 00:00:00 2001 From: Anbraten <6918444+anbraten@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:11:34 +0200 Subject: [PATCH] cleanup --- web/components.d.ts | 1 - web/src/components/repo/settings/SecretsTab.vue | 3 +-- web/src/compositions/usePaginate.ts | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/web/components.d.ts b/web/components.d.ts index 88110bfc2..e8e2e378f 100644 --- a/web/components.d.ts +++ b/web/components.d.ts @@ -85,7 +85,6 @@ declare module 'vue' { Navbar: typeof import('./src/components/layout/header/Navbar.vue')['default'] NumberField: typeof import('./src/components/form/NumberField.vue')['default'] OrgSecretsTab: typeof import('./src/components/org/settings/OrgSecretsTab.vue')['default'] - Pagination: typeof import('./src/components/layout/Pagination.vue')['default'] Panel: typeof import('./src/components/layout/Panel.vue')['default'] PipelineFeedItem: typeof import('./src/components/pipeline-feed/PipelineFeedItem.vue')['default'] PipelineFeedSidebar: typeof import('./src/components/pipeline-feed/PipelineFeedSidebar.vue')['default'] diff --git a/web/src/components/repo/settings/SecretsTab.vue b/web/src/components/repo/settings/SecretsTab.vue index c2a546f6c..9f17a2f9f 100644 --- a/web/src/components/repo/settings/SecretsTab.vue +++ b/web/src/components/repo/settings/SecretsTab.vue @@ -81,11 +81,10 @@ async function loadSecrets(page: number, level: 'repo' | 'org' | 'global'): Prom } } -const secretsPagination = usePagination(loadSecrets, () => !selectedSecret.value, { +const { resetPage, data: _secrets } = usePagination(loadSecrets, () => !selectedSecret.value, { each: ['repo', 'org', 'global'], pageSize: 50, }); -const { resetPage, data: _secrets } = secretsPagination; const secrets = computed(() => { const secretsList: Record = {}; diff --git a/web/src/compositions/usePaginate.ts b/web/src/compositions/usePaginate.ts index d582e5f5f..c09c8100a 100644 --- a/web/src/compositions/usePaginate.ts +++ b/web/src/compositions/usePaginate.ts @@ -44,8 +44,6 @@ export function usePagination( data.value.push(...newData); } - console.log('loadData', each.value?.[0], page.value); - // last page and each has more if (!hasMore.value && each.value.length > 0) { // use next each element