Skip to content

Commit d2f5d76

Browse files
authored
feat: clarity notification usage (alexjustesen#2458)
1 parent addd40b commit d2f5d76

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

app/Filament/Pages/Settings/Notification.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,26 @@ public function form(Schema $schema): Schema
147147
Toggle::make('webhook_enabled')
148148
->label(__('general.enable'))
149149
->live(),
150-
151150
Grid::make([
152151
'default' => 1,
153152
])
154153
->hidden(fn (Get $get) => $get('webhook_enabled') !== true)
155154
->schema([
155+
SimpleAlert::make('wehbook_info')
156+
->title(__('settings/notifications.webhook_hint'))
157+
->description(__('settings/notifications.webhook_hint_description'))
158+
->border()
159+
->warning()
160+
->actions([
161+
Action::make('webhook_docs')
162+
->label('View documentation')
163+
->icon('heroicon-m-arrow-long-right')
164+
->link()
165+
->url('https://docs.speedtest-tracker.dev/settings/notifications/webhook')
166+
->openUrlInNewTab()
167+
->color('warning'),
168+
])
169+
->columnSpanFull(),
156170
Fieldset::make(__('settings.triggers'))
157171
->columns(1)
158172
->schema([

lang/en/settings/notifications.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
'webhook_on_speedtest_run' => 'Notify on every speedtest run',
2525
'webhook_on_threshold_failure' => 'Notify on threshold failures',
2626
'test_webhook_channel' => 'Test webhook channel',
27+
'webhook_hint' => 'Payload documentation',
28+
'webhook_hint_description' => 'These are generic webhooks. For payload examples and implementation details, view the documentation.',
2729

2830
// Common notification messages
2931
'notify_on_every_speedtest_run' => 'Notify on every speedtest run',

0 commit comments

Comments
 (0)