From 176ce80cc0f848ec7a3f1b54a34cc89501441568 Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 28 Jan 2020 11:26:18 +0100 Subject: [PATCH 1/2] package: transpile yargs to keep compatibility with older node/electron --- scripts/build-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-server.js b/scripts/build-server.js index 08fe467b..13d6d4e5 100644 --- a/scripts/build-server.js +++ b/scripts/build-server.js @@ -34,7 +34,7 @@ build({ ], 'plugins': ['@babel/plugin-proposal-object-rest-spread'], 'global': true, - 'only': ['**/ws/'] + 'only': ['**/ws/', '**/yargs/'] }] ] })() From 7f4a4f8447c80d020fdb5bd6c2842bf1bd94cba1 Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 28 Jan 2020 11:36:49 +0100 Subject: [PATCH 2/2] tab: test setting detached as an option --- src/client/app/widgets/containers/tab.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/client/app/widgets/containers/tab.js b/src/client/app/widgets/containers/tab.js index a0921c76..e822a8c5 100644 --- a/src/client/app/widgets/containers/tab.js +++ b/src/client/app/widgets/containers/tab.js @@ -6,7 +6,14 @@ module.exports = class Tab extends Panel { static defaults() { - return Widget.defaults({}, ['_geometry', 'left', 'top', 'width', 'height'], { + return Widget.defaults({ + + _tab:'tab', + + detached: {type: 'boolean', value: true, help: [ + ]} + + }, ['_geometry', 'left', 'top', 'width', 'height'], { _children:'children', @@ -38,14 +45,14 @@ module.exports = class Tab extends Panel { hide() { if (this.detached) return - // this.container.removeChild(this.widget) + if (this.getProp('detached')) this.container.removeChild(this.widget) this.container.classList.remove('show') this.detached = true } show() { if (!this.detached) return - // this.container.appendChild(this.widget) + if (this.getProp('detached')) this.container.appendChild(this.widget) this.container.classList.add('show') this.detached = false resize.check(this.widget, true)