mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
use location hint
This commit is contained in:
+11
-1
@@ -750,6 +750,10 @@ speechSynthesis.getVoices();
|
|||||||
template: '<span @click="showWorldDialog" :class="{ \'x-link\': link && this.location !== \'private\' && this.location !== \'offline\'}">{{ text }}<slot></slot></span>',
|
template: '<span @click="showWorldDialog" :class="{ \'x-link\': link && this.location !== \'private\' && this.location !== \'offline\'}">{{ text }}<slot></slot></span>',
|
||||||
props: {
|
props: {
|
||||||
location: String,
|
location: String,
|
||||||
|
hint: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
link: {
|
link: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
@@ -767,6 +771,12 @@ speechSynthesis.getVoices();
|
|||||||
this.text = 'Offline';
|
this.text = 'Offline';
|
||||||
} else if (L.isPrivate) {
|
} else if (L.isPrivate) {
|
||||||
this.text = 'Private';
|
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) {
|
} else if (L.worldId) {
|
||||||
var ref = API.cachedWorlds.get(L.worldId);
|
var ref = API.cachedWorlds.get(L.worldId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
@@ -4719,7 +4729,7 @@ speechSynthesis.getVoices();
|
|||||||
tableData = {
|
tableData = {
|
||||||
created_at: gameLog.dt,
|
created_at: gameLog.dt,
|
||||||
type: 'Location',
|
type: 'Location',
|
||||||
data: gameLog.location
|
data: [gameLog.location, gameLog.worldName]
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -183,7 +183,7 @@ html
|
|||||||
el-table-column(label="Type" prop="type" width="120")
|
el-table-column(label="Type" prop="type" width="120")
|
||||||
el-table-column(label="Detail" prop="data")
|
el-table-column(label="Detail" prop="data")
|
||||||
template(v-once #default="scope")
|
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)")
|
span.x-link(v-else-if="scope.row.type !== 'Notification'" v-text="scope.row.data" @click="lookupUser(scope.row.data)")
|
||||||
|
|
||||||
//- search
|
//- search
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ function parseRawGameLog(dt, type, args) {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 'location':
|
case 'location':
|
||||||
gameLog.location = args[0];
|
gameLog.location = args[0];
|
||||||
break;
|
gameLog.worldName = args[1];
|
||||||
|
|
||||||
case 'world':
|
|
||||||
gameLog.worldName = args[0];
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'player-joined':
|
case 'player-joined':
|
||||||
|
|||||||
+11
-1
@@ -446,7 +446,11 @@ speechSynthesis.getVoices();
|
|||||||
Vue.component('location', {
|
Vue.component('location', {
|
||||||
template: '<span>{{ text }}<slot></slot></span>',
|
template: '<span>{{ text }}<slot></slot></span>',
|
||||||
props: {
|
props: {
|
||||||
location: String
|
location: String,
|
||||||
|
hint: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -460,6 +464,12 @@ speechSynthesis.getVoices();
|
|||||||
this.text = 'Offline';
|
this.text = 'Offline';
|
||||||
} else if (L.isPrivate) {
|
} else if (L.isPrivate) {
|
||||||
this.text = 'Private';
|
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) {
|
} else if (L.worldId) {
|
||||||
var ref = API.cachedWorlds.get(L.worldId);
|
var ref = API.cachedWorlds.get(L.worldId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
|
|||||||
+2
-2
@@ -57,7 +57,7 @@ html
|
|||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
span.time {{ feed.created_at | formatDate('HH:MI') }}
|
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 }")
|
div(v-else-if="feed.type === 'invite'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
@@ -159,7 +159,7 @@ html
|
|||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
span.time {{ feed.created_at | formatDate('HH:MI') }}
|
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 }")
|
div(v-else-if="feed.type === 'invite'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
|
|||||||
Reference in New Issue
Block a user