Fix: Apprise test button shown without saving (#2627)

This commit is contained in:
Sven van Ginkel
2026-01-03 14:09:51 +01:00
committed by GitHub
parent 0e405e3f63
commit 07aaf84a4b
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -257,6 +257,7 @@ class Notification extends SettingsPage
]),
Repeater::make('apprise_channel_urls')
->label(__('settings/notifications.apprise_channels'))
->helperText(__('settings/notifications.apprise_save_to_test'))
->schema([
TextInput::make('channel_url')
->label(__('settings/notifications.apprise_channel_url'))
@@ -274,7 +275,11 @@ class Notification extends SettingsPage
->action(fn (Get $get) => SendAppriseTestNotification::run(
channel_urls: $get('apprise_channel_urls'),
))
->hidden(fn (Get $get) => ! count($get('apprise_channel_urls'))),
->hidden(function () {
$settings = app(NotificationSettings::class);
return empty($settings->apprise_server_url) || ! count($settings->apprise_channel_urls ?? []);
}),
]),
]),
]),
+1
View File
@@ -25,6 +25,7 @@ return [
'apprise_channel_url' => 'Service URL',
'apprise_hint_description' => 'Apprise allows you to send notifications to 90+ services. You need to run an Apprise server and configure service URLs below.',
'apprise_channel_url_helper' => 'Use Apprise URL format. Examples: discord://WebhookID/Token, slack://TokenA/TokenB/TokenC',
'apprise_save_to_test' => 'Save your settings to test the notification.',
'test_apprise_channel' => 'Test Apprise',
'apprise_channel_url_validation_error' => 'Invalid Apprise URL. Must use Apprise format (e.g., discord://, slack://), not http:// or https://. See the Apprise documentation for more information',