mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
👀 currentAvatarTags
This commit is contained in:
@@ -25,15 +25,12 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
|
|
||||||
var height = 110f;
|
var height = 110f;
|
||||||
if (content.Length > 100) {
|
if (content.Length > 300)
|
||||||
height += 90f;
|
height = 250f;
|
||||||
}
|
else if (content.Length > 200)
|
||||||
if (content.Length > 200) {
|
height = 200f;
|
||||||
height += 75f;
|
else if (content.Length > 100)
|
||||||
}
|
height = 150f;
|
||||||
if (content.Length > 300) {
|
|
||||||
height += 155f;
|
|
||||||
}
|
|
||||||
|
|
||||||
var msg = new XSOMessage
|
var msg = new XSOMessage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -156,6 +156,19 @@ speechSynthesis.getVoices();
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var arraysMatch = function (a, b) {
|
||||||
|
if (!Array.isArray(a) || !Array.isArray(b)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
a.length === b.length &&
|
||||||
|
a.every(
|
||||||
|
(element, index) =>
|
||||||
|
JSON.stringify(element) === JSON.stringify(b[index])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
var escapeTag = function (tag) {
|
var escapeTag = function (tag) {
|
||||||
var s = String(tag);
|
var s = String(tag);
|
||||||
return s.replace(/["&'<>]/g, (c) => `&#${c.charCodeAt(0)};`);
|
return s.replace(/["&'<>]/g, (c) => `&#${c.charCodeAt(0)};`);
|
||||||
@@ -1206,17 +1219,23 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
Vue.component('avatar-info', {
|
Vue.component('avatar-info', {
|
||||||
template:
|
template:
|
||||||
'<div @click="confirm" class="avatar-info"><span style="margin-right:5px">{{ avatarName }}</span><span :class="color">{{ avatarType }}</span></div>',
|
'<div @click="confirm" class="avatar-info">' +
|
||||||
|
'<span style="margin-right:5px">{{ avatarName }}</span>' +
|
||||||
|
'<span style="margin-right:5px" :class="color">{{ avatarType }}</span>' +
|
||||||
|
'<span style="color:#909399;font-family:monospace;font-size:12px;">{{ avatarTags }}</span>' +
|
||||||
|
'</div>',
|
||||||
props: {
|
props: {
|
||||||
imageurl: String,
|
imageurl: String,
|
||||||
userid: String,
|
userid: String,
|
||||||
hintownerid: String,
|
hintownerid: String,
|
||||||
hintavatarname: String
|
hintavatarname: String,
|
||||||
|
avatartags: Array
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
avatarName: this.avatarName,
|
avatarName: this.avatarName,
|
||||||
avatarType: this.avatarType,
|
avatarType: this.avatarType,
|
||||||
|
avatarTags: this.avatarTags,
|
||||||
color: this.color
|
color: this.color
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -1226,9 +1245,9 @@ speechSynthesis.getVoices();
|
|||||||
this.avatarName = '';
|
this.avatarName = '';
|
||||||
this.avatarType = '';
|
this.avatarType = '';
|
||||||
this.color = '';
|
this.color = '';
|
||||||
|
this.avatarTags = '';
|
||||||
if (!this.imageurl) {
|
if (!this.imageurl) {
|
||||||
this.avatarName = '-';
|
this.avatarName = '-';
|
||||||
return;
|
|
||||||
} else if (this.hintownerid) {
|
} else if (this.hintownerid) {
|
||||||
this.avatarName = this.hintavatarname;
|
this.avatarName = this.hintavatarname;
|
||||||
this.ownerId = this.hintownerid;
|
this.ownerId = this.hintownerid;
|
||||||
@@ -1251,6 +1270,20 @@ speechSynthesis.getVoices();
|
|||||||
this.color = 'avatar-info-public';
|
this.color = 'avatar-info-public';
|
||||||
this.avatarType = '(public)';
|
this.avatarType = '(public)';
|
||||||
}
|
}
|
||||||
|
if (typeof this.avatartags === 'object') {
|
||||||
|
var tagString = '';
|
||||||
|
for (var i = 0; i < this.avatartags.length; i++) {
|
||||||
|
var tagName = this.avatartags[i].replace(
|
||||||
|
'content_',
|
||||||
|
''
|
||||||
|
);
|
||||||
|
tagString += tagName;
|
||||||
|
if (i < this.avatartags.length - 1) {
|
||||||
|
tagString += ', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.avatarTags = tagString;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
if (!this.imageurl) {
|
if (!this.imageurl) {
|
||||||
@@ -1269,6 +1302,9 @@ speechSynthesis.getVoices();
|
|||||||
},
|
},
|
||||||
userid() {
|
userid() {
|
||||||
this.parse();
|
this.parse();
|
||||||
|
},
|
||||||
|
avatartags() {
|
||||||
|
this.parse();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -1380,9 +1416,11 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
this.applyUser({
|
this.applyUser({
|
||||||
allowAvatarCopying: json.allowAvatarCopying,
|
allowAvatarCopying: json.allowAvatarCopying,
|
||||||
|
badges: json.badges,
|
||||||
bio: json.bio,
|
bio: json.bio,
|
||||||
bioLinks: json.bioLinks,
|
bioLinks: json.bioLinks,
|
||||||
currentAvatarImageUrl: json.currentAvatarImageUrl,
|
currentAvatarImageUrl: json.currentAvatarImageUrl,
|
||||||
|
currentAvatarTags: json.currentAvatarTags,
|
||||||
currentAvatarThumbnailImageUrl: json.currentAvatarThumbnailImageUrl,
|
currentAvatarThumbnailImageUrl: json.currentAvatarThumbnailImageUrl,
|
||||||
date_joined: json.date_joined,
|
date_joined: json.date_joined,
|
||||||
developerType: json.developerType,
|
developerType: json.developerType,
|
||||||
@@ -1707,6 +1745,7 @@ speechSynthesis.getVoices();
|
|||||||
accountDeletionLog: null,
|
accountDeletionLog: null,
|
||||||
activeFriends: [],
|
activeFriends: [],
|
||||||
allowAvatarCopying: false,
|
allowAvatarCopying: false,
|
||||||
|
badges: [],
|
||||||
bio: '',
|
bio: '',
|
||||||
bioLinks: [],
|
bioLinks: [],
|
||||||
currentAvatar: '',
|
currentAvatar: '',
|
||||||
@@ -1875,9 +1914,11 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
ref = {
|
ref = {
|
||||||
allowAvatarCopying: false,
|
allowAvatarCopying: false,
|
||||||
|
badges: [],
|
||||||
bio: '',
|
bio: '',
|
||||||
bioLinks: [],
|
bioLinks: [],
|
||||||
currentAvatarImageUrl: '',
|
currentAvatarImageUrl: '',
|
||||||
|
currentAvatarTags: [],
|
||||||
currentAvatarThumbnailImageUrl: '',
|
currentAvatarThumbnailImageUrl: '',
|
||||||
date_joined: '',
|
date_joined: '',
|
||||||
developerType: '',
|
developerType: '',
|
||||||
@@ -1939,7 +1980,10 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
if (ref.location === 'traveling') {
|
if (ref.location === 'traveling') {
|
||||||
ref.$location = this.parseLocation(ref.travelingToLocation);
|
ref.$location = this.parseLocation(ref.travelingToLocation);
|
||||||
if (!this.currentTravelers.has(ref.id)) {
|
if (
|
||||||
|
!this.currentTravelers.has(ref.id) &&
|
||||||
|
ref.travelingToLocation
|
||||||
|
) {
|
||||||
var travelRef = {
|
var travelRef = {
|
||||||
created_at: new Date().toJSON(),
|
created_at: new Date().toJSON(),
|
||||||
...ref
|
...ref
|
||||||
@@ -2003,7 +2047,11 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (var prop in ref) {
|
for (var prop in ref) {
|
||||||
if (ref[prop] !== Object(ref[prop])) {
|
if (Array.isArray(ref[prop])) {
|
||||||
|
if (!arraysMatch(ref[prop], $ref[prop])) {
|
||||||
|
props[prop] = true;
|
||||||
|
}
|
||||||
|
} else if (ref[prop] !== Object(ref[prop])) {
|
||||||
props[prop] = true;
|
props[prop] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10171,14 +10219,17 @@ speechSynthesis.getVoices();
|
|||||||
$app.updateFriendGPS(ref.id);
|
$app.updateFriendGPS(ref.id);
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
(props.currentAvatarImageUrl ||
|
((props.currentAvatarImageUrl ||
|
||||||
props.currentAvatarThumbnailImageUrl) &&
|
props.currentAvatarThumbnailImageUrl) &&
|
||||||
!ref.profilePicOverride
|
!ref.profilePicOverride) ||
|
||||||
|
props.currentAvatarTags
|
||||||
) {
|
) {
|
||||||
var currentAvatarImageUrl = '';
|
var currentAvatarImageUrl = '';
|
||||||
var previousCurrentAvatarImageUrl = '';
|
var previousCurrentAvatarImageUrl = '';
|
||||||
var currentAvatarThumbnailImageUrl = '';
|
var currentAvatarThumbnailImageUrl = '';
|
||||||
var previousCurrentAvatarThumbnailImageUrl = '';
|
var previousCurrentAvatarThumbnailImageUrl = '';
|
||||||
|
var currentAvatarTags = '';
|
||||||
|
var previousCurrentAvatarTags = '';
|
||||||
if (props.currentAvatarImageUrl) {
|
if (props.currentAvatarImageUrl) {
|
||||||
currentAvatarImageUrl = props.currentAvatarImageUrl[0];
|
currentAvatarImageUrl = props.currentAvatarImageUrl[0];
|
||||||
previousCurrentAvatarImageUrl = props.currentAvatarImageUrl[1];
|
previousCurrentAvatarImageUrl = props.currentAvatarImageUrl[1];
|
||||||
@@ -10197,6 +10248,21 @@ speechSynthesis.getVoices();
|
|||||||
previousCurrentAvatarThumbnailImageUrl =
|
previousCurrentAvatarThumbnailImageUrl =
|
||||||
ref.currentAvatarThumbnailImageUrl;
|
ref.currentAvatarThumbnailImageUrl;
|
||||||
}
|
}
|
||||||
|
if (props.currentAvatarTags) {
|
||||||
|
currentAvatarTags = props.currentAvatarTags[0];
|
||||||
|
previousCurrentAvatarTags = props.currentAvatarTags[1];
|
||||||
|
if (
|
||||||
|
ref.profilePicOverride &&
|
||||||
|
!props.currentAvatarThumbnailImageUrl
|
||||||
|
) {
|
||||||
|
// forget last seen avatar
|
||||||
|
ref.currentAvatarImageUrl = '';
|
||||||
|
ref.currentAvatarThumbnailImageUrl = '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentAvatarTags = ref.currentAvatarTags;
|
||||||
|
previousCurrentAvatarTags = ref.currentAvatarTags;
|
||||||
|
}
|
||||||
var avatarInfo = {
|
var avatarInfo = {
|
||||||
ownerId: '',
|
ownerId: '',
|
||||||
avatarName: ''
|
avatarName: ''
|
||||||
@@ -10214,7 +10280,9 @@ speechSynthesis.getVoices();
|
|||||||
currentAvatarImageUrl,
|
currentAvatarImageUrl,
|
||||||
currentAvatarThumbnailImageUrl,
|
currentAvatarThumbnailImageUrl,
|
||||||
previousCurrentAvatarImageUrl,
|
previousCurrentAvatarImageUrl,
|
||||||
previousCurrentAvatarThumbnailImageUrl
|
previousCurrentAvatarThumbnailImageUrl,
|
||||||
|
currentAvatarTags,
|
||||||
|
previousCurrentAvatarTags
|
||||||
};
|
};
|
||||||
$app.addFeed(feed);
|
$app.addFeed(feed);
|
||||||
database.addAvatarToDatabase(feed);
|
database.addAvatarToDatabase(feed);
|
||||||
@@ -11909,6 +11977,11 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
} else if (data.Parameters[245]['0'] === 13) {
|
} else if (data.Parameters[245]['0'] === 13) {
|
||||||
var msg = data.Parameters[245]['2'];
|
var msg = data.Parameters[245]['2'];
|
||||||
|
if (typeof msg === 'string') {
|
||||||
|
var displayName =
|
||||||
|
data.Parameters[254]['14']?.targetDisplayName;
|
||||||
|
msg = msg.replace('{{targetDisplayName}}', displayName);
|
||||||
|
}
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
photonId,
|
photonId,
|
||||||
text: msg,
|
text: msg,
|
||||||
@@ -20231,10 +20304,10 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.selfInvite = function (location, shortName) {
|
$app.methods.selfInvite = function (location, shortName) {
|
||||||
var L = API.parseLocation(location);
|
if (!this.isRealInstance(location)) {
|
||||||
if (L.isOffline || L.isTraveling || !L.worldId) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var L = API.parseLocation(location);
|
||||||
API.selfInvite({
|
API.selfInvite({
|
||||||
instanceId: L.instanceId,
|
instanceId: L.instanceId,
|
||||||
worldId: L.worldId,
|
worldId: L.worldId,
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ html
|
|||||||
span.name(v-if="userDialog.id !== API.currentUser.id && userDialog.ref.profilePicOverride && userDialog.ref.currentAvatarImageUrl") {{ $t('dialog.user.info.avatar_info_last_seen') }}
|
span.name(v-if="userDialog.id !== API.currentUser.id && userDialog.ref.profilePicOverride && userDialog.ref.currentAvatarImageUrl") {{ $t('dialog.user.info.avatar_info_last_seen') }}
|
||||||
span.name(v-else) {{ $t('dialog.user.info.avatar_info') }}
|
span.name(v-else) {{ $t('dialog.user.info.avatar_info') }}
|
||||||
.extra
|
.extra
|
||||||
avatar-info(:imageurl="userDialog.ref.currentAvatarImageUrl" :userid="userDialog.id")
|
avatar-info(:imageurl="userDialog.ref.currentAvatarImageUrl" :userid="userDialog.id" :avatartags="userDialog.ref.currentAvatarTags")
|
||||||
.x-friend-item(style="width:100%;cursor:default")
|
.x-friend-item(style="width:100%;cursor:default")
|
||||||
.detail
|
.detail
|
||||||
span.name {{ $t('dialog.user.info.represented_group') }}
|
span.name {{ $t('dialog.user.info.represented_group') }}
|
||||||
|
|||||||
@@ -111,6 +111,6 @@ mixin feedTab()
|
|||||||
span
|
span
|
||||||
span(v-text="scope.row.statusDescription")
|
span(v-text="scope.row.statusDescription")
|
||||||
template(v-else-if="scope.row.type === 'Avatar'")
|
template(v-else-if="scope.row.type === 'Avatar'")
|
||||||
avatar-info(:imageurl="scope.row.currentAvatarImageUrl" :userid="scope.row.userId" :hintownerid="scope.row.ownerId" :hintavatarname="scope.row.avatarName")
|
avatar-info(:imageurl="scope.row.currentAvatarImageUrl" :userid="scope.row.userId" :hintownerid="scope.row.ownerId" :hintavatarname="scope.row.avatarName" :avatartags="scope.row.currentAvatarTags")
|
||||||
template(v-else-if="scope.row.type === 'Bio'")
|
template(v-else-if="scope.row.type === 'Bio'")
|
||||||
span(v-text="scope.row.bio")
|
span(v-text="scope.row.bio")
|
||||||
|
|||||||
Reference in New Issue
Block a user