mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
saving options for left pane sizing
This commit is contained in:
@@ -48,6 +48,8 @@ export default {
|
||||
addTabHandler((function() {
|
||||
const $themeSelect = $("#theme-select");
|
||||
const $zoomFactorSelect = $("#zoom-factor-select");
|
||||
const $leftPaneMinWidth = $("#left-pane-min-width");
|
||||
const $leftPaneWidthPercent = $("#left-pane-width-percent");
|
||||
const $html = $("html");
|
||||
|
||||
function optionsLoaded(options) {
|
||||
@@ -59,6 +61,9 @@ addTabHandler((function() {
|
||||
else {
|
||||
$zoomFactorSelect.prop('disabled', true);
|
||||
}
|
||||
|
||||
$leftPaneMinWidth.val(options.leftPaneMinWidth);
|
||||
$leftPaneWidthPercent.val(options.leftPaneWidthPercent);
|
||||
}
|
||||
|
||||
$themeSelect.change(function() {
|
||||
@@ -75,6 +80,18 @@ addTabHandler((function() {
|
||||
zoomService.setZoomFactorAndSave(newZoomFactor);
|
||||
});
|
||||
|
||||
$leftPaneMinWidth.change(function() {
|
||||
const newMinWidth = $(this).val();
|
||||
|
||||
server.put('options/leftPaneMinWidth/' + newMinWidth);
|
||||
});
|
||||
|
||||
$leftPaneWidthPercent.change(function() {
|
||||
const newWidthPercent = $(this).val();
|
||||
|
||||
server.put('options/leftPaneWidthPercent/' + newWidthPercent);
|
||||
});
|
||||
|
||||
return {
|
||||
optionsLoaded
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user