Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion app/Filament/Pages/Settings/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,26 @@ public function form(Schema $schema): Schema
Toggle::make('webhook_enabled')
->label(__('general.enable'))
->live(),

Grid::make([
'default' => 1,
])
->hidden(fn (Get $get) => $get('webhook_enabled') !== true)
->schema([
SimpleAlert::make('wehbook_info')
->title(__('settings/notifications.webhook_hint'))
->description(__('settings/notifications.webhook_hint_description'))
->border()
->warning()
->actions([
Action::make('webhook_docs')
->label('View documentation')
->icon('heroicon-m-arrow-long-right')
->link()
->url('https://docs.speedtest-tracker.dev/settings/notifications/webhook')
->openUrlInNewTab()
->color('warning'),
])
->columnSpanFull(),
Fieldset::make(__('settings.triggers'))
->columns(1)
->schema([
Expand Down
2 changes: 2 additions & 0 deletions lang/en/settings/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
'webhook_on_speedtest_run' => 'Notify on every speedtest run',
'webhook_on_threshold_failure' => 'Notify on threshold failures',
'test_webhook_channel' => 'Test webhook channel',
'webhook_hint' => 'Payload documentation',
'webhook_hint_description' => 'These are generic webhooks. For payload examples and implementation details, view the documentation.',

// Common notification messages
'notify_on_every_speedtest_run' => 'Notify on every speedtest run',
Expand Down