Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/Filament/Pages/Settings/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ public function form(Schema $schema): Schema
]),
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'))
Expand All @@ -274,7 +275,11 @@ public function form(Schema $schema): Schema
->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 ?? []);
}),
]),
]),
]),
Expand Down
1 change: 1 addition & 0 deletions lang/en/settings/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'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',

Expand Down