From c3d6b6f2fae336816bc8712bdcdf2defde718bd4 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sat, 22 May 2021 16:25:28 +1200 Subject: [PATCH] Fixes for empty location + add Active user state --- html/src/app.dark.scss | 1 + html/src/app.js | 18 +++++++++++------- html/src/app.scss | 9 +++++++++ html/src/index.pug | 7 ++++--- html/src/vr.js | 5 ++++- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/html/src/app.dark.scss b/html/src/app.dark.scss index 2a895510..eb9a3b7f 100644 --- a/html/src/app.dark.scss +++ b/html/src/app.dark.scss @@ -318,6 +318,7 @@ button { } .x-friend-item > .avatar.active::after, +.x-friend-item > .avatar.online::after, .x-friend-item > .avatar.joinme::after, .x-friend-item > .avatar.askme::after, .x-friend-item > .avatar.busy::after { diff --git a/html/src/app.js b/html/src/app.js index 01bfc60e..6e71c442 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -5473,15 +5473,17 @@ speechSynthesis.getVoices(); if ((user.status !== 'active') && (id) && (id !== API.currentUser.id) && (!this.friendsGroup0_.filter(e => e.id === id).length > 0) && (!this.friendsGroup1_.filter(e => e.id === id).length > 0)) { + // Active + style.active = true; + } else if (user.location === 'offline') { // Offline style.offline = true; - } else if ((user.location === 'offline') || - ((user.state === 'active') && (user.location === 'private'))) { - // Offline - style.offline = true; + } else if (user.state === 'active') { + // Active + style.active = true; } else if (user.status === 'active') { // Online - style.active = true; + style.online = true; } else if (user.status === 'join me') { // Join Me style.joinme = true; @@ -5646,7 +5648,8 @@ speechSynthesis.getVoices(); } if ((props.location) && (props.location[0] !== 'offline') && - (props.location[1] !== 'offline')) { + (props.location[0] !== '') && + ((props.location[1] !== 'offline') && (props.location[0] !== 'private'))) { $app.addFeed('GPS', ref, { location: [ props.location[0], @@ -11449,7 +11452,8 @@ speechSynthesis.getVoices(); if ((this.worldAutoCacheGPS === 'Always') || ((this.worldAutoCacheGPS === 'Game Closed') && (!this.isGameRunning)) || ((this.worldAutoCacheGPS === 'Game Running') && (this.isGameRunning))) { - if ((feed.location === 'offline') || + if ((feed.location === '') || + (feed.location === 'offline') || (feed.location === 'private') || ((!this.worldAutoCacheGPSFilter) && (!API.cachedFavoritesByObjectId.has(feed.id)))) { diff --git a/html/src/app.scss b/html/src/app.scss index 47622330..56baa2f2 100644 --- a/html/src/app.scss +++ b/html/src/app.scss @@ -307,6 +307,7 @@ img.friends-list-avatar { } .x-friend-item > .avatar.active::after, +.x-friend-item > .avatar.online::after, .x-friend-item > .avatar.joinme::after, .x-friend-item > .avatar.askme::after, .x-friend-item > .avatar.busy::after { @@ -322,6 +323,10 @@ img.friends-list-avatar { } .x-friend-item > .avatar.active::after { + background: #dfca43; +} + +.x-friend-item > .avatar.online::after { background: #67c23a; } @@ -439,6 +444,10 @@ i.x-user-status { } i.x-user-status.active { + background: #dfca43; +} + +i.x-user-status.online { background: #67c23a; } diff --git a/html/src/index.pug b/html/src/index.pug index 6702f524..abd851d9 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -119,7 +119,7 @@ html template(v-else-if="scope.row.type === 'Status'") el-tooltip(placement="top") template(#content) - span(v-if="scope.row.status[1].status === 'active'") Online + span(v-if="scope.row.status[1].status === 'active'") Active span(v-else-if="scope.row.status[1].status === 'join me'") Join Me span(v-else-if="scope.row.status[1].status === 'ask me'") Ask Me span(v-else-if="scope.row.status[1].status === 'busy'") Do Not Disturb @@ -131,7 +131,7 @@ html i.el-icon-right el-tooltip(placement="top") template(#content) - span(v-if="scope.row.status[0].status === 'active'") Online + span(v-if="scope.row.status[0].status === 'active'") Active span(v-else-if="scope.row.status[0].status === 'join me'") Join Me span(v-else-if="scope.row.status[0].status === 'ask me'") Ask Me span(v-else-if="scope.row.status[0].status === 'busy'") Do Not Disturb @@ -1001,7 +1001,8 @@ html div el-tooltip(v-if="userDialog.ref.status" placement="top") template(#content) - span(v-if="userDialog.ref.location === 'offline'") Offline + span(v-if="userDialog.ref.state === 'active'") Active + span(v-else-if="userDialog.ref.location === 'offline'") Offline span(v-else-if="userDialog.ref.status === 'active'") Online span(v-else-if="userDialog.ref.status === 'join me'") Join Me span(v-else-if="userDialog.ref.status === 'ask me'") Ask Me diff --git a/html/src/vr.js b/html/src/vr.js index 4418cc95..383d3b22 100644 --- a/html/src/vr.js +++ b/html/src/vr.js @@ -980,9 +980,12 @@ speechSynthesis.getVoices(); if (user.location === 'offline') { // Offline style.offline = true; + } else if (user.state === 'active') { + // Active + style.active = true; } else if (user.status === 'active') { // Online - style.active = true; + style.online = true; } else if (user.status === 'join me') { // Join Me style.joinme = true;