diff --git a/src/config.js b/src/config.js index 996b0ac0..b7ffd543 100644 --- a/src/config.js +++ b/src/config.js @@ -77,7 +77,8 @@ export const defaultConfiguration = { packages: { manifest: '/metadata.json', - metadata: [] + metadata: [], + hidden: [] }, // FIXME: Move into packages above ?! diff --git a/src/desktop.js b/src/desktop.js index 6bfa4164..a6024e1a 100644 --- a/src/desktop.js +++ b/src/desktop.js @@ -866,6 +866,7 @@ export default class Desktop extends EventEmitter { */ getRect() { const root = this.core.$root; + // FIXME: Is this now wrong because panels are not on the root anymore ?! const {left, top, right, bottom} = this.subtract; const width = root.offsetWidth - left - right; const height = root.offsetHeight - top - bottom; diff --git a/src/packages.js b/src/packages.js index 1f765b96..0bb744c9 100644 --- a/src/packages.js +++ b/src/packages.js @@ -409,6 +409,7 @@ export default class Packages { const user = this.core.getUser(); const metadata = this.metadata.map(m => ({...m})); + const hidden = this.core.config('packages.hidden', []); const filterGroups = iter => { const m = iter.strictGroups === false ? 'some' : 'every'; @@ -422,9 +423,14 @@ export default class Packages { ? user.blacklist.indexOf(iter.name) === -1 : true; + const filterConfigHidden = iter => hidden instanceof Array + ? hidden.indexOf(iter.name) === -1 + : true; + return metadata .filter(filterGroups) .filter(filterBlacklist) + .filter(filterConfigHidden) .filter(filter); }