diff --git a/html/src/app.js b/html/src/app.js index 0bb5d737..1f2776c5 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -750,6 +750,10 @@ speechSynthesis.getVoices(); template: '{{ text }}', props: { location: String, + hint: { + type: String, + default: '' + }, link: { type: Boolean, default: true @@ -767,6 +771,12 @@ speechSynthesis.getVoices(); this.text = 'Offline'; } else if (L.isPrivate) { this.text = 'Private'; + } else if (typeof this.hint === 'string' && this.hint !== '') { + if (L.instanceId) { + this.text = `${this.hint} #${L.instanceName} ${L.accessType}`; + } else { + this.text = this.hint; + } } else if (L.worldId) { var ref = API.cachedWorlds.get(L.worldId); if (typeof ref === 'undefined') { @@ -4719,7 +4729,7 @@ speechSynthesis.getVoices(); tableData = { created_at: gameLog.dt, type: 'Location', - data: gameLog.location + data: [gameLog.location, gameLog.worldName] }; break; diff --git a/html/src/index.pug b/html/src/index.pug index a4b5b406..69b2640f 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -183,7 +183,7 @@ html el-table-column(label="Type" prop="type" width="120") el-table-column(label="Detail" prop="data") template(v-once #default="scope") - location(v-if="scope.row.type === 'Location'" :location="scope.row.data") + location(v-if="scope.row.type === 'Location'" :location="scope.row.data[0]" :hint="scope.row.data[1]") span.x-link(v-else-if="scope.row.type !== 'Notification'" v-text="scope.row.data" @click="lookupUser(scope.row.data)") //- search diff --git a/html/src/service/gamelog.js b/html/src/service/gamelog.js index 3683e86b..44438cb3 100644 --- a/html/src/service/gamelog.js +++ b/html/src/service/gamelog.js @@ -12,10 +12,7 @@ function parseRawGameLog(dt, type, args) { switch (type) { case 'location': gameLog.location = args[0]; - break; - - case 'world': - gameLog.worldName = args[0]; + gameLog.worldName = args[1]; break; case 'player-joined': diff --git a/html/src/vr.js b/html/src/vr.js index b563344f..0f7dab6f 100644 --- a/html/src/vr.js +++ b/html/src/vr.js @@ -446,7 +446,11 @@ speechSynthesis.getVoices(); Vue.component('location', { template: '{{ text }}', props: { - location: String + location: String, + hint: { + type: String, + default: '' + } }, data() { return { @@ -460,6 +464,12 @@ speechSynthesis.getVoices(); this.text = 'Offline'; } else if (L.isPrivate) { this.text = 'Private'; + } else if (typeof this.hint === 'string' && this.hint !== '') { + if (L.instanceId) { + this.text = `${this.hint} #${L.instanceName} ${L.accessType}`; + } else { + this.text = this.hint; + } } else if (L.worldId) { var ref = API.cachedWorlds.get(L.worldId); if (typeof ref === 'undefined') { diff --git a/html/src/vr.pug b/html/src/vr.pug index 52eafde6..0c1ca683 100644 --- a/html/src/vr.pug +++ b/html/src/vr.pug @@ -57,7 +57,7 @@ html .detail span.extra span.time {{ feed.created_at | formatDate('HH:MI') }} - location(:location="feed.data") + location(:location="feed.data[0]" :hint="feed.data[1]") div(v-else-if="feed.type === 'invite'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }") .detail span.extra @@ -159,7 +159,7 @@ html .detail span.extra span.time {{ feed.created_at | formatDate('HH:MI') }} - location(:location="feed.data") + location(:location="feed.data[0]" :hint="feed.data[1]") div(v-else-if="feed.type === 'invite'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }") .detail span.extra