diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-12-06 15:26:28 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-12-06 17:02:51 +0300 |
commit | 65ce04fe0d8ddf2a7a9534867006155df40501b0 (patch) | |
tree | f1110b8b1fba33619035ca2bfec96a859efad7e7 /src | |
parent | d40f1b8437aa85b67f79063d63d0c65897a4d445 (diff) |
Fix avatar component usage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/SessionList.vue | 12 | ||||
-rw-r--r-- | src/services/PollingBackend.js | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/components/SessionList.vue b/src/components/SessionList.vue index 376085a16..f34f86607 100644 --- a/src/components/SessionList.vue +++ b/src/components/SessionList.vue @@ -22,11 +22,12 @@ <template> <div class="session-list"> - <div v-tooltip.left="editorsTooltip" class="avatar-list" @click="popoverVisible=!popoverVisible"> + <div v-tooltip.bottom="editorsTooltip" class="avatar-list" @click="popoverVisible=!popoverVisible"> <div v-if="sessionsPopover.length > 0" class="avatardiv icon-more" /> <Avatar v-for="session in sessionsVisible" :key="session.id" - :url="avatarUrl(session)" + :user="session.userId ? session.userId : session.guestName" + :is-guest="session.userId === null" :disable-tooltip="true" :style="sessionStyle(session)" :size="32" /> @@ -92,7 +93,12 @@ export default { }, activeSessions() { return Object.values(this.sessions).filter((session) => - session.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME && !session.isCurrent && session.userId !== null) + session.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME && !session.isCurrent + && (session.userId !== null || session.guestName !== null) + ) + }, + currentSession() { + return Object.values(this.sessions).find((session) => session.isCurrent) }, sessionStyle() { return (session) => { diff --git a/src/services/PollingBackend.js b/src/services/PollingBackend.js index ad20f1857..239f7230a 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -160,7 +160,7 @@ class PollingBackend { this._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {}) } else { this.increaseRefetchTimer() - this._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {retry: false}) + this._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, { retry: false }) console.error('Failed to fetch steps due to other reason', e) } }) |