Starts Notifications feature. Missing to send email with runtime configs.
This commit is contained in:
@@ -5,26 +5,26 @@
|
||||
'confirmAction' => null,
|
||||
])
|
||||
@if ($type === 'submit')
|
||||
<button {{ $attributes }} type="submit" @if ($disabled !== null) disabled @endif wire:target="submit"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
<button {{ $attributes }} type="submit" @disabled($disabled) wire:target="submit"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@elseif($type === 'button')
|
||||
<button {{ $attributes }} @if ($disabled !== null) disabled @endif type="button"
|
||||
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
<button {{ $attributes }} @disabled($disabled) type="button"
|
||||
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="">
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex flex-col gap-2 xl:flex-row w-96">
|
||||
<x-inputs.input id="settings.extra_attributes.discord_webhook" label="Discord Webhook" />
|
||||
</div>
|
||||
<div>
|
||||
<x-inputs.button class="w-16 mt-4" type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
<x-inputs.button class="mt-4 btn btn-xs no-animation normal-case text-white btn-primary" wire:click="sentTestMessage">
|
||||
Send test message
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="mt-10">
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<div class="flex flex-col w-96">
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_host" label="Host" />
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_port" label="Port" />
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_encryption" label="Encryption" />
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_username" label="Username" />
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_password" label="Password" />
|
||||
<x-inputs.input id="settings.extra_attributes.smtp_timeout" label="Timeout" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<x-inputs.button class="w-16 mt-4" type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
<x-inputs.button class="mt-4 btn btn-xs no-animation normal-case text-white btn-primary" wire:click="sentTestMessage">
|
||||
Send test message
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,4 +1,12 @@
|
||||
<x-layout>
|
||||
<h1>Settings</h1>
|
||||
|
||||
<h3>General</h3>
|
||||
<livewire:settings.form :settings="$settings" />
|
||||
|
||||
<div class="my-12"></div>
|
||||
|
||||
<h3>Notifications</h3>
|
||||
<livewire:settings.discord-notifications :settings="$settings" />
|
||||
<livewire:settings.email-notifications :settings="$settings" />
|
||||
</x-layout>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<x-layout>
|
||||
<div>
|
||||
<h3>Current Team</h3>
|
||||
<p>Name: {{ session('currentTeam')->name }}</p>
|
||||
<livewire:switch-team>
|
||||
<p>Name: {{ session('currentTeam.name') }}</p>
|
||||
<livewire:switch-team/>
|
||||
|
||||
</div>
|
||||
</x-layout>
|
||||
|
||||
Reference in New Issue
Block a user