mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added global menu item for fullscreen toggle
This commit is contained in:
parent
c0496ebef3
commit
f4b986e1c1
@ -143,7 +143,7 @@ function registerEntrypoints() {
|
||||
}
|
||||
|
||||
if (utils.isElectron()) {
|
||||
utils.bindShortcut('f11', () => {
|
||||
const toggleFullscreen = function() {
|
||||
const win = require('electron').remote.getCurrentWindow();
|
||||
|
||||
if (win.isFullScreenable()) {
|
||||
@ -151,7 +151,15 @@ function registerEntrypoints() {
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
$("#toggle-fullscreen-button").click(toggleFullscreen);
|
||||
|
||||
utils.bindShortcut('f11', toggleFullscreen);
|
||||
}
|
||||
else {
|
||||
// outside of electron this is handled by the browser
|
||||
$("#toggle-fullscreen-button").hide();
|
||||
}
|
||||
|
||||
// FIXME: do we really need these at this point?
|
||||
|
@ -80,6 +80,12 @@
|
||||
<kbd>CTRL-R</kbd>
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item" id="toggle-fullscreen-button">
|
||||
<span class="jam jam-empty"></span>
|
||||
Toggle fullscreen
|
||||
<kbd>F11</kbd>
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item" id="show-help-button">
|
||||
<span class="jam jam-help"></span>
|
||||
Show Help
|
||||
|
Loading…
x
Reference in New Issue
Block a user