1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 00:40:57 +01:00

Touch up notification/messages panels

Summary: Fixes T5575. Moves "All" links into title/header. Mark all read floats left, and connection status sits in footer. Also added hints to enable notifications (it's a cool feature).

Test Plan:
Tested locally both menus.

{F190630}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5575

Differential Revision: https://secure.phabricator.com/D10269
This commit is contained in:
Chad Little 2014-08-14 17:19:01 -07:00
parent ff51a1a451
commit dc69c4e58c
4 changed files with 39 additions and 30 deletions

View file

@ -7,7 +7,7 @@
*/ */
return array( return array(
'names' => array( 'names' => array(
'core.pkg.css' => 'f8054294', 'core.pkg.css' => '383d0947',
'core.pkg.js' => '7c8455ef', 'core.pkg.js' => '7c8455ef',
'darkconsole.pkg.js' => 'df001cab', 'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '4a93db37', 'differential.pkg.css' => '4a93db37',
@ -37,7 +37,7 @@ return array(
'rsrc/css/aphront/typeahead.css' => 'a989b5b3', 'rsrc/css/aphront/typeahead.css' => 'a989b5b3',
'rsrc/css/application/auth/auth.css' => '1e655982', 'rsrc/css/application/auth/auth.css' => '1e655982',
'rsrc/css/application/base/main-menu-view.css' => 'aceca0e9', 'rsrc/css/application/base/main-menu-view.css' => 'aceca0e9',
'rsrc/css/application/base/notification-menu.css' => '5e3b5c86', 'rsrc/css/application/base/notification-menu.css' => '6aa0a74b',
'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d',
'rsrc/css/application/base/standard-page-view.css' => '517cdfb1', 'rsrc/css/application/base/standard-page-view.css' => '517cdfb1',
'rsrc/css/application/chatlog/chatlog.css' => '852140ff', 'rsrc/css/application/chatlog/chatlog.css' => '852140ff',
@ -730,7 +730,7 @@ return array(
'phabricator-nav-view-css' => '9283c2df', 'phabricator-nav-view-css' => '9283c2df',
'phabricator-notification' => '0c6946e7', 'phabricator-notification' => '0c6946e7',
'phabricator-notification-css' => 'ef2c9b34', 'phabricator-notification-css' => 'ef2c9b34',
'phabricator-notification-menu-css' => '5e3b5c86', 'phabricator-notification-menu-css' => '6aa0a74b',
'phabricator-object-selector-css' => '029a133d', 'phabricator-object-selector-css' => '029a133d',
'phabricator-phtize' => 'd254d646', 'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => 'bbae734c', 'phabricator-prefab' => 'bbae734c',

View file

@ -75,21 +75,14 @@ final class ConpherenceNotificationPanelController
$content = hsprintf( $content = hsprintf(
'<div class="phabricator-notification-header">%s</div>'. '<div class="phabricator-notification-header">%s</div>'.
'%s'. '%s',
'<div class="phabricator-notification-view-all">%s</div>',
phutil_tag( phutil_tag(
'a', 'a',
array( array(
'href' => '/conpherence/', 'href' => '/conpherence/',
), ),
pht('Messages')), pht('Messages')),
$content, $content);
phutil_tag(
'a',
array(
'href' => '/conpherence/',
),
'View All Conpherences'));
$unread = id(new ConpherenceParticipantCountQuery()) $unread = id(new ConpherenceParticipantCountQuery())
->withParticipantPHIDs(array($user->getPHID())) ->withParticipantPHIDs(array($user->getPHID()))

View file

@ -46,7 +46,23 @@ final class PhabricatorNotificationPanelController
), ),
pht('Notifications')); pht('Notifications'));
$connection_status = new PhabricatorNotificationStatusView(); if (PhabricatorEnv::getEnvConfig('notification.enabled')) {
$connection_status = new PhabricatorNotificationStatusView();
} else {
$connection_status = phutil_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'Notifications User Guide: Setup and Configuration'),
),
pht('Notification Server not enabled.'));
}
$connection_ui = phutil_tag(
'div',
array(
'class' => 'phabricator-notification-footer'
),
$connection_status);
$header = phutil_tag( $header = phutil_tag(
'div', 'div',
@ -54,24 +70,15 @@ final class PhabricatorNotificationPanelController
'class' => 'phabricator-notification-header', 'class' => 'phabricator-notification-header',
), ),
array( array(
$connection_status,
$notifications_link, $notifications_link,
$clear_ui,
)); ));
$content = hsprintf( $content = hsprintf(
'%s'. '%s%s%s',
'%s'.
'<div class="phabricator-notification-view-all">%s %s %s</div>',
$header, $header,
$content, $content,
$clear_ui, $connection_ui);
" \xC2\xB7 ",
phutil_tag(
'a',
array(
'href' => '/notification/',
),
pht('View All Notifications')));
$unread_count = id(new PhabricatorFeedStoryNotification()) $unread_count = id(new PhabricatorFeedStoryNotification())
->countUnread($user); ->countUnread($user);

View file

@ -81,26 +81,35 @@
color: {$darkgreytext}; color: {$darkgreytext};
} }
.phabricator-notification-header a:hover {
text-decoration: underline;
}
.phabricator-notification-header .phabricator-notification-clear-all { .phabricator-notification-header .phabricator-notification-clear-all {
color: #18559D; color: #18559D;
float: right; float: right;
font-weight: normal; font-weight: normal;
} }
.phabricator-notification-view-all { .phabricator-notification-footer {
text-align: center;
font-weight: bold;
background: {$greybackground}; background: {$greybackground};
border-top: 1px solid {$thinblueborder}; border-top: 1px solid {$thinblueborder};
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
padding: 8px; padding: 8px;
font-size: 12px; font-size: 12px;
color: {$darkgreytext};
}
.phabricator-notification-footer a {
color: {$darkgreytext};
}
.phabricator-notification-footer a:hover {
text-decoration: underline;
} }
.phabricator-notification-menu .aphlict-connection-status { .phabricator-notification-menu .aphlict-connection-status {
float: right;
font-weight: normal;
color: {$lightgreytext}; color: {$lightgreytext};
} }