feat: user webhooks system settings

This commit is contained in:
Timothy Jaeryang Baek
2025-03-30 21:31:16 -07:00
parent d55735dc1e
commit 33f93371dc
5 changed files with 38 additions and 14 deletions

View File

@@ -609,6 +609,14 @@
<Switch bind:state={adminConfig.ENABLE_CHANNELS} />
</div>
<div class="mb-2.5 flex w-full items-center justify-between pr-2">
<div class=" self-center text-xs font-medium">
{$i18n.t('User Webhooks')}
</div>
<Switch bind:state={adminConfig.ENABLE_USER_WEBHOOKS} />
</div>
<div class="mb-2.5 w-full justify-between">
<div class="flex w-full justify-between">
<div class=" self-center text-xs font-medium">{$i18n.t('WebUI URL')}</div>

View File

@@ -245,21 +245,23 @@
</div>
</div>
<div class="pt-2">
<div class="flex flex-col w-full">
<div class=" mb-1 text-xs font-medium">{$i18n.t('Notification Webhook')}</div>
{#if $config?.features?.enable_user_webhooks}
<div class="pt-2">
<div class="flex flex-col w-full">
<div class=" mb-1 text-xs font-medium">{$i18n.t('Notification Webhook')}</div>
<div class="flex-1">
<input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-hidden"
type="url"
placeholder={$i18n.t('Enter your webhook URL')}
bind:value={webhookUrl}
required
/>
<div class="flex-1">
<input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-hidden"
type="url"
placeholder={$i18n.t('Enter your webhook URL')}
bind:value={webhookUrl}
required
/>
</div>
</div>
</div>
</div>
{/if}
</div>
<div class="py-0.5">