diff --git a/client/js/site-admin-app.js b/client/js/site-admin-app.js index 4c65a4b..009d304 100644 --- a/client/js/site-admin-app.js +++ b/client/js/site-admin-app.js @@ -4,7 +4,6 @@ 'use strict'; -const DTP_COMPONENT = { logId: 'site-admin-app', index: 'siteAdminApp', className: 'SiteAdminApp' }; const dtp = window.dtp = window.dtp || { }; const GRID_COLOR = '#a0a0a0'; @@ -27,8 +26,10 @@ import UIkit from 'uikit'; export default class DtpSiteAdminApp extends DtpApp { + static get COMPONENT ( ) { return { logId: 'site-admin-app', index: 'siteAdminApp', className: 'SiteAdminApp' }; } + constructor (user) { - super(DTP_COMPONENT, user); + super(DtpSiteAdminApp.COMPONENT, user); this.log.debug('constructor', 'app instance created'); } diff --git a/client/js/site-chat.js b/client/js/site-chat.js index aa06147..00a5874 100644 --- a/client/js/site-chat.js +++ b/client/js/site-chat.js @@ -4,7 +4,6 @@ 'use strict'; -const DTP_COMPONENT = { logId: 'site-chat', index: 'siteChat', className: 'DtpSiteChat' }; const dtp = window.dtp = window.dtp || { }; // jshint ignore:line const EMOJI_EXPLOSION_DURATION = 8000; @@ -17,9 +16,11 @@ import * as picmo from 'picmo'; export default class SiteChat { + static get COMPONENT ( ) { return { logId: 'site-chat', index: 'siteChat', className: 'DtpSiteChat' }; } + constructor (app) { this.app = app; - this.log = new DtpLog(DTP_COMPONENT); + this.log = new DtpLog(SiteChat.COMPONENT); this.ui = { menu: document.querySelector('#chat-room-menu'), diff --git a/client/js/site-reactions.js b/client/js/site-reactions.js index 77da099..0ed58ea 100644 --- a/client/js/site-reactions.js +++ b/client/js/site-reactions.js @@ -4,13 +4,14 @@ 'use strict'; -const DTP_COMPONENT = { logId: 'site-reactions', index: 'siteReactions', className: 'SiteReactions' }; const dtp = window.dtp = window.dtp || { }; // jshint ignore:line import DtpLog from 'dtp/dtp-log'; class Reaction { + static get COMPONENT ( ) { return { logId: 'reaction', index: 'reaction', className: 'Reaction' }; } + constructor (container, reaction) { this.container = container; this.reaction = reaction; @@ -96,8 +97,10 @@ class Reaction { export default class SiteReactions { + static get COMPONENT ( ) { return { logId: 'site-reactions', index: 'siteReactions', className: 'SiteReactions' }; } + constructor ( ) { - this.log = new DtpLog(DTP_COMPONENT); + this.log = new DtpLog(SiteReactions.COMPONENT); this.container = document.querySelector('#chat-reactions'); this.reactions = [ ]; diff --git a/lib/client/js/dtp-display-engine.js b/lib/client/js/dtp-display-engine.js index 18e6a5a..448ff00 100644 --- a/lib/client/js/dtp-display-engine.js +++ b/lib/client/js/dtp-display-engine.js @@ -14,7 +14,7 @@ export default class DtpDisplayEngine { constructor (app) { this.app = app; this.processors = { }; - this.log = new DtpLog(DtpDisplayEngine.DTP_COMPONENT); + this.log = new DtpLog(DtpDisplayEngine.COMPONENT); } /** diff --git a/lib/client/js/dtp-socket.js b/lib/client/js/dtp-socket.js index bddaa12..22c54f8 100644 --- a/lib/client/js/dtp-socket.js +++ b/lib/client/js/dtp-socket.js @@ -16,7 +16,7 @@ export default class DtpWebSocket { this.isConnected = false; this.isAuthenticated = false; this.joinedChannels = { }; - this.log = new DtpWebLog(DtpWebSocket.DTP_COMPONENT); + this.log = new DtpWebLog(DtpWebSocket.COMPONENT); } async connect (options) {