-
Notifications
You must be signed in to change notification settings - Fork 2
More improvements to popup prompt #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
746ad03
dab2ca0
4d98463
e151c81
5649b81
85df47f
755d072
7567eea
36afa42
4d45624
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <?php | ||
| /** | ||
| * | ||
| * phpBB Browser Push Notifications. An extension for the phpBB Forum Software package. | ||
| * | ||
| * @copyright (c) 2025, phpBB Limited <https://www.phpbb.com> | ||
| * @license GNU General Public License, version 2 (GPL-2.0) | ||
| * | ||
| */ | ||
|
|
||
| namespace phpbb\webpushnotifications\migrations; | ||
|
|
||
| use phpbb\db\migration\migration; | ||
|
|
||
| class add_user_popup_preference extends migration | ||
| { | ||
| public function effectively_installed() | ||
| { | ||
| return $this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_wpn_popup_disabled'); | ||
| } | ||
|
|
||
| public static function depends_on() | ||
| { | ||
| return ['\phpbb\webpushnotifications\migrations\add_popup_prompt']; | ||
| } | ||
|
|
||
| public function update_schema() | ||
| { | ||
| return [ | ||
| 'add_columns' => [ | ||
| $this->table_prefix . 'users' => [ | ||
| 'user_wpn_popup_disabled' => ['BOOL', 0], | ||
| ], | ||
| ], | ||
| ]; | ||
| } | ||
|
|
||
| public function revert_schema() | ||
| { | ||
| return [ | ||
| 'drop_columns' => [ | ||
| $this->table_prefix . 'users' => [ | ||
| 'user_wpn_popup_disabled', | ||
| ], | ||
| ], | ||
| ]; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,43 @@ | |
| margin: 0 0 8px; | ||
| } | ||
|
|
||
| .wpn-fieldset { | ||
| display: grid; | ||
| column-gap: 1rem; | ||
| grid-template-columns: 1fr 320px; | ||
| row-gap: 1.25rem; | ||
| } | ||
|
|
||
| .wpn-fieldset > dl { | ||
| display: contents; | ||
| } | ||
|
|
||
| /* Optional styling */ | ||
| .wpn-fieldset dt { | ||
| float: none; | ||
| align-self: start; | ||
| width: auto; | ||
| } | ||
|
|
||
| .wpn-fieldset dd { | ||
| display: flex; | ||
| align-items: center; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .wpn-fieldset dt label { | ||
| line-height: 1.4; | ||
| display: inline-block; | ||
| } | ||
|
|
||
| .wpn-fieldset .fa-toggle-on { | ||
| color: #105289; | ||
| } | ||
|
|
||
| .wpn-fieldset .fa-toggle-off { | ||
| color: #5d5d5d; | ||
| } | ||
|
Comment on lines
+48
to
+54
|
||
|
|
||
| .wpn-notification-dropdown-footer { | ||
| font-size: 12px; | ||
| white-space: nowrap; | ||
|
|
@@ -47,8 +84,17 @@ | |
| } | ||
|
|
||
| @media (max-width: 700px) { | ||
| .wpn.button { | ||
| margin-top: 8px; | ||
| .wpn-fieldset { | ||
| grid-template-columns: 1fr; | ||
| row-gap: 0.5rem; | ||
| } | ||
|
|
||
| .wpn-fieldset dt { | ||
| grid-column: 1; | ||
| } | ||
|
|
||
| .wpn-fieldset dd { | ||
| grid-column: 1; | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.