refactor(frontend): use form primitives in WebhookManager
This commit is contained in:
parent
cab970b59b
commit
b9f6eabe2c
|
|
@ -6,6 +6,7 @@ import WebhookModel from '@/models/webhook'
|
||||||
import BaseButton from '@/components/base/BaseButton.vue'
|
import BaseButton from '@/components/base/BaseButton.vue'
|
||||||
import FancyCheckbox from '@/components/input/FancyCheckbox.vue'
|
import FancyCheckbox from '@/components/input/FancyCheckbox.vue'
|
||||||
import FormField from '@/components/input/FormField.vue'
|
import FormField from '@/components/input/FormField.vue'
|
||||||
|
import FormInput from '@/components/input/FormInput.vue'
|
||||||
import Expandable from '@/components/base/Expandable.vue'
|
import Expandable from '@/components/base/Expandable.vue'
|
||||||
import User from '@/components/misc/User.vue'
|
import User from '@/components/misc/User.vue'
|
||||||
import {formatDateShort} from '@/helpers/time/formatDate'
|
import {formatDateShort} from '@/helpers/time/formatDate'
|
||||||
|
|
@ -116,27 +117,20 @@ function doDelete() {
|
||||||
:error="webhookTargetUrlValid ? null : $t('project.webhooks.targetUrlInvalid')"
|
:error="webhookTargetUrlValid ? null : $t('project.webhooks.targetUrlInvalid')"
|
||||||
@focusout="validateTargetUrl"
|
@focusout="validateTargetUrl"
|
||||||
/>
|
/>
|
||||||
<div class="field">
|
<FormField :label="$t('project.webhooks.secret')">
|
||||||
<label
|
<template #default="{id}">
|
||||||
class="label"
|
<FormInput
|
||||||
for="secret"
|
:id="id"
|
||||||
>
|
|
||||||
{{ $t('project.webhooks.secret') }}
|
|
||||||
</label>
|
|
||||||
<div class="control">
|
|
||||||
<input
|
|
||||||
id="secret"
|
|
||||||
v-model="newWebhook.secret"
|
v-model="newWebhook.secret"
|
||||||
class="input"
|
/>
|
||||||
>
|
</template>
|
||||||
</div>
|
</FormField>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
{{ $t('project.webhooks.secretHint') }}
|
{{ $t('project.webhooks.secretHint') }}
|
||||||
<BaseButton href="https://vikunja.io/docs/webhooks/">
|
<BaseButton href="https://vikunja.io/docs/webhooks/">
|
||||||
{{ $t('project.webhooks.secretDocs') }}
|
{{ $t('project.webhooks.secretDocs') }}
|
||||||
</BaseButton>
|
</BaseButton>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
<BaseButton
|
<BaseButton
|
||||||
class="mbe-2 has-text-primary"
|
class="mbe-2 has-text-primary"
|
||||||
@click="showBasicAuth = !showBasicAuth"
|
@click="showBasicAuth = !showBasicAuth"
|
||||||
|
|
@ -147,36 +141,22 @@ function doDelete() {
|
||||||
:open="showBasicAuth"
|
:open="showBasicAuth"
|
||||||
class="content"
|
class="content"
|
||||||
>
|
>
|
||||||
<div class="field">
|
<FormField :label="$t('project.webhooks.basicauthuser')">
|
||||||
<label
|
<template #default="{id}">
|
||||||
class="label"
|
<FormInput
|
||||||
for="basicauthuser"
|
:id="id"
|
||||||
>
|
|
||||||
{{ $t('project.webhooks.basicauthuser') }}
|
|
||||||
</label>
|
|
||||||
<div class="control">
|
|
||||||
<input
|
|
||||||
id="basicauthuser"
|
|
||||||
v-model="newWebhook.basicauthuser"
|
v-model="newWebhook.basicauthuser"
|
||||||
class="input"
|
/>
|
||||||
>
|
</template>
|
||||||
</div>
|
</FormField>
|
||||||
</div>
|
<FormField :label="$t('project.webhooks.basicauthpassword')">
|
||||||
<div class="field">
|
<template #default="{id}">
|
||||||
<label
|
<FormInput
|
||||||
class="label"
|
:id="id"
|
||||||
for="basicauthpassword"
|
|
||||||
>
|
|
||||||
{{ $t('project.webhooks.basicauthpassword') }}
|
|
||||||
</label>
|
|
||||||
<div class="control">
|
|
||||||
<input
|
|
||||||
id="basicauthpassword"
|
|
||||||
v-model="newWebhook.basicauthpassword"
|
v-model="newWebhook.basicauthpassword"
|
||||||
class="input"
|
/>
|
||||||
>
|
</template>
|
||||||
</div>
|
</FormField>
|
||||||
</div>
|
|
||||||
</Expandable>
|
</Expandable>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label
|
<label
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue