@@ -81,10 +81,9 @@ import * as storageService from '@/database/storage'
81
81
import { parseTimestamp , formatTimestamp } from ' @/utils/dates'
82
82
import logoAvatar from ' @/assets/logo.png'
83
83
84
- // import { register } from 'vue-advanced-chat'
84
+ import { register } from ' vue-advanced-chat'
85
85
// import { register } from './../../dist/vue-advanced-chat.es.js'
86
- import { register } from ' ./../../src/lib/index.js'
87
- import styles from ' ./../../src/styles/index.scss'
86
+ // import { register } from './../../src/lib/index.js'
88
87
register ()
89
88
90
89
export default {
@@ -137,6 +136,7 @@ export default {
137
136
{ name: ' deleteRoom' , title: ' Delete Room' }
138
137
],
139
138
messageSelectionActions: [{ name: ' deleteMessages' , title: ' Delete' }],
139
+ // eslint-disable-next-line vue/no-unused-properties
140
140
styles: { container: { borderRadius: ' 4px' } },
141
141
templatesText: [
142
142
{
@@ -166,18 +166,20 @@ export default {
166
166
},
167
167
168
168
mounted () {
169
- if (import .meta.env.MODE === ' development' ) {
170
- this .addCss ()
171
- }
169
+ this .addCss ()
170
+
172
171
this .fetchRooms ()
173
172
firebaseService .updateUserOnlineStatus (this .currentUserId )
174
173
},
175
174
176
175
methods: {
177
- addCss () {
178
- const style = document .createElement (' style' )
179
- style .innerHTML = styles
180
- this .$refs .chatWindow .shadowRoot .appendChild (style)
176
+ async addCss () {
177
+ if (import .meta.env.MODE === ' development' ) {
178
+ const styles = await import ('./../../src /styles /index .scss ')
179
+ const style = document .createElement ('style ')
180
+ style .innerHTML = styles .default
181
+ this .$refs .chatWindow .shadowRoot .appendChild (style )
182
+ }
181
183
},
182
184
resetRooms () {
183
185
this .loadingRooms = true
0 commit comments