diff --git a/client/src/modules/contentmanager.js b/client/src/modules/contentmanager.js index d844b727..d9ceca08 100644 --- a/client/src/modules/contentmanager.js +++ b/client/src/modules/contentmanager.js @@ -11,6 +11,7 @@ import Globals from './globals'; import { FileUtils, ClientLogger as Logger } from 'common'; import path from 'path'; +import { Events } from 'modules'; export default class { @@ -32,6 +33,11 @@ export default class { await this.preloadContent(dir); } catch (err) { //We don't want every plugin/theme to fail loading when one does + Events.emit('bd-error', { + header: `${this.moduleName} - Failed to load plugin: ${dir}`, + text: err.message, + type: 'err' + }); Logger.err(this.moduleName, err); } } diff --git a/client/src/modules/pluginmanager.js b/client/src/modules/pluginmanager.js index 22303107..dfcd70a5 100644 --- a/client/src/modules/pluginmanager.js +++ b/client/src/modules/pluginmanager.js @@ -11,6 +11,7 @@ import ContentManager from './contentmanager'; import Plugin from './plugin'; import { ClientLogger as Logger } from 'common'; +import { Events } from 'modules'; export default class extends ContentManager { diff --git a/client/src/styles/partials/generic/modals.scss b/client/src/styles/partials/generic/modals.scss index 3247bedc..eac7f0dc 100644 --- a/client/src/styles/partials/generic/modals.scss +++ b/client/src/styles/partials/generic/modals.scss @@ -43,6 +43,37 @@ &.bd-modal-out { animation: bd-modal-out 0.22s ease; } + + .bd-modal-header .bd-modal-icon .bd-material-design-icon { + margin-right: 5px; + } + + &.bd-err { + .bd-modal-header .bd-modal-icon svg { + fill: $colerr; + } + } + + .bd-modal-body .bd-scroller-wrap .bd-scroller { + color: #FFF; + } + + .bd-modal-controls { + display: flex; + padding: 15px; + border-top: 1px solid #4a4a4a; + + .bd-modal-tip { + flex-grow: 1; + line-height: 26px; + color: #FFF; + } + + .bd-button { + padding: 5px 10px; + border-radius: 3px; + } + } } .bd-modal .bd-modal-inner { diff --git a/client/src/ui/components/bd/BdModals.vue b/client/src/ui/components/bd/BdModals.vue index 82b7ba2c..c0f968b7 100644 --- a/client/src/ui/components/bd/BdModals.vue +++ b/client/src/ui/components/bd/BdModals.vue @@ -6,7 +6,16 @@ - + +
+ {{modal.text}} +
+
+ Ctrl+Shift+I for more details +
+ OK +
+
diff --git a/client/src/ui/components/common/Modal.vue b/client/src/ui/components/common/Modal.vue index d115e274..7bc8b0cb 100644 --- a/client/src/ui/components/common/Modal.vue +++ b/client/src/ui/components/common/Modal.vue @@ -12,7 +12,9 @@
- +
+ +
{{headerText}}
diff --git a/tests/plugins/Example 2/index.js b/tests/plugins/Example 2/index.js index 7a9253c4..a4c0f1ca 100644 --- a/tests/plugins/Example 2/index.js +++ b/tests/plugins/Example 2/index.js @@ -1,4 +1,4 @@ -module.exports = (Plugin, Api, Vendor) => { +module.exports = (Plugin, Api, Vendor) => const { $, moment } = Vendor; const { Events } = Api;