@@ -185,6 +185,57 @@ public function form(Schema $schema): Schema
185185
186186 // ...
187187 ]),
188+ Tab::make (__ ('settings/notifications.apprise ' ))
189+ ->icon (Heroicon::CloudArrowUp)
190+ ->schema ([
191+ Toggle::make ('apprise_enabled ' )
192+ ->label (__ ('settings/notifications.enable_apprise_notifications ' ))
193+ ->reactive ()
194+ ->columnSpanFull (),
195+ Grid::make ([
196+ 'default ' => 1 ,
197+ ])
198+ ->hidden (fn (Get $ get ) => $ get ('apprise_enabled ' ) !== true )
199+ ->schema ([
200+ Fieldset::make (__ ('settings.triggers ' ))
201+ ->schema ([
202+ Checkbox::make ('apprise_on_speedtest_run ' )
203+ ->label (__ ('settings/notifications.apprise_on_speedtest_run ' ))
204+ ->columnSpanFull (),
205+ Checkbox::make ('apprise_on_threshold_failure ' )
206+ ->label (__ ('settings/notifications.apprise_on_threshold_failure ' ))
207+ ->columnSpanFull (),
208+ ]),
209+ Fieldset::make (__ ('settings/notifications.apprise_sidecar ' ))
210+ ->schema ([
211+ Checkbox::make ('apprise_verify_ssl ' )
212+ ->label (__ ('settings/notifications.apprise_verify_ssl ' ))
213+ ->default (true )
214+ ->columnSpanFull (),
215+ ]),
216+ Repeater::make ('apprise_channel_urls ' )
217+ ->label (__ ('settings/notifications.apprise_channels ' ))
218+ ->hint (new HtmlString ('<a href="https://github.com/caronc/apprise-api" target="_blank"> ' .__ ('settings/notifications.apprise_documentation ' ).'</a> ' ))
219+ ->schema ([
220+ TextInput::make ('channel_url ' )
221+ ->label (__ ('settings/notifications.apprise_channel_url ' ))
222+ ->placeholder (__ ('settings/notifications.apprise_channel_url_placeholder ' ))
223+ ->helperText (__ ('settings/notifications.apprise_channel_url_helper ' ))
224+ ->maxLength (2000 )
225+ ->distinct ()
226+ ->required (),
227+ ])
228+ ->columnSpanFull (),
229+ Actions::make ([
230+ Action::make ('test apprise ' )
231+ ->label (__ ('settings/notifications.test_apprise_channel ' ))
232+ ->action (fn (Get $ get ) => SendAppriseTestNotification::run (
233+ channel_urls: $ get ('apprise_channel_urls ' ),
234+ ))
235+ ->hidden (fn (Get $ get ) => ! count ($ get ('apprise_channel_urls ' ))),
236+ ]),
237+ ]),
238+ ])
188239 ])
189240 ->columnSpanFull (),
190241
0 commit comments