Skip to content

Commit 68517d0

Browse files
authored
Moved webhooks docs alert (alexjustesen#2460)
Co-authored-by: Alex Justesen <[email protected]>
1 parent d2f5d76 commit 68517d0

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

app/Filament/Pages/Settings/Notification.php

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,29 +144,31 @@ public function form(Schema $schema): Schema
144144
Tab::make(__('settings/notifications.webhook'))
145145
->icon(Heroicon::OutlinedGlobeAlt)
146146
->schema([
147+
SimpleAlert::make('wehbook_info')
148+
->title(__('general.documentation'))
149+
->description(__('settings/notifications.webhook_hint_description'))
150+
->border()
151+
->info()
152+
->actions([
153+
Action::make('webhook_docs')
154+
->label(__('general.view_documentation'))
155+
->icon('heroicon-m-arrow-long-right')
156+
->color('info')
157+
->link()
158+
->url('https://docs.speedtest-tracker.dev/settings/notifications/webhook')
159+
->openUrlInNewTab(),
160+
])
161+
->columnSpanFull(),
162+
147163
Toggle::make('webhook_enabled')
148164
->label(__('general.enable'))
149165
->live(),
166+
150167
Grid::make([
151168
'default' => 1,
152169
])
153170
->hidden(fn (Get $get) => $get('webhook_enabled') !== true)
154171
->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(),
170172
Fieldset::make(__('settings.triggers'))
171173
->columns(1)
172174
->schema([

lang/en/general.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'settings' => 'Settings',
4040
'users' => 'Users',
4141
'documentation' => 'Documentation',
42+
'view_documentation' => 'View documentation',
4243
'links' => 'Links',
4344
'donate' => 'Donate',
4445

lang/en/settings/notifications.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
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',
2827
'webhook_hint_description' => 'These are generic webhooks. For payload examples and implementation details, view the documentation.',
2928

3029
// Common notification messages

0 commit comments

Comments
 (0)