Apply default layout

pull/5327/head
Nick O'Leary 2025-10-29 11:01:13 +00:00
parent 41ed5c94b6
commit f690fcb295
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 6 additions and 1 deletions

View File

@ -29,9 +29,14 @@ RED.sidebar = (function() {
menuToggle: 'menu-item-palette',
minimumWidth: 180,
maximumWidth: 800,
// Make LH side slightly narrower by default as its the palette that doesn't require a lot of width
defaultWidth: 180
}
}
const defaultSidebarConfiguration = {
primary: ['info','debug','help','config','context'],
secondary: ['palette']
}
const knownTabs = {};
@ -79,7 +84,7 @@ RED.sidebar = (function() {
let targetTabButtonIndex = -1 // Append to end by default
// Check the saved sidebar state to see if this tab should be added to the primary or secondary sidebar
const savedState = RED.settings.get('editor.sidebar.state', null)
const savedState = RED.settings.get('editor.sidebar.state', defaultSidebarConfiguration)
if (savedState) {
let targetSidebar = null
let sidebarState