31 lines
727 B
JavaScript
31 lines
727 B
JavaScript
Component({
|
|
options: {
|
|
styleIsolation: 'isolated'
|
|
},
|
|
properties: {
|
|
open: { type: Boolean, value: false },
|
|
sessions: { type: Array, value: [] },
|
|
sessionsLoading: { type: Boolean, value: false },
|
|
userName: { type: String, value: '' },
|
|
userSub: { type: String, value: '' },
|
|
avatarChar: { type: String, value: '?' },
|
|
currentSid: { type: null, value: null }
|
|
},
|
|
methods: {
|
|
_stop() {},
|
|
_onClose() {
|
|
this.triggerEvent('close')
|
|
},
|
|
_onNewChat() {
|
|
this.triggerEvent('newchat')
|
|
},
|
|
_onSelect(e) {
|
|
const id = e.currentTarget.dataset.id
|
|
this.triggerEvent('selectsession', { id })
|
|
},
|
|
_onLogout() {
|
|
this.triggerEvent('logout')
|
|
}
|
|
}
|
|
})
|