mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-04 22:13:13 +00:00
shortcuts-menu: Add a tip-section to link to webapp's built-in hotkeys.
Fixes: #459
This commit is contained in:
committed by
Akash Nimare
parent
f81381dfec
commit
ceaf13dee2
@@ -557,6 +557,23 @@ input.toggle-round:checked+label:after {
|
|||||||
background: #329588;
|
background: #329588;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
width: 70%;
|
||||||
|
background-color: hsl(46,63%,95%);
|
||||||
|
border: 1px solid hsl(46,63%,84%);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 12px 30px;
|
||||||
|
margin: 10px 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-14 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#open-hotkeys-link {
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* responsive grid */
|
/* responsive grid */
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const BaseSection = require(__dirname + '/base-section.js');
|
const BaseSection = require(__dirname + '/base-section.js');
|
||||||
|
const shell = require('electron').shell;
|
||||||
|
|
||||||
class ShortcutsSection extends BaseSection {
|
class ShortcutsSection extends BaseSection {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -159,6 +160,7 @@ class ShortcutsSection extends BaseSection {
|
|||||||
</table>
|
</table>
|
||||||
<div class="setting-control"></div>
|
<div class="setting-control"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tip"><b><i class="material-icons md-14">settings</i>Tip: </b>These desktop app shortcuts extend the Zulip webapp's <span id="open-hotkeys-link">keyboard shortcuts</span>.</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@@ -298,13 +300,22 @@ class ShortcutsSection extends BaseSection {
|
|||||||
</table>
|
</table>
|
||||||
<div class="setting-control"></div>
|
<div class="setting-control"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tip"><b><i class="material-icons md-14">lightbulb_outline</i>Tip: </b>These desktop app shortcuts extend the Zulip webapp's <span id="open-hotkeys-link">keyboard shortcuts</span>.</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openHotkeysExternalLink() {
|
||||||
|
const link = 'https://zulipchat.com/help/keyboard-shortcuts';
|
||||||
|
const externalCreateNewOrgEl = document.getElementById('open-hotkeys-link');
|
||||||
|
externalCreateNewOrgEl.addEventListener('click', () => {
|
||||||
|
shell.openExternal(link);
|
||||||
|
});
|
||||||
|
}
|
||||||
init() {
|
init() {
|
||||||
this.props.$root.innerHTML = (process.platform === 'darwin') ?
|
this.props.$root.innerHTML = (process.platform === 'darwin') ?
|
||||||
this.templateMac() : this.templateWinLin();
|
this.templateMac() : this.templateWinLin();
|
||||||
|
this.openHotkeysExternalLink();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user