Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
removed left and right sidebar sizing options
zadame0368e395c4a
diff --git a/src/public/javascripts/dialogs/options/appearance.js b/src/public/javascripts/dialogs/options/appearance.jsindex e7504c8c26..9ab418e0a1 100644--- a/src/public/javascripts/dialogs/options/appearance.js+++ b/src/public/javascripts/dialogs/options/appearance.js@@ -61,37 +61,6 @@ const TPL = `</div><p>Note that tree and detail font sizing is relative to the main font size setting.</p>-- <h4>Left pane sizing</h4>-- <div class="form-group row">- <div class="col-6">- <label for="left-pane-min-width">Left pane minimum width (in pixels)</label>-- <div class="input-group">- <input type="number" class="form-control" id="left-pane-min-width" min="100" max="2000" step="1"/>-- <div class="input-group-append">- <span class="input-group-text">px</span>- </div>- </div>- </div>-- <div class="col-6">- <label for="left-pane-min-width">Left pane width percent of window size</label>-- <div class="input-group">- <input type="number" class="form-control" id="left-pane-width-percent" min="0" max="99" step="1"/>-- <div class="input-group-append">- <span class="input-group-text">%</span>- </div>- </div>- </div>- </div>-- <p>Left pane width is calculated from the percent of window size, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width left pane, set minimum width to the desired width and set percent to 0.</p>-</form>`;export default class ApperanceOptions {@@ -100,8 +69,6 @@ export default class ApperanceOptions {this.$themeSelect = $("#theme-select");this.$zoomFactorSelect = $("#zoom-factor-select");- this.$leftPaneMinWidth = $("#left-pane-min-width");- this.$leftPaneWidthPercent = $("#left-pane-width-percent");this.$mainFontSize = $("#main-font-size");this.$treeFontSize = $("#tree-font-size");this.$detailFontSize = $("#detail-font-size");@@ -132,18 +99,6 @@ export default class ApperanceOptions {this.$zoomFactorSelect.on('change', () => { zoomService.setZoomFactorAndSave(this.$zoomFactorSelect.val()); });- this.$leftPaneMinWidth.on('change', async () => {- await server.put('options/leftPaneMinWidth/' + this.$leftPaneMinWidth.val());-- this.resizeLeftPanel();- });-- this.$leftPaneWidthPercent.on('change', async () => {- await server.put('options/leftPaneWidthPercent/' + this.$leftPaneWidthPercent.val());-- this.resizeLeftPanel();- });-this.$mainFontSize.on('change', async () => {await server.put('options/mainFontSize/' + this.$mainFontSize.val());@@ -188,22 +143,11 @@ export default class ApperanceOptions {this.$zoomFactorSelect.prop('disabled', true);}- this.$leftPaneMinWidth.val(options.leftPaneMinWidth);- this.$leftPaneWidthPercent.val(options.leftPaneWidthPercent);-this.$mainFontSize.val(options.mainFontSize);this.$treeFontSize.val(options.treeFontSize);this.$detailFontSize.val(options.detailFontSize);}- resizeLeftPanel() {- const leftPanePercent = parseInt(this.$leftPaneWidthPercent.val());- const rightPanePercent = 100 - leftPanePercent;- const leftPaneMinWidth = this.$leftPaneMinWidth.val();-- this.$container.css("grid-template-columns", `minmax(${leftPaneMinWidth}px, ${leftPanePercent}fr) ${rightPanePercent}fr`);- }-applyFontSizes() {this.$body.get(0).style.setProperty("--main-font-size", this.$mainFontSize.val() + "%");this.$body.get(0).style.setProperty("--tree-font-size", this.$treeFontSize.val() + "%");diff --git a/src/public/javascripts/dialogs/options/sidebar.js b/src/public/javascripts/dialogs/options/sidebar.jsindex 27372345d2..9ba36d2641 100644--- a/src/public/javascripts/dialogs/options/sidebar.js+++ b/src/public/javascripts/dialogs/options/sidebar.js@@ -3,45 +3,6 @@ import server from "../../services/server.js";import optionsService from "../../services/options.js";const TPL = `-<h4>Show sidebar in new tab</h4>--<div class="form-check">- <input type="checkbox" class="form-check-input" id="show-sidebar-in-new-tab">- <label class="form-check-label" for="show-sidebar-in-new-tab">Show sidebar in new tab</label>-</div>--<br>--<h4>Sidebar sizing</h4>--<div class="form-group row">- <div class="col-6">- <label for="sidebar-min-width">Sidebar minimum width (in pixels)</label>-- <div class="input-group">- <input type="number" class="form-control" id="sidebar-min-width" min="100" max="2000" step="1"/>-- <div class="input-group-append">- <span class="input-group-text">px</span>- </div>- </div>- </div>-- <div class="col-6">- <label for="left-pane-min-width">Sidebar width percent of the detail pane</label>-- <div class="input-group">- <input type="number" class="form-control" id="sidebar-width-percent" min="0" max="70" step="1"/>-- <div class="input-group-append">- <span class="input-group-text">%</span>- </div>- </div>- </div>-</div>--<p>Sidebar width is calculated from the percent of the detail pane, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width sidebar, set minimum width to the desired width and set percent to 0.</p>-<h4>Widgets</h4><div id="widgets-configuration" class="row">@@ -58,48 +19,15 @@ export default class SidebarOptions {constructor() {$("#options-sidebar").html(TPL);- this.$sidebarMinWidth = $("#sidebar-min-width");- this.$sidebarWidthPercent = $("#sidebar-width-percent");- this.$showSidebarInNewTab = $("#show-sidebar-in-new-tab");this.$widgetsConfiguration = $("#widgets-configuration");this.$widgetsEnabled = $("#widgets-enabled");this.$widgetsDisabled = $("#widgets-disabled");-- this.$sidebarMinWidth.on('change', async () => {- await server.put('options/sidebarMinWidth/' + this.$sidebarMinWidth.val());-- this.resizeSidebar();- });-- this.$sidebarWidthPercent.on('change', async () => {- await server.put('options/sidebarWidthPercent/' + this.$sidebarWidthPercent.val());-- this.resizeSidebar();- });-- this.$showSidebarInNewTab.on('change', async () => {- const flag = this.$showSidebarInNewTab.is(":checked") ? 'true' : 'false';-- await server.put('options/showSidebarInNewTab/' + flag);-- optionsService.reloadOptions();- });}async optionsLoaded(options) {this.$widgetsEnabled.empty();this.$widgetsDisabled.empty();- this.$sidebarMinWidth.val(options.sidebarMinWidth);- this.$sidebarWidthPercent.val(options.sidebarWidthPercent);-- if (options.showSidebarInNewTab === 'true') {- this.$showSidebarInNewTab.attr("checked", "checked");- }- else {- this.$showSidebarInNewTab.removeAttr("checked");- }-const widgets = [{name: 'attributes', title: 'Attributes'},{name: 'linkMap', title: 'Link map'},@@ -188,19 +116,4 @@ export default class SidebarOptions {return null;}}-- resizeSidebar() {- const sidebarWidthPercent = parseInt(this.$sidebarWidthPercent.val());- const sidebarMinWidth = this.$sidebarMinWidth.val();-- // need to find them dynamically since they change- const $sidebar = $("#right-pane");-- const $content = $(".note-detail-content");-- $sidebar.css("width", sidebarWidthPercent + '%');- $sidebar.css("min-width", sidebarMinWidth + 'px');-- $content.css("width", (100 - sidebarWidthPercent) + '%');- }}\ No newline at end of filediff --git a/src/public/javascripts/services/tab_row.js b/src/public/javascripts/services/tab_row.jsindex dde1d73066..d36f3b9562 100644--- a/src/public/javascripts/services/tab_row.js+++ b/src/public/javascripts/services/tab_row.js@@ -5,8 +5,6 @@* MIT license*/-import optionsService from './options.js';-!function(i,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return e(i,t)}):"object"==typeof module&&module.exports?module.exports=e(i,require("jquery")):i.jQueryBridget=e(i,i.jQuery)}(window,function(t,i){"use strict";var c=Array.prototype.slice,e=t.console,p=void 0===e?function(){}:function(t){e.error(t)};function n(d,o,u){(u=u||i||t.jQuery)&&(o.prototype.option||(o.prototype.option=function(t){u.isPlainObject(t)&&(this.options=u.extend(!0,this.options,t))}),u.fn[d]=function(t){if("string"==typeof t){var i=c.call(arguments,1);return s=i,a="$()."+d+'("'+(r=t)+'")',(e=this).each(function(t,i){var e=u.data(i,d);if(e){var n=e[r];if(n&&"_"!=r.charAt(0)){var o=n.apply(e,s);h=void 0===h?o:h}else p(a+" is not a valid method")}else p(d+" not initialized. Cannot call methods, i.e. "+a)}),void 0!==h?h:e}var e,r,s,h,a,n;return n=t,this.each(function(t,i){var e=u.data(i,d);e?(e.option(n),e._init()):(e=new o(i,n),u.data(i,d,e))}),this},r(u))}function r(t){!t||t&&t.bridget||(t.bridget=n)}return r(i||t.jQuery),n}),function(t,i){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return i()}):"object"==typeof module&&module.exports?module.exports=i():t.getSize=i()}(window,function(){"use strict";function m(t){var i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},y=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],b=y.length;function E(t){var i=getComputedStyle(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}var _,x=!1;function P(t){if(function(){if(!x){x=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(t);var e=E(t);P.isBoxSizeOuter=_=200==m(e.width),i.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=E(t);if("none"==i.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},i=0;i<b;i++)t[y[i]]=0;return t}();var e={};e.width=t.offsetWidth,e.height=t.offsetHeight;for(var n=e.isBorderBox="border-box"==i.boxSizing,o=0;o<b;o++){var r=y[o],s=i[r],h=parseFloat(s);e[r]=isNaN(h)?0:h}var a=e.paddingLeft+e.paddingRight,d=e.paddingTop+e.paddingBottom,u=e.marginLeft+e.marginRight,c=e.marginTop+e.marginBottom,p=e.borderLeftWidth+e.borderRightWidth,f=e.borderTopWidth+e.borderBottomWidth,g=n&&_,l=m(i.width);!1!==l&&(e.width=l+(g?0:a+p));var v=m(i.height);return!1!==v&&(e.height=v+(g?0:d+f)),e.innerWidth=e.width-(a+p),e.innerHeight=e.height-(d+f),e.outerWidth=e.width+u,e.outerHeight=e.height+c,e}}return P}),function(t,i){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",i):"object"==typeof module&&module.exports?module.exports=i():t.EvEmitter=i()}("undefined"!=typeof window?window:this,function(){function t(){}var i=t.prototype;return i.on=function(t,i){if(t&&i){var e=this._events=this._events||{},n=e[t]=e[t]||[];return-1==n.indexOf(i)&&n.push(i),this}},i.once=function(t,i){if(t&&i){this.on(t,i);var e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this}},i.off=function(t,i){var e=this._events&&this._events[t];if(e&&e.length){var n=e.indexOf(i);return-1!=n&&e.splice(n,1),this}},i.emitEvent=function(t,i){var e=this._events&&this._events[t];if(e&&e.length){e=e.slice(0),i=i||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<e.length;o++){var r=e[o];n&&n[r]&&(this.off(t,r),delete n[r]),r.apply(this,i)}return this}},i.allOff=function(){delete this._events,delete this._onceEvents},t}),function(i,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(t){return e(i,t)}):"object"==typeof module&&module.exports?module.exports=e(i,require("ev-emitter")):i.Unipointer=e(i,i.EvEmitter)}(window,function(o,t){function i(){}var e=i.prototype=Object.create(t.prototype);e.bindStartEvent=function(t){this._bindStartEvent(t,!0)},e.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},e._bindStartEvent=function(t,i){var e=(i=void 0===i||i)?"addEventListener":"removeEventListener",n="mousedown";o.PointerEvent?n="pointerdown":"ontouchstart"in o&&(n="touchstart"),t[e](n,this)},e.handleEvent=function(t){var i="on"+t.type;this[i]&&this[i](t)},e.getTouch=function(t){for(var i=0;i<t.length;i++){var e=t[i];if(e.identifier==this.pointerIdentifier)return e}},e.onmousedown=function(t){var i=t.button;i&&0!==i&&1!==i||this._pointerDown(t,t)},e.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},e.onpointerdown=function(t){this._pointerDown(t,t)},e._pointerDown=function(t,i){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i))},e.pointerDown=function(t,i){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i])};var n={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return e._bindPostStartEvents=function(t){if(t){var i=n[t.type];i.forEach(function(t){o.addEventListener(t,this)},this),this._boundPointerEvents=i}},e._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(t){o.removeEventListener(t,this)},this),delete this._boundPointerEvents)},e.onmousemove=function(t){this._pointerMove(t,t)},e.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},e.ontouchmove=function(t){var i=this.getTouch(t.changedTouches);i&&this._pointerMove(t,i)},e._pointerMove=function(t,i){this.pointerMove(t,i)},e.pointerMove=function(t,i){this.emitEvent("pointerMove",[t,i])},e.onmouseup=function(t){this._pointerUp(t,t)},e.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},e.ontouchend=function(t){var i=this.getTouch(t.changedTouches);i&&this._pointerUp(t,i)},e._pointerUp=function(t,i){this._pointerDone(),this.pointerUp(t,i)},e.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i])},e._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},e._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},e.pointerDone=function(){},e.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},e.ontouchcancel=function(t){var i=this.getTouch(t.changedTouches);i&&this._pointerCancel(t,i)},e._pointerCancel=function(t,i){this._pointerDone(),this.pointerCancel(t,i)},e.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])},i.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}},i}),function(i,e){"function"==typeof define&&define.amd?define("unidragger/unidragger",["unipointer/unipointer"],function(t){return e(i,t)}):"object"==typeof module&&module.exports?module.exports=e(i,require("unipointer")):i.Unidragger=e(i,i.Unipointer)}(window,function(r,t){function i(){}var e=i.prototype=Object.create(t.prototype);e.bindHandles=function(){this._bindHandles(!0)},e.unbindHandles=function(){this._bindHandles(!1)},e._bindHandles=function(t){for(var i=(t=void 0===t||t)?"addEventListener":"removeEventListener",e=t?this._touchActionValue:"",n=0;n<this.handles.length;n++){var o=this.handles[n];this._bindStartEvent(o,t),o[i]("click",this),r.PointerEvent&&(o.style.touchAction=e)}},e._touchActionValue="none",e.pointerDown=function(t,i){this.okayPointerDown(t)&&(this.pointerDownPointer=i,t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i]))};var o={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},s={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return e.okayPointerDown=function(t){var i=o[t.target.nodeName],e=s[t.target.type],n=!i||e;return n||this._pointerReset(),n},e.pointerDownBlur=function(){var t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},e.pointerMove=function(t,i){var e=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,e]),this._dragMove(t,i,e)},e._dragPointerMove=function(t,i){var e={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(e)&&this._dragStart(t,i),e},e.hasDragStarted=function(t){return 3<Math.abs(t.x)||3<Math.abs(t.y)},e.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]),this._dragPointerUp(t,i)},e._dragPointerUp=function(t,i){this.isDragging?this._dragEnd(t,i):this._staticClick(t,i)},e._dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,i)},e.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])},e._dragMove=function(t,i,e){this.isDragging&&this.dragMove(t,i,e)},e.dragMove=function(t,i,e){t.preventDefault(),this.emitEvent("dragMove",[t,i,e])},e._dragEnd=function(t,i){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,i)},e.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])},e.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},e._staticClick=function(t,i){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,i),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},e.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])},i.getPointerPoint=t.getPointerPoint,i}),function(e,n){"function"==typeof define&&define.amd?define(["get-size/get-size","unidragger/unidragger"],function(t,i){return n(e,t,i)}):"object"==typeof module&&module.exports?module.exports=n(e,require("get-size"),require("unidragger")):e.Draggabilly=n(e,e.getSize,e.Unidragger)}(window,function(r,a,t){function e(t,i){for(var e in i)t[e]=i[e];return t}var n=r.jQuery;function i(t,i){this.element="string"==typeof t?document.querySelector(t):t,n&&(this.$element=n(this.element)),this.options=e({},this.constructor.defaults),this.option(i),this._create()}var o=i.prototype=Object.create(t.prototype);i.defaults={},o.option=function(t){e(this.options,t)};var s={relative:!0,absolute:!0,fixed:!0};function d(t,i,e){return e=e||"round",i?Math[e](t/i)*i:t}return o._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=e({},this.position);var t=getComputedStyle(this.element);s[t.position]||(this.element.style.position="relative"),this.on("pointerDown",this.onPointerDown),this.on("pointerMove",this.onPointerMove),this.on("pointerUp",this.onPointerUp),this.enable(),this.setHandles()},o.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},o.dispatchEvent=function(t,i,e){var n=[i].concat(e);this.emitEvent(t,n),this.dispatchJQueryEvent(t,i,e)},o.dispatchJQueryEvent=function(t,i,e){var n=r.jQuery;if(n&&this.$element){var o=n.Event(i);o.type=t,this.$element.trigger(o,e)}},o._getPosition=function(){var t=getComputedStyle(this.element),i=this._getPositionCoord(t.left,"width"),e=this._getPositionCoord(t.top,"height");this.position.x=isNaN(i)?0:i,this.position.y=isNaN(e)?0:e,this._addTransformPosition(t)},o._getPositionCoord=function(t,i){if(-1!=t.indexOf("%")){var e=a(this.element.parentNode);return e?parseFloat(t)/100*e[i]:0}return parseInt(t,10)},o._addTransformPosition=function(t){var i=t.transform;if(0===i.indexOf("matrix")){var e=i.split(","),n=0===i.indexOf("matrix3d")?12:4,o=parseInt(e[n],10),r=parseInt(e[n+1],10);this.position.x+=o,this.position.y+=r}},o.onPointerDown=function(t,i){this.element.classList.add("is-pointer-down"),this.dispatchJQueryEvent("pointerDown",t,[i])},o.dragStart=function(t,i){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",t,[i]),this.animate())},o.measureContainment=function(){var t=this.getContainer();if(t){var i=a(this.element),e=a(t),n=this.element.getBoundingClientRect(),o=t.getBoundingClientRect(),r=e.borderLeftWidth+e.borderRightWidth,s=e.borderTopWidth+e.borderBottomWidth,h=this.relativeStartPosition={x:n.left-(o.left+e.borderLeftWidth),y:n.top-(o.top+e.borderTopWidth)};this.containSize={width:e.width-r-h.x-i.width,height:e.height-s-h.y-i.height}}},o.getContainer=function(){var t=this.options.containment;if(t)return t instanceof HTMLElement?t:"string"==typeof t?document.querySelector(t):this.element.parentNode},o.onPointerMove=function(t,i,e){this.dispatchJQueryEvent("pointerMove",t,[i,e])},o.dragMove=function(t,i,e){if(this.isEnabled){var n=e.x,o=e.y,r=this.options.grid,s=r&&r[0],h=r&&r[1];n=d(n,s),o=d(o,h),n=this.containDrag("x",n,s),o=this.containDrag("y",o,h),n="y"==this.options.axis?0:n,o="x"==this.options.axis?0:o,this.position.x=this.startPosition.x+n,this.position.y=this.startPosition.y+o,this.dragPoint.x=n,this.dragPoint.y=o,this.dispatchEvent("dragMove",t,[i,e])}},o.containDrag=function(t,i,e){if(!this.options.containment)return i;var n="x"==t?"width":"height",o=d(-this.relativeStartPosition[t],e,"ceil"),r=this.containSize[n];return r=d(r,e,"floor"),Math.max(o,Math.min(r,i))},o.onPointerUp=function(t,i){this.element.classList.remove("is-pointer-down"),this.dispatchJQueryEvent("pointerUp",t,[i])},o.dragEnd=function(t,i){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",t,[i]))},o.animate=function(){if(this.isDragging){this.positionDrag();var t=this;requestAnimationFrame(function(){t.animate()})}},o.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},o.positionDrag=function(){this.element.style.transform="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},o.staticClick=function(t,i){this.dispatchEvent("staticClick",t,[i])},o.setPosition=function(t,i){this.position.x=t,this.position.y=i,this.setLeftTop()},o.enable=function(){this.isEnabled=!0},o.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},o.destroy=function(){this.disable(),this.element.style.transform="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},o._init=function(){},n&&n.bridget&&n.bridget("draggabilly",i),i});const Draggabilly = window.Draggabilly;diff --git a/src/routes/api/options.js b/src/routes/api/options.jsindex 06e4b1a067..e71cbb46c2 100644--- a/src/routes/api/options.js+++ b/src/routes/api/options.js@@ -13,11 +13,6 @@ const ALLOWED_OPTIONS = new Set(['syncServerHost','syncServerTimeout','syncProxy',- 'leftPaneMinWidth',- 'leftPaneWidthPercent',- 'sidebarMinWidth',- 'sidebarWidthPercent',- 'showSidebarInNewTab','hoistedNoteId','mainFontSize','treeFontSize',diff --git a/src/routes/index.js b/src/routes/index.jsindex 2896a3b626..67c307e569 100644--- a/src/routes/index.js+++ b/src/routes/index.js@@ -18,12 +18,6 @@ async function index(req, res) {res.render(view, {csrfToken: csrfToken,theme: options.theme,- leftPaneMinWidth: parseInt(options.leftPaneMinWidth),- leftPaneWidthPercent: parseInt(options.leftPaneWidthPercent),- rightPaneWidthPercent: 100 - parseInt(options.leftPaneWidthPercent),- sidebarMinWidth: parseInt(options.sidebarMinWidth),- sidebarWidthPercent: parseInt(options.sidebarWidthPercent),- contentWidthPercent: 100 - parseInt(options.sidebarWidthPercent),mainFontSize: parseInt(options.mainFontSize),treeFontSize: parseInt(options.treeFontSize),detailFontSize: parseInt(options.detailFontSize),diff --git a/src/services/options_init.js b/src/services/options_init.jsindex 1afc7659ba..a2b69f618e 100644--- a/src/services/options_init.js+++ b/src/services/options_init.js@@ -33,7 +33,6 @@ async function initNotSyncedOptions(initialized, startNotePath = 'root', opts =notePath: startNotePath,active: true,sidebar: {- visible: true,widgets: []}}@@ -61,14 +60,9 @@ const defaultOptions = [{ name: 'protectedSessionTimeout', value: '600', isSynced: true },{ name: 'hoistedNoteId', value: 'root', isSynced: false },{ name: 'zoomFactor', value: '1.0', isSynced: false },- { name: 'leftPaneMinWidth', value: '350', isSynced: false },- { name: 'leftPaneWidthPercent', value: '20', isSynced: false },{ name: 'mainFontSize', value: '100', isSynced: false },{ name: 'treeFontSize', value: '100', isSynced: false },{ name: 'detailFontSize', value: '110', isSynced: false },- { name: 'sidebarMinWidth', value: '350', isSynced: false },- { name: 'sidebarWidthPercent', value: '25', isSynced: false },- { name: 'showSidebarInNewTab', value: 'true', isSynced: false },{ name: 'calendarWidget', value: '{"enabled":true,"expanded":true,"position":20}', isSynced: false },{ name: 'editedNotesWidget', value: '{"enabled":true,"expanded":true,"position":50}', isSynced: false },{ name: 'noteInfoWidget', value: '{"enabled":true,"expanded":true,"position":100}', isSynced: false },diff --git a/src/views/desktop.ejs b/src/views/desktop.ejsindex bf2aecd027..3956dff39a 100644--- a/src/views/desktop.ejs+++ b/src/views/desktop.ejs@@ -10,7 +10,7 @@<div id="toast-container" class="d-flex flex-column justify-content-center align-items-center"></div>-<div id="container" style="display: none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) minmax(0, <%= rightPaneWidthPercent %>fr)">+<div id="container" style="display: none;"><div style="display: flex;"><div><div class="dropdown" id="global-menu">