mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
added title bar buttons
This commit is contained in:
parent
7c8e7a3f4b
commit
4cececafc9
@ -176,4 +176,30 @@ noteAutocompleteService.init();
|
||||
|
||||
if (utils.isElectron()) {
|
||||
import("./services/spell_check.js").then(spellCheckService => spellCheckService.initSpellCheck());
|
||||
}
|
||||
|
||||
if (utils.isElectron()) {
|
||||
$("#title-bar-buttons").show();
|
||||
|
||||
$("#minimize-btn").on('click', () => {
|
||||
const { remote } = require('electron');
|
||||
remote.BrowserWindow.getFocusedWindow().minimize();
|
||||
});
|
||||
|
||||
$("#maximize-btn").on('click', () => {
|
||||
const { remote } = require('electron');
|
||||
const focusedWindow = remote.BrowserWindow.getFocusedWindow();
|
||||
|
||||
if (focusedWindow.isMaximized()) {
|
||||
focusedWindow.unmaximize();
|
||||
}
|
||||
else {
|
||||
focusedWindow.maximize();
|
||||
}
|
||||
});
|
||||
|
||||
$("#close-btn").on('click', () => {
|
||||
const { remote } = require('electron');
|
||||
remote.BrowserWindow.getFocusedWindow().close();
|
||||
});
|
||||
}
|
@ -498,4 +498,8 @@ body {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#title-bar-buttons {
|
||||
min-width: 100px;
|
||||
}
|
@ -474,6 +474,11 @@ button.icon-button {
|
||||
width: 15em;
|
||||
}
|
||||
|
||||
#global-menu button {
|
||||
height: 38px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#global-menu .dropdown-menu {
|
||||
width: 20em;
|
||||
}
|
||||
|
@ -12,10 +12,6 @@
|
||||
|
||||
<div id="container" style="display: none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) minmax(0, <%= rightPaneWidthPercent %>fr)">
|
||||
<div style="display: flex;">
|
||||
<div class="note-tab-row hide-in-zen-mode">
|
||||
<div class="note-tab-row-content"></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="dropdown" id="global-menu">
|
||||
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
|
||||
@ -88,6 +84,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="note-tab-row hide-in-zen-mode">
|
||||
<div class="note-tab-row-content"></div>
|
||||
</div>
|
||||
|
||||
<div id="title-bar-buttons" style="display: hidden">
|
||||
<button class="btn icon-action bx bx-minus" id="minimize-btn"></button>
|
||||
<button class="btn icon-action bx bx-checkbox" id="maximize-btn"></button>
|
||||
<button class="btn icon-action bx bx-x" id="close-btn"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="header" class="hide-in-zen-mode">
|
||||
|
Loading…
x
Reference in New Issue
Block a user