Add cancel button on secrets tab (#1599)

This commit is contained in:
Hayden 2023-03-04 03:03:35 -09:00 committed by GitHub
parent a2f226f7f9
commit 0148151f3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 0 deletions

View file

@ -1,4 +1,5 @@
{
"cancel": "Cancel",
"login": "Login",
"welcome": "Welcome to Woodpecker",
"repos": "Repos",

View file

@ -40,6 +40,7 @@
i18n-prefix="admin.settings.secrets."
:is-saving="isSaving"
@save="createSecret"
@cancel="selectedSecret = undefined"
/>
</Panel>
</template>

View file

@ -33,6 +33,7 @@
i18n-prefix="org.settings.secrets."
:is-saving="isSaving"
@save="createSecret"
@cancel="selectedSecret = undefined"
/>
</Panel>
</template>

View file

@ -33,6 +33,7 @@
i18n-prefix="repo.settings.secrets."
:is-saving="isSaving"
@save="createSecret"
@cancel="selectedSecret = undefined"
/>
</Panel>
</template>

View file

@ -24,6 +24,7 @@
<CheckboxesField v-model="innerValue.event" :options="secretEventsOptions" />
</InputField>
<Button type="button" color="gray" :text="$t('cancel')" @click="$emit('cancel')" />
<Button
type="submit"
color="green"
@ -54,6 +55,7 @@ const props = defineProps<{
const emit = defineEmits<{
(event: 'update:modelValue', value: Partial<Secret> | undefined): void;
(event: 'save', value: Partial<Secret>): void;
(event: 'cancel'): void;
}>();
const i18n = useI18n();