mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Add 'Persist Chat' option in Conpherence notification menu
Summary: This exposes the chat window to a larger audience beside people who accidentaly hit `\`. Test Plan: Lots of clicks and reloads. {F1856043} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D16643
This commit is contained in:
parent
5eb4bc6ca9
commit
2f2126ecce
4 changed files with 75 additions and 23 deletions
|
@ -7,10 +7,10 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'conpherence.pkg.css' => 'b1547973',
|
||||
'conpherence.pkg.css' => 'c8fbe125',
|
||||
'conpherence.pkg.js' => '11f3e07e',
|
||||
'core.pkg.css' => 'ade19c40',
|
||||
'core.pkg.js' => '975d6a27',
|
||||
'core.pkg.js' => '03c1cb09',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => 'e1d704ce',
|
||||
'differential.pkg.js' => '634399e9',
|
||||
|
@ -50,7 +50,7 @@ return array(
|
|||
'rsrc/css/application/conpherence/header-pane.css' => '517de9fe',
|
||||
'rsrc/css/application/conpherence/menu.css' => '78c7b811',
|
||||
'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02',
|
||||
'rsrc/css/application/conpherence/notification.css' => '6cdcc253',
|
||||
'rsrc/css/application/conpherence/notification.css' => '65dd0e79',
|
||||
'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56',
|
||||
'rsrc/css/application/conpherence/transaction.css' => '46253e19',
|
||||
'rsrc/css/application/conpherence/update.css' => '53bc527a',
|
||||
|
@ -438,7 +438,7 @@ return array(
|
|||
'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408',
|
||||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2',
|
||||
'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e287689f',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'a0e564c2',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => '9eb55204',
|
||||
'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8',
|
||||
'rsrc/js/application/conpherence/behavior-pontificate.js' => 'f2e58483',
|
||||
|
@ -622,7 +622,7 @@ return array(
|
|||
'conpherence-header-pane-css' => '517de9fe',
|
||||
'conpherence-menu-css' => '78c7b811',
|
||||
'conpherence-message-pane-css' => '0d7dff02',
|
||||
'conpherence-notification-css' => '6cdcc253',
|
||||
'conpherence-notification-css' => '65dd0e79',
|
||||
'conpherence-participant-pane-css' => '7bba0b56',
|
||||
'conpherence-thread-manager' => '01774ab2',
|
||||
'conpherence-transaction-css' => '46253e19',
|
||||
|
@ -699,7 +699,7 @@ return array(
|
|||
'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc',
|
||||
'javelin-behavior-doorkeeper-tag' => 'e5822781',
|
||||
'javelin-behavior-drydock-live-operation-status' => '901935ef',
|
||||
'javelin-behavior-durable-column' => 'e287689f',
|
||||
'javelin-behavior-durable-column' => 'a0e564c2',
|
||||
'javelin-behavior-editengine-reorder-configs' => 'd7a74243',
|
||||
'javelin-behavior-editengine-reorder-fields' => 'b59e1e96',
|
||||
'javelin-behavior-error-log' => '6882e80a',
|
||||
|
@ -1774,6 +1774,16 @@ return array(
|
|||
'javelin-util',
|
||||
'phabricator-keyboard-shortcut',
|
||||
),
|
||||
'a0e564c2' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-behavior-device',
|
||||
'javelin-scrollbar',
|
||||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'a155550f' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
@ -2109,16 +2119,6 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
),
|
||||
'e287689f' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-behavior-device',
|
||||
'javelin-scrollbar',
|
||||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'e292eaf4' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
|
|
|
@ -70,13 +70,20 @@ final class ConpherenceNotificationPanelController
|
|||
}
|
||||
$content = $view->render();
|
||||
} else {
|
||||
$rooms_uri = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/conpherence/',
|
||||
'class' => 'no-room-notification',
|
||||
),
|
||||
pht('You have joined no rooms.'));
|
||||
|
||||
$content = phutil_tag_div(
|
||||
'phabricator-notification no-notifications',
|
||||
pht('You have no messages.'));
|
||||
'phabricator-notification no-notifications', $rooms_uri);
|
||||
}
|
||||
|
||||
$content = hsprintf(
|
||||
'<div class="phabricator-notification-header">%s</div>'.
|
||||
'<div class="phabricator-notification-header grouped">%s%s</div>'.
|
||||
'%s',
|
||||
phutil_tag(
|
||||
'a',
|
||||
|
@ -84,6 +91,7 @@ final class ConpherenceNotificationPanelController
|
|||
'href' => '/conpherence/',
|
||||
),
|
||||
pht('Rooms')),
|
||||
$this->renderPersistentOption(),
|
||||
$content);
|
||||
|
||||
$unread = id(new ConpherenceParticipantCountQuery())
|
||||
|
@ -100,4 +108,32 @@ final class ConpherenceNotificationPanelController
|
|||
return id(new AphrontAjaxResponse())->setContent($json);
|
||||
}
|
||||
|
||||
private function renderPersistentOption() {
|
||||
$viewer = $this->getViewer();
|
||||
$column_key = PhabricatorConpherenceColumnVisibleSetting::SETTINGKEY;
|
||||
$show = (bool)$viewer->getUserSetting($column_key, false);
|
||||
|
||||
$view = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'persistent-option',
|
||||
),
|
||||
array(
|
||||
javelin_tag(
|
||||
'input',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => ($show) ? 'checked' : null,
|
||||
'value' => !$show,
|
||||
'sigil' => 'conpherence-persist-column',
|
||||
)),
|
||||
phutil_tag(
|
||||
'span',
|
||||
array(),
|
||||
pht('Persistent Chat')),
|
||||
));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
width: 30px;
|
||||
height: 30px;
|
||||
background-size: 100%;
|
||||
box-shadow: {$borderinset};
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
|
@ -71,3 +70,19 @@
|
|||
padding: 0 5px 1px;
|
||||
font-size: {$smallestfontsize};
|
||||
}
|
||||
|
||||
.phabricator-notification .no-room-notification {
|
||||
color: {$lightgreytext};
|
||||
display: block;
|
||||
}
|
||||
|
||||
.phabricator-notification-header .persistent-option {
|
||||
white-space: nowrap;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.phabricator-notification-header .persistent-option span {
|
||||
margin-left: 4px;
|
||||
font-weight: normal;
|
||||
color: {$greytext};
|
||||
}
|
||||
|
|
|
@ -89,9 +89,10 @@ JX.behavior('durable-column', function(config, statics) {
|
|||
JX.Stratcom.invoke('resize');
|
||||
}
|
||||
|
||||
new JX.KeyboardShortcut('\\', 'Toggle Conpherence Column')
|
||||
.setHandler(_toggleColumn)
|
||||
.register();
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'conpherence-persist-column',
|
||||
_toggleColumn);
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
|
|
Loading…
Reference in a new issue