mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #6632 from iMattPro/ticket/17333
[ticket/17333] UX Enhancements for Web Push Subscribing
This commit is contained in:
@@ -94,6 +94,14 @@ class webpush extends messenger_base implements extended_method_interface
|
||||
&& !empty($this->config['webpush_vapid_public']) && !empty($this->config['webpush_vapid_private']);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function is_enabled_by_default()
|
||||
{
|
||||
return (bool) $this->config['webpush_method_default_enable'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -352,7 +360,7 @@ class webpush extends messenger_base implements extended_method_interface
|
||||
}
|
||||
|
||||
return [
|
||||
'NOTIFICATIONS_WEBPUSH_ENABLE' => true,
|
||||
'NOTIFICATIONS_WEBPUSH_ENABLE' => $this->config['webpush_dropdown_subscribe'] || stripos($this->user->page['page'], 'notification_options'),
|
||||
'U_WEBPUSH_SUBSCRIBE' => $controller_helper->route('phpbb_ucp_push_subscribe_controller'),
|
||||
'U_WEBPUSH_UNSUBSCRIBE' => $controller_helper->route('phpbb_ucp_push_unsubscribe_controller'),
|
||||
'VAPID_PUBLIC_KEY' => $this->config['webpush_vapid_public'],
|
||||
|
Reference in New Issue
Block a user