diff --git a/app/Filament/Pages/Settings/Notification.php b/app/Filament/Pages/Settings/Notification.php index 3fd0d82c5..88e9db1c0 100755 --- a/app/Filament/Pages/Settings/Notification.php +++ b/app/Filament/Pages/Settings/Notification.php @@ -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([ diff --git a/lang/en/settings/notifications.php b/lang/en/settings/notifications.php index 6dcf09a88..2363fd034 100644 --- a/lang/en/settings/notifications.php +++ b/lang/en/settings/notifications.php @@ -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',