diff --git a/html/src/app.js b/html/src/app.js index dd0d767e..d8cfeaaa 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -4172,6 +4172,9 @@ speechSynthesis.getVoices(); break; } } + if (ctx.data === API.currentUser.displayName) { + isFriend = true; + } if (isFriend) { friendList.push(ctx.data); } @@ -8364,10 +8367,13 @@ speechSynthesis.getVoices(); } } } else if (L.isOffline === false) { - for (var { ref } of this.friends.values()) { - if ((typeof ref !== 'undefined') && - (ref.location === L.tag)) { - users.push(ref); + for (var friend of this.friends.values()) { + if ((typeof friend.ref !== 'undefined') && + (friend.ref.location === L.tag)) { + if ((friend.state !== 'online') && (friend.ref.location === 'private')) { + continue; + } + users.push(friend.ref); } } } @@ -9809,7 +9815,6 @@ speechSynthesis.getVoices(); if (D.accessType === 'invite+') { tags.push('~canRequestInvite'); } - } if (D.region !== 'USA') { if (D.region === 'Europe') { @@ -12510,6 +12515,11 @@ speechSynthesis.getVoices(); $app.methods.parseLocationUrl = function (location) { var url = new URL(location); + var urlPath = url.pathname; + if ('/world/' === urlPath.substring(5, 12)) { + var worldId = urlPath.substring(12); + return worldId; + } var urlParams = new URLSearchParams(url.search); var worldId = urlParams.get('worldId'); var instanceId = urlParams.get('instanceId'); diff --git a/html/src/index.pug b/html/src/index.pug index b0608174..0ff8b167 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -85,17 +85,19 @@ html template(v-once #default="scope") div(style="position:relative;font-size:14px") template(v-if="scope.row.type === 'GPS'") - location(:location="scope.row.location[1]") - el-tag(type="info" effect="plain" size="mini" style="margin-left:5px") {{ scope.row.time | timeToText }} - br - span - i.el-icon-right - location(:location="scope.row.location[0]") + template(v-if="scope.row.location[1]") + location(:location="scope.row.location[1]") + el-tag(type="info" effect="plain" size="mini" style="margin-left:5px") {{ scope.row.time | timeToText }} + br + span + i.el-icon-right + location(v-if="scope.row.location[0]" :location="scope.row.location[0]") template(v-else-if="scope.row.type === 'Offline'") - location(:location="scope.row.location") - el-tag(type="info" effect="plain" size="mini" style="margin-left:5px") {{ scope.row.time | timeToText }} + template(v-if="scope.row.location") + location(:location="scope.row.location") + el-tag(type="info" effect="plain" size="mini" style="margin-left:5px") {{ scope.row.time | timeToText }} template(v-else-if="scope.row.type === 'Online'") - location(:location="scope.row.location") + location(v-if="scope.row.location" :location="scope.row.location") template(v-else-if="scope.row.type === 'Avatar'") template(v-if="scope.row.avatar[0] === Object(scope.row.avatar[0])") //- high resolution (v2) 2020.07.12~ @@ -152,9 +154,9 @@ html el-table-column(label="Detail") template(v-once #default="scope") template(v-if="scope.row.type === 'GPS'") - location(:location="scope.row.location[0]") + location(v-if="scope.row.location[0]" :location="scope.row.location[0]") template(v-else-if="scope.row.type === 'Offline' || scope.row.type === 'Online'") - location(:location="scope.row.location") + location(v-if="scope.row.location" :location="scope.row.location") template(v-else-if="scope.row.type === 'Status'") el-tooltip(placement="top") template(#content) diff --git a/html/src/vr.js b/html/src/vr.js index ac3da033..823abb27 100644 --- a/html/src/vr.js +++ b/html/src/vr.js @@ -382,6 +382,7 @@ speechSynthesis.getVoices(); instanceId: '', instanceName: '', accessType: '', + region: '', userId: null, hiddenId: null, privateId: null, @@ -417,6 +418,8 @@ speechSynthesis.getVoices(); ctx.friendsId = value; } else if (key === 'canRequestInvite') { ctx.canRequestInvite = true; + } else if (key === 'region') { + ctx.region = value; } } else { ctx.instanceName = s;