mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 21:22:34 +00:00
Create settings-panel vue component and use InputFields (#2177)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
<template>
|
||||
<Panel>
|
||||
<div class="flex flex-row border-b mb-4 pb-4 items-center dark:border-wp-background-100">
|
||||
<div class="ml-2">
|
||||
<h1 class="text-xl text-wp-text-100">{{ $t('admin.settings.agents.agents') }}</h1>
|
||||
<p class="text-sm text-wp-text-alt-100">{{ $t('admin.settings.agents.desc') }}</p>
|
||||
</div>
|
||||
<Settings :title="$t('admin.settings.agents.agents')" :desc="$t('admin.settings.agents.desc')">
|
||||
<template #titleActions>
|
||||
<Button
|
||||
v-if="selectedAgent"
|
||||
class="ml-auto"
|
||||
:text="$t('admin.settings.agents.show')"
|
||||
start-icon="back"
|
||||
@click="selectedAgent = undefined"
|
||||
/>
|
||||
<Button v-else class="ml-auto" :text="$t('admin.settings.agents.add')" start-icon="plus" @click="showAddAgent" />
|
||||
</div>
|
||||
<Button v-else :text="$t('admin.settings.agents.add')" start-icon="plus" @click="showAddAgent" />
|
||||
</template>
|
||||
|
||||
<div v-if="!selectedAgent" class="space-y-4 text-wp-text-100">
|
||||
<ListItem
|
||||
@@ -122,7 +117,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</Panel>
|
||||
</Settings>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -137,7 +132,7 @@ import ListItem from '~/components/atomic/ListItem.vue';
|
||||
import Checkbox from '~/components/form/Checkbox.vue';
|
||||
import InputField from '~/components/form/InputField.vue';
|
||||
import TextField from '~/components/form/TextField.vue';
|
||||
import Panel from '~/components/layout/Panel.vue';
|
||||
import Settings from '~/components/layout/Settings.vue';
|
||||
import useApiClient from '~/compositions/useApiClient';
|
||||
import { useAsyncAction } from '~/compositions/useAsyncAction';
|
||||
import useNotifications from '~/compositions/useNotifications';
|
||||
|
Reference in New Issue
Block a user