-
-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
242 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<Settings :title="$t('admin.settings.repos.repos')" :desc="$t('admin.settings.repos.desc')"> | ||
<div class="space-y-4 text-wp-text-100"> | ||
<ListItem | ||
v-for="repo in repos" | ||
:key="repo.id" | ||
class="items-center gap-2 !bg-wp-background-200 !dark:bg-wp-background-100" | ||
> | ||
<span>{{ repo.full_name }}</span> | ||
<div class="ml-auto flex items-center"> | ||
<Badge v-if="!repo.active" class="<md:hidden mr-2" :label="$t('admin.settings.repos.disabled')" /> | ||
<IconButton | ||
icon="chevron-right" | ||
:title="$t('admin.settings.repos.view')" | ||
class="w-8 h-8" | ||
:to="{ name: 'repo', params: { repoId: repo.id } }" | ||
/> | ||
<IconButton | ||
icon="settings" | ||
:title="$t('admin.settings.repos.settings')" | ||
class="w-8 h-8" | ||
:to="{ name: 'repo-settings', params: { repoId: repo.id } }" | ||
/> | ||
</div> | ||
</ListItem> | ||
|
||
<div v-if="repos?.length === 0" class="ml-2">{{ $t('admin.settings.orgs.none') }}</div> | ||
</div> | ||
</Settings> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import Badge from '~/components/atomic/Badge.vue'; | ||
import IconButton from '~/components/atomic/IconButton.vue'; | ||
import ListItem from '~/components/atomic/ListItem.vue'; | ||
import Settings from '~/components/layout/Settings.vue'; | ||
import useApiClient from '~/compositions/useApiClient'; | ||
import { usePagination } from '~/compositions/usePaginate'; | ||
import { Repo } from '~/lib/api/types'; | ||
const apiClient = useApiClient(); | ||
async function loadRepos(page: number): Promise<Repo[] | null> { | ||
return apiClient.getAllRepos(page); | ||
} | ||
const { data: repos } = usePagination(loadRepos); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters