From 07aaf84a4bcd0a43cc43818bf73175ae96ce6476 Mon Sep 17 00:00:00 2001 From: Sven van Ginkel Date: Sat, 3 Jan 2026 14:09:51 +0100 Subject: [PATCH] Fix: Apprise test button shown without saving (#2627) --- app/Filament/Pages/Settings/Notification.php | 7 ++++++- lang/en/settings/notifications.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Filament/Pages/Settings/Notification.php b/app/Filament/Pages/Settings/Notification.php index 7e1c1a58..27d26bc3 100755 --- a/app/Filament/Pages/Settings/Notification.php +++ b/app/Filament/Pages/Settings/Notification.php @@ -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 ?? []); + }), ]), ]), ]), diff --git a/lang/en/settings/notifications.php b/lang/en/settings/notifications.php index 788f31d9..87c82e7d 100644 --- a/lang/en/settings/notifications.php +++ b/lang/en/settings/notifications.php @@ -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',