diff --git a/src/app/components/plugin-manager-component.js b/src/app/components/plugin-manager-component.js index 6c659691ff..c40969b406 100644 --- a/src/app/components/plugin-manager-component.js +++ b/src/app/components/plugin-manager-component.js @@ -4,8 +4,21 @@ const csjs = require('csjs-inject') const EventEmitter = require('events') const css = csjs` - .pluginManager { + .pluginSearch { padding: 10px; + position: sticky; + top: 0; + z-index: 2; + } + .displayName { + text-transform: capitalize; + } + .description { + text-transform: capitalize; + } + .row { + display: flex; + flex-direction: row; } ` @@ -44,23 +57,29 @@ class PluginManagerComponent { this.store.event.on('remove', (entity) => { this.reRender() }) } - renderItem (item) { - const mod = this.store.getOne(item) + renderItem (name) { + const mod = this.store.getOne(name) if (!mod) return - const isActive = this.store.actives.includes(mod.profile.name) - const displayName = (mod.profile.displayName) ? mod.profile.displayName : mod.profile.name - - const input = isActive - ? yo`` - : yo`` + const isActive = this.store.actives.includes(name) + const displayName = (mod.profile.displayName) ? mod.profile.displayName : name + + const activationButton = isActive + ? yo` + ` + : yo` + ` return yo` -
-
- ${input} -
${displayName}
+
+
+
${displayName}
+ ${activationButton}
-

${mod.profile.description}

+

${mod.profile.description}

` } @@ -87,24 +106,39 @@ class PluginManagerComponent { }, { actives: [], inactives: [] }) const activeTile = actives.length !== 0 - ? yo`

Active Modules

` + ? yo` + ` : '' const inactiveTile = inactives.length !== 0 - ? yo`

Inactive Modules

` + ? yo` + ` : '' const rootView = yo` -
-

Plugin Manager

-
-
+
+ +
- ${activeTile} - ${actives.map(name => this.renderItem(name))} - ${inactiveTile} - ${inactives.map(name => this.renderItem(name))} -
+
+ ${activeTile} +
+ ${actives.map(name => this.renderItem(name))} +
+ ${inactiveTile} +
+ ${inactives.map(name => this.renderItem(name))} +
+
+
` if (!this.views.root) this.views.root = rootView return rootView