mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 04:20:08 +00:00
Fix: Apprise test button shown without saving (#2627)
This commit is contained in:
@@ -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 ?? []);
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
||||
@@ -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',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user