From ca5467addbc60886b5b858cff41304244799fa6b Mon Sep 17 00:00:00 2001 From: Jiiks Date: Mon, 29 Jan 2018 20:00:31 +0200 Subject: [PATCH] add vue usings --- client/src/index.js | 2 +- client/src/ui/bdui.js | 10 ++++++++++ client/src/ui/components/BdSettingsWrapper.vue | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/index.js b/client/src/index.js index 69a2bba0..52a9120a 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -19,7 +19,7 @@ class BetterDiscord { } globalReady() { - BdUI.injectUi(); + this.vueInstance = BdUI.injectUi(); } } diff --git a/client/src/ui/bdui.js b/client/src/ui/bdui.js index 2b653680..d5a818b7 100644 --- a/client/src/ui/bdui.js +++ b/client/src/ui/bdui.js @@ -10,10 +10,18 @@ import Dom from './dom'; import Vue from 'vue'; +import VTooltip from 'v-tooltip'; import { BdSettingsWrapper } from './components'; export default class { static injectUi() { + Vue.use(VTooltip, { + defaultContainer: 'bdtooltips', + defaultClass: 'bd-tooltip', + defaultTargetClass: 'bd-has-tooltip', + defaultInnerSelector: '.bd-tooltip-inner', + defaultTemplate: '
' + }); Dom.createElement('div', null, 'bd-settings').appendTo(Dom.bdBody); @@ -22,5 +30,7 @@ export default class { components: { BdSettingsWrapper }, template: '' }); + + return vueInstance; } } \ No newline at end of file diff --git a/client/src/ui/components/BdSettingsWrapper.vue b/client/src/ui/components/BdSettingsWrapper.vue index 94597892..13b12a1b 100644 --- a/client/src/ui/components/BdSettingsWrapper.vue +++ b/client/src/ui/components/BdSettingsWrapper.vue @@ -1,5 +1,5 @@