@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add an icon to aphlict connection status

Summary: A bit better styling, this adds an indication icon for if you're connected or not (and later, away, etc).

Test Plan: Test in Notifications menu, Conpherence full, Durable Column.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16647

+95 -22
+14 -14
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => 'c8fbe125', 10 + 'conpherence.pkg.css' => '5f3eb99c', 11 11 'conpherence.pkg.js' => '11f3e07e', 12 - 'core.pkg.css' => 'cfc3eabe', 12 + 'core.pkg.css' => '3fa66cb3', 13 13 'core.pkg.js' => '26f1f9bf', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => 'e1d704ce', ··· 35 35 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 36 36 'rsrc/css/application/auth/auth.css' => '0877ed6e', 37 37 'rsrc/css/application/base/main-menu-view.css' => 'f03e17be', 38 - 'rsrc/css/application/base/notification-menu.css' => 'b3ab500d', 38 + 'rsrc/css/application/base/notification-menu.css' => '1e055865', 39 39 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 40 40 'rsrc/css/application/base/phui-theme.css' => '027ba77e', 41 41 'rsrc/css/application/base/standard-page-view.css' => '79176f5a', ··· 46 46 'rsrc/css/application/config/config-template.css' => '8f18fa41', 47 47 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 48 48 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 49 - 'rsrc/css/application/conpherence/durable-column.css' => 'af11a2a7', 49 + 'rsrc/css/application/conpherence/durable-column.css' => '6127de1b', 50 50 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 51 51 'rsrc/css/application/conpherence/menu.css' => '78c7b811', 52 52 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02', ··· 428 428 'rsrc/js/application/aphlict/Aphlict.js' => '5359e785', 429 429 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '49e20786', 430 430 'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => 'fb20ac8d', 431 - 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761', 431 + 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => '5e2634b9', 432 432 'rsrc/js/application/aphlict/behavior-desktop-notifications-control.js' => 'edd1ba66', 433 433 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 434 434 'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443', ··· 618 618 'conduit-api-css' => '7bc725c4', 619 619 'config-options-css' => '0ede4c9b', 620 620 'config-page-css' => '8798e14f', 621 - 'conpherence-durable-column-view' => 'af11a2a7', 621 + 'conpherence-durable-column-view' => '6127de1b', 622 622 'conpherence-header-pane-css' => '517de9fe', 623 623 'conpherence-menu-css' => '78c7b811', 624 624 'conpherence-message-pane-css' => '0d7dff02', ··· 653 653 'javelin-behavior' => '61cbc29a', 654 654 'javelin-behavior-aphlict-dropdown' => '49e20786', 655 655 'javelin-behavior-aphlict-listen' => 'fb20ac8d', 656 - 'javelin-behavior-aphlict-status' => 'ea681761', 656 + 'javelin-behavior-aphlict-status' => '5e2634b9', 657 657 'javelin-behavior-aphront-basic-tokenizer' => 'b3a4b884', 658 658 'javelin-behavior-aphront-crop' => 'fa0f4fc2', 659 659 'javelin-behavior-aphront-drag-and-drop-textarea' => '484a6e22', ··· 860 860 'phabricator-nav-view-css' => 'b29426e9', 861 861 'phabricator-notification' => 'ccf1cbf8', 862 862 'phabricator-notification-css' => '3f6c89c9', 863 - 'phabricator-notification-menu-css' => 'b3ab500d', 863 + 'phabricator-notification-menu-css' => '1e055865', 864 864 'phabricator-object-selector-css' => '85ee8ce6', 865 865 'phabricator-phtize' => 'd254d646', 866 866 'phabricator-prefab' => 'cfd23f37', ··· 1422 1422 '5c54cbf3' => array( 1423 1423 'javelin-behavior', 1424 1424 'javelin-stratcom', 1425 + 'javelin-dom', 1426 + ), 1427 + '5e2634b9' => array( 1428 + 'javelin-behavior', 1429 + 'javelin-aphlict', 1430 + 'phabricator-phtize', 1425 1431 'javelin-dom', 1426 1432 ), 1427 1433 '5e9f347c' => array( ··· 2158 2164 'javelin-workflow', 2159 2165 'javelin-dom', 2160 2166 'phabricator-draggable-list', 2161 - ), 2162 - 'ea681761' => array( 2163 - 'javelin-behavior', 2164 - 'javelin-aphlict', 2165 - 'phabricator-phtize', 2166 - 'javelin-dom', 2167 2167 ), 2168 2168 'edd1ba66' => array( 2169 2169 'javelin-behavior',
+3
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 336 336 )); 337 337 } 338 338 339 + $status = new PhabricatorNotificationStatusView(); 340 + 339 341 return 340 342 phutil_tag( 341 343 'div', ··· 343 345 'class' => 'conpherence-durable-column-header-inner', 344 346 ), 345 347 array( 348 + $status, 346 349 javelin_tag( 347 350 'div', 348 351 array(
+40 -2
src/applications/notification/view/PhabricatorNotificationStatusView.php
··· 16 16 'open' => pht('Connected'), 17 17 'closed' => pht('Disconnected'), 18 18 ), 19 + 'icon' => array( 20 + 'open' => array( 21 + 'icon' => 'fa-circle', 22 + 'color' => 'green', 23 + ), 24 + 'setup' => array( 25 + 'icon' => 'fa-circle', 26 + 'color' => 'yellow', 27 + ), 28 + 'closed' => array( 29 + 'icon' => 'fa-circle', 30 + 'color' => 'red', 31 + ), 32 + ), 19 33 )); 20 34 21 35 return array( ··· 26 40 protected function getTagContent() { 27 41 $have = PhabricatorEnv::getEnvConfig('notification.servers'); 28 42 if ($have) { 29 - return pht('Connecting...'); 43 + $icon = id(new PHUIIconView()) 44 + ->setIcon('fa-circle-o yellow'); 45 + $text = pht('Connecting...'); 46 + return phutil_tag( 47 + 'span', 48 + array( 49 + 'class' => 'connection-status-text '. 50 + 'aphlict-connection-status-connecting', 51 + ), 52 + array( 53 + $icon, 54 + $text, 55 + )); 30 56 } else { 31 - return pht('Notification server not enabled'); 57 + $text = pht('Notification server not enabled'); 58 + $icon = id(new PHUIIconView()) 59 + ->setIcon('fa-circle-o grey'); 60 + return phutil_tag( 61 + 'span', 62 + array( 63 + 'class' => 'connection-status-text '. 64 + 'aphlict-connection-status-notenabled', 65 + ), 66 + array( 67 + $icon, 68 + $text, 69 + )); 32 70 } 33 71 } 34 72
+10 -4
webroot/rsrc/css/application/base/notification-menu.css
··· 124 124 color: {$lightgreytext}; 125 125 } 126 126 127 - .aphlict-connection-status .aphlict-connection-status-connected { 128 - color: {$green}; 127 + .aphlict-connection-status { 128 + position: relative; 129 129 } 130 130 131 - .aphlict-connection-status .aphlict-connection-status-error { 132 - color: {$red}; 131 + .aphlict-connection-status .phui-icon-view { 132 + font-size: 9px; 133 + position: absolute; 134 + top: 4px; 135 + } 136 + 137 + .aphlict-connection-status .connection-status-text { 138 + margin-left: 12px; 133 139 }
+18
webroot/rsrc/css/application/conpherence/durable-column.css
··· 45 45 display: none; 46 46 } 47 47 48 + .conpherence-durable-column-header .aphlict-connection-status { 49 + width: 6px; 50 + float: left; 51 + height: 18px; 52 + margin-left: 10px; 53 + margin-top: 8px; 54 + } 55 + 56 + .conpherence-durable-column-header .aphlict-connection-status 57 + .connection-status-text { 58 + display: none; 59 + } 60 + 61 + .conpherence-durable-column-header .aphlict-connection-status 62 + .phui-icon-view { 63 + font-size: 10px; 64 + } 65 + 48 66 .conpherence-durable-column-header .phabricator-application-menu 49 67 .phui-list-item-view { 50 68 margin: 0;
+10 -2
webroot/rsrc/js/application/aphlict/behavior-aphlict-status.js
··· 24 24 } 25 25 26 26 var status = client.getStatus(); 27 + var icon = config.icon[status]; 27 28 var status_node = JX.$N( 28 29 'span', 29 30 { 30 - className: 'aphlict-connection-status-' + status 31 + className: 'connection-status-text aphlict-connection-status-' + status 31 32 }, 32 33 pht(status)); 33 34 34 - JX.DOM.setContent(node, status_node); 35 + var icon_node = new JX.PHUIXIconView() 36 + .setIcon(icon['icon']) 37 + .setColor(icon['color']) 38 + .getNode(); 39 + 40 + var content = [icon_node, ' ', status_node]; 41 + 42 + JX.DOM.setContent(node, content); 35 43 } 36 44 37 45 JX.Aphlict.listen('didChangeStatus', update);