From bcf4cb519ae6c7d590db6a8023b7f24332ea9160 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 8 Oct 2017 22:21:19 +0200 Subject: new notification fixes --- Zotlabs/Module/Ping.php | 2 +- Zotlabs/Widget/Notifications.php | 26 +++++++++++++------------- view/js/main.js | 4 ++-- view/pdl/mod_display.pdl | 3 +++ view/pdl/mod_pubstream.pdl | 3 +++ view/php/default.php | 2 +- view/tpl/nav.tpl | 22 +++++++++++----------- view/tpl/notifications_widget.tpl | 26 ++++++++++++++++---------- 8 files changed, 50 insertions(+), 38 deletions(-) create mode 100644 view/pdl/mod_display.pdl create mode 100644 view/pdl/mod_pubstream.pdl diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index e3f430861..5f44b3c20 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -297,7 +297,7 @@ class Ping extends \Zotlabs\Web\Controller { killme(); } - if(argc() > 1 && argv(1) === 'messages') { + if(argc() > 1 && argv(1) === 'mail') { $channel = \App::get_channel(); $t = q("select mail.*, xchan.* from mail left join xchan on xchan_hash = from_xchan where channel_id = %d and mail_seen = 0 and mail_deleted = 0 diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index 85e8e6cac..c6bf22a19 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -16,15 +16,15 @@ class Notifications { 'type' => 'network', 'icon' => 'th', 'severity' => 'secondary', - 'label' => t('Activity'), - 'title' => t('Network Activity Notifications'), + 'label' => t('New Activity'), + 'title' => t('New Activity Notifications'), 'viewall' => [ 'url' => 'network', 'label' => t('View your network activity') ], 'markall' => [ 'url' => '#', - 'label' => t('Mark all notifications seen') + 'label' => t('Mark all notifications read') ] ]; @@ -32,8 +32,8 @@ class Notifications { 'type' => 'home', 'icon' => 'home', 'severity' => 'danger', - 'label' => t('Home'), - 'title' => t('Channel Home Notifications'), + 'label' => t('New Home Activity'), + 'title' => t('New Home Activity Notifications'), 'viewall' => [ 'url' => 'channel/' . $channel['channel_address'], 'label' => t('View your home activity') @@ -45,11 +45,11 @@ class Notifications { ]; $notifications[] = [ - 'type' => 'messages', + 'type' => 'mail', 'icon' => 'envelope', 'severity' => 'danger', - 'label' => t('Mail'), - 'title' => t('Private mail'), + 'label' => t('New Mails'), + 'title' => t('New Mails Notifications'), 'viewall' => [ 'url' => 'mail/combined', 'label' => t('View your private mails') @@ -64,8 +64,8 @@ class Notifications { 'type' => 'all_events', 'icon' => 'calendar', 'severity' => 'secondary', - 'label' => t('Events'), - 'title' => t('Event Calendar'), + 'label' => t('New Events'), + 'title' => t('New Events Notifications'), 'viewall' => [ 'url' => 'mail/combined', 'label' => t('View events') @@ -81,7 +81,7 @@ class Notifications { 'icon' => 'users', 'severity' => 'danger', 'label' => t('New Connections'), - 'title' => t('New Connections'), + 'title' => t('New Connections Notifications'), 'viewall' => [ 'url' => 'connections', 'label' => t('View all connections') @@ -93,7 +93,7 @@ class Notifications { 'icon' => 'folder', 'severity' => 'danger', 'label' => t('New Files'), - 'title' => t('New files shared with me'), + 'title' => t('New Files Notifications'), ]; $notifications[] = [ @@ -119,7 +119,7 @@ class Notifications { 'icon' => 'user-o', 'severity' => 'danger', 'label' => t('New Registrations'), - 'title' => t('New Registrations'), + 'title' => t('New Registrations Notifications'), ]; } diff --git a/view/js/main.js b/view/js/main.js index b2210ee4c..186cefbd0 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -481,8 +481,8 @@ function NavUpdate() { if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); } $('.home-update').html(data.home); - if(data.intros == 0) { data.intros = ''; $('.intro-update, .intro-button').hide(); } else { $('.intro-update, .intro-button').show(); } - $('.intro-update').html(data.intros); + if(data.intros == 0) { data.intros = ''; $('.intros-update, .intros-button').hide(); } else { $('.intros-update, .intros-button').show(); } + $('.intros-update').html(data.intros); if(data.mail == 0) { data.mail = ''; $('.mail-update, .mail-button').hide(); } else { $('.mail-update, .mail-button').show(); } $('.mail-update').html(data.mail); diff --git a/view/pdl/mod_display.pdl b/view/pdl/mod_display.pdl new file mode 100644 index 000000000..e657fa88b --- /dev/null +++ b/view/pdl/mod_display.pdl @@ -0,0 +1,3 @@ +[region=right_aside] +[widget=notifications][/widget] +[/region] diff --git a/view/pdl/mod_pubstream.pdl b/view/pdl/mod_pubstream.pdl new file mode 100644 index 000000000..e657fa88b --- /dev/null +++ b/view/pdl/mod_pubstream.pdl @@ -0,0 +1,3 @@ +[region=right_aside] +[widget=notifications][/widget] +[/region] diff --git a/view/php/default.php b/view/php/default.php index bd4d7dc22..444e24197 100644 --- a/view/php/default.php +++ b/view/php/default.php @@ -8,7 +8,7 @@ >
- +
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index 92ab88574..a19fa15a1 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -1,5 +1,5 @@ {{if $nav.login && !$userinfo}} -
+
{{$nav.loginmenu.1.1}} @@ -111,11 +111,11 @@ {{/if}} {{if $nav.messages}} {{/if}} {{if $nav.intros}} - {{/if}} {{if $nav.login && !$userinfo}} - {{/if}} {{if $nav.register}} - {{/if}} {{if $nav.alogout}} - {{/if}} @@ -216,9 +216,9 @@
{{$sel.active}}
{{/if}} - + -
-