sidebars are now represented as widgets

This commit is contained in:
zadam
2020-02-04 22:46:17 +01:00
parent 0cc013c13f
commit 786bbbc160
7 changed files with 67 additions and 32 deletions

View File

@@ -162,12 +162,16 @@ function toggleSidebar(side, show) {
paneVisible[side] = show;
}
function toggleAndSave(side, show) {
async function toggleAndSave(side, show) {
toggleSidebar(side, show);
await server.put(`options/${side}PaneVisible/` + show.toString());
await optionService.reloadOptions();
splitService.setupSplit(paneVisible.left, paneVisible.right);
server.put(`options/${side}PaneVisible/` + show.toString());
appContext.trigger('sidebarVisibilityChanged', {side, show});
}
$("#show-right-pane-button").on('click', () => toggleAndSave('right', true));