From d1d307decb837faa1c0b3531523e354b088958fb Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 14 Jan 2019 18:19:09 -0500 Subject: [PATCH] simplify support-tab --- src/app/tabs/support-tab.js | 62 +++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/src/app/tabs/support-tab.js b/src/app/tabs/support-tab.js index fa11b43e5c..153cc5a4a6 100644 --- a/src/app/tabs/support-tab.js +++ b/src/app/tabs/support-tab.js @@ -6,32 +6,37 @@ var globalRegistry = require('../../global/registry') var EventManager = require('../../lib/events') class SupportTab { + constructor (localRegistry) { - const self = this - self.event = new EventManager() - self._view = { el: null, gitterIframe: '', config: {} } - self.data = { gitterIsLoaded: false } - self._components = {} - self._components.registry = localRegistry || globalRegistry - - self._deps = { - app: self._components.registry.get('app').api + this.event = new EventManager() + + this.el = null + this.gitterIframe = '' + + this.data = { gitterIsLoaded: false } + this._components = {} + this._components.registry = localRegistry || globalRegistry + + this._deps = { + app: this._components.registry.get('app').api } - self._deps.app.event.register('tabChanged', (tabName) => { - if (tabName !== 'Support' || self.data.gitterIsLoaded) return + this._deps.app.event.register('tabChanged', (tabName) => { + if (tabName !== 'Support' || this.data.gitterIsLoaded) return const iframe = yo`