From e16c1061eaff3665f757649ea3b2e7fd0e3f792c Mon Sep 17 00:00:00 2001 From: Grandschtroumpf Date: Thu, 13 Jun 2019 11:32:33 +0200 Subject: [PATCH] Add alpha / beta warning in plugin manager --- .../components/plugin-manager-component.js | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/app/components/plugin-manager-component.js b/src/app/components/plugin-manager-component.js index 690d55b37b..da4e938faa 100644 --- a/src/app/components/plugin-manager-component.js +++ b/src/app/components/plugin-manager-component.js @@ -24,6 +24,9 @@ const css = csjs` } .displayName { text-transform: capitalize; + display: flex; + flex-direction: column; + align-items: flex-start; } .description { text-transform: capitalize; @@ -36,6 +39,14 @@ const css = csjs` background-color: var(--primary); color: } + .versionWarning { + background-color: var(--light); + padding: 0 7px; + font-weight: bolder; + margin-top: 5px; + text-transform: lowercase; + cursor: default; + } ` const profile = { @@ -82,6 +93,17 @@ class PluginManagerComponent extends BaseApi { const isActive = this.store.actives.includes(name) const displayName = (api.profile.displayName) ? api.profile.displayName : name + // Check version of the plugin + let versionWarning + // Alpha + if (api.profile.version && api.profile.version.match(/\b(\w*alpha\w*)\b/g)) { + versionWarning = yo`alpha` + } + // Beta + if (api.profile.version && api.profile.version.match(/\b(\w*beta\w*)\b/g)) { + versionWarning = yo`beta` + } + const activationButton = isActive ? yo`