mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-06-03 05:59:30 +00:00
Make submit buttons green and add forms (#1302)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
parent
186aee61cf
commit
a441281bf9
|
@ -1,48 +1,50 @@
|
||||||
<template>
|
<template>
|
||||||
<Popup :open="open" @close="$emit('close')">
|
<Popup :open="open" @close="$emit('close')">
|
||||||
<Panel v-if="!loading">
|
<Panel v-if="!loading">
|
||||||
<span class="text-xl text-color">{{ $t('repo.manual_pipeline.title') }}</span>
|
<form @submit.prevent="triggerManualPipeline">
|
||||||
<InputField :label="$t('repo.manual_pipeline.select_branch')">
|
<span class="text-xl text-color">{{ $t('repo.manual_pipeline.title') }}</span>
|
||||||
<SelectField
|
<InputField :label="$t('repo.manual_pipeline.select_branch')">
|
||||||
v-model="payload.branch"
|
<SelectField
|
||||||
:options="branches"
|
v-model="payload.branch"
|
||||||
required
|
:options="branches"
|
||||||
class="dark:bg-dark-gray-700 bg-transparent text-color border-gray-200 dark:border-dark-400"
|
required
|
||||||
/>
|
class="dark:bg-dark-gray-700 bg-transparent text-color border-gray-200 dark:border-dark-400"
|
||||||
</InputField>
|
/>
|
||||||
<InputField :label="$t('repo.manual_pipeline.variables.title')">
|
</InputField>
|
||||||
<span class="text-sm text-color-alt mb-2">{{ $t('repo.manual_pipeline.variables.desc') }}</span>
|
<InputField :label="$t('repo.manual_pipeline.variables.title')">
|
||||||
<div class="flex flex-col gap-2">
|
<span class="text-sm text-color-alt mb-2">{{ $t('repo.manual_pipeline.variables.desc') }}</span>
|
||||||
<div v-for="(value, name) in payload.variables" :key="name" class="flex gap-4">
|
<div class="flex flex-col gap-2">
|
||||||
<TextField :model-value="name" disabled />
|
<div v-for="(value, name) in payload.variables" :key="name" class="flex gap-4">
|
||||||
<TextField :model-value="value" disabled />
|
<TextField :model-value="name" disabled />
|
||||||
<div class="w-34 flex-shrink-0">
|
<TextField :model-value="value" disabled />
|
||||||
<Button type="submit" class="ml-auto" @click="deleteVar(name)">
|
<div class="w-34 flex-shrink-0">
|
||||||
<i-la-times />
|
<Button color="red" class="ml-auto" @click="deleteVar(name)">
|
||||||
</Button>
|
<i-la-times />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<form class="flex gap-4" @submit.prevent="addPipelineVariable">
|
||||||
|
<TextField
|
||||||
|
v-model="newPipelineVariable.name"
|
||||||
|
:placeholder="$t('repo.manual_pipeline.variables.name')"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<TextField
|
||||||
|
v-model="newPipelineVariable.value"
|
||||||
|
:placeholder="$t('repo.manual_pipeline.variables.value')"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
class="w-34 flex-shrink-0"
|
||||||
|
start-icon="plus"
|
||||||
|
type="submit"
|
||||||
|
:text="$t('repo.manual_pipeline.variables.add')"
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<form class="flex gap-4" @submit.prevent="addPipelineVariable">
|
</InputField>
|
||||||
<TextField
|
<Button type="submit" :text="$t('repo.manual_pipeline.trigger')" />
|
||||||
v-model="newPipelineVariable.name"
|
</form>
|
||||||
:placeholder="$t('repo.manual_pipeline.variables.name')"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<TextField
|
|
||||||
v-model="newPipelineVariable.value"
|
|
||||||
:placeholder="$t('repo.manual_pipeline.variables.value')"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
class="w-34 flex-shrink-0"
|
|
||||||
start-icon="plus"
|
|
||||||
type="submit"
|
|
||||||
:text="$t('repo.manual_pipeline.variables.add')"
|
|
||||||
/>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</InputField>
|
|
||||||
<Button type="submit" :text="$t('repo.manual_pipeline.trigger')" @click="triggerManualPipeline" />
|
|
||||||
</Panel>
|
</Panel>
|
||||||
</Popup>
|
</Popup>
|
||||||
</template>
|
</template>
|
||||||
|
@ -51,6 +53,7 @@
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import Button from '~/components/atomic/Button.vue';
|
||||||
import InputField from '~/components/form/InputField.vue';
|
import InputField from '~/components/form/InputField.vue';
|
||||||
import SelectField from '~/components/form/SelectField.vue';
|
import SelectField from '~/components/form/SelectField.vue';
|
||||||
import TextField from '~/components/form/TextField.vue';
|
import TextField from '~/components/form/TextField.vue';
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
color="green"
|
||||||
:is-loading="isSaving"
|
:is-loading="isSaving"
|
||||||
:text="isEditingCron ? $t('repo.settings.crons.save') : $t('repo.settings.crons.add')"
|
:text="isEditingCron ? $t('repo.settings.crons.save') : $t('repo.settings.crons.add')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<h1 class="text-xl ml-2 text-color">{{ $t('repo.settings.general.general') }}</h1>
|
<h1 class="text-xl ml-2 text-color">{{ $t('repo.settings.general.general') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="repoSettings" class="flex flex-col">
|
<form v-if="repoSettings" class="flex flex-col" @submit.prevent="saveRepoSettings">
|
||||||
<InputField
|
<InputField
|
||||||
docs-url="docs/usage/project-settings#pipeline-path"
|
docs-url="docs/usage/project-settings#pipeline-path"
|
||||||
:label="$t('repo.settings.general.pipeline_path.path')"
|
:label="$t('repo.settings.general.pipeline_path.path')"
|
||||||
|
@ -72,13 +72,13 @@
|
||||||
</InputField>
|
</InputField>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
type="submit"
|
||||||
class="mr-auto"
|
class="mr-auto"
|
||||||
color="green"
|
color="green"
|
||||||
:is-loading="isSaving"
|
:is-loading="isSaving"
|
||||||
:text="$t('repo.settings.general.save')"
|
:text="$t('repo.settings.general.save')"
|
||||||
@click="saveRepoSettings"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</form>
|
||||||
</Panel>
|
</Panel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
color="green"
|
||||||
:is-loading="isSaving"
|
:is-loading="isSaving"
|
||||||
:text="isEditingRegistry ? $t('repo.settings.registries.save') : $t('repo.settings.registries.add')"
|
:text="isEditingRegistry ? $t('repo.settings.registries.save') : $t('repo.settings.registries.add')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -23,8 +23,9 @@
|
||||||
</InputField>
|
</InputField>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
:is-loading="isSaving"
|
|
||||||
type="submit"
|
type="submit"
|
||||||
|
color="green"
|
||||||
|
:is-loading="isSaving"
|
||||||
:text="isEditingSecret ? $t(i18nPrefix + 'save') : $t(i18nPrefix + 'add')"
|
:text="isEditingSecret ? $t(i18nPrefix + 'save') : $t(i18nPrefix + 'add')"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
v-if="repoPermissions.push"
|
v-if="repoPermissions.push"
|
||||||
type="submit"
|
|
||||||
:text="$t('repo.manual_pipeline.trigger')"
|
:text="$t('repo.manual_pipeline.trigger')"
|
||||||
class="ml-auto"
|
class="ml-auto"
|
||||||
@click="showManualPipelinePopup = true"
|
@click="showManualPipelinePopup = true"
|
||||||
|
|
Loading…
Reference in a new issue