mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
displayName hex in JSON tab
This commit is contained in:
@@ -594,6 +594,7 @@
|
|||||||
openExternalLink,
|
openExternalLink,
|
||||||
openFolderGeneric,
|
openFolderGeneric,
|
||||||
replaceVrcPackageUrl,
|
replaceVrcPackageUrl,
|
||||||
|
textToHex,
|
||||||
timeToText
|
timeToText
|
||||||
} from '../../../shared/utils';
|
} from '../../../shared/utils';
|
||||||
import {
|
import {
|
||||||
@@ -1017,7 +1018,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function refreshAvatarDialogTreeData() {
|
function refreshAvatarDialogTreeData() {
|
||||||
treeData.value = buildTreeData(avatarDialog.value.ref);
|
treeData.value = buildTreeData({
|
||||||
|
...avatarDialog.value.ref,
|
||||||
|
_hexDisplayName: textToHex(avatarDialog.value.ref?.displayName)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSetAvatarTagsDialog(avatarId) {
|
function showSetAvatarTagsDialog(avatarId) {
|
||||||
|
|||||||
@@ -1184,6 +1184,7 @@
|
|||||||
openExternalLink,
|
openExternalLink,
|
||||||
refreshInstancePlayerCount,
|
refreshInstancePlayerCount,
|
||||||
removeFromArray,
|
removeFromArray,
|
||||||
|
textToHex,
|
||||||
userImage,
|
userImage,
|
||||||
userStatusClass
|
userStatusClass
|
||||||
} from '../../../shared/utils';
|
} from '../../../shared/utils';
|
||||||
@@ -1757,6 +1758,7 @@
|
|||||||
function refreshGroupDialogTreeData() {
|
function refreshGroupDialogTreeData() {
|
||||||
const D = groupDialog.value;
|
const D = groupDialog.value;
|
||||||
const treeData = buildTreeData({
|
const treeData = buildTreeData({
|
||||||
|
_hexDisplayName: textToHex(D.ref.displayName),
|
||||||
group: D.ref,
|
group: D.ref,
|
||||||
posts: D.posts,
|
posts: D.posts,
|
||||||
instances: D.instances,
|
instances: D.instances,
|
||||||
|
|||||||
@@ -1303,7 +1303,10 @@
|
|||||||
nextTick(() => (D.openFlg = false));
|
nextTick(() => (D.openFlg = false));
|
||||||
}
|
}
|
||||||
function refreshWorldDialogTreeData() {
|
function refreshWorldDialogTreeData() {
|
||||||
treeData.value = buildTreeData(worldDialog.value.ref);
|
treeData.value = buildTreeData({
|
||||||
|
...worldDialog.value.ref,
|
||||||
|
_hexDisplayName: textToHex(worldDialog.value.ref?.displayName)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function copyWorldId() {
|
function copyWorldId() {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function textToHex(text) {
|
|||||||
const s = String(text);
|
const s = String(text);
|
||||||
return s
|
return s
|
||||||
.split('')
|
.split('')
|
||||||
.map((c) => c.charCodeAt(0).toString(16))
|
.map((c) => c.charCodeAt(0).toString(16).toUpperCase())
|
||||||
.join(' ');
|
.join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -321,6 +321,13 @@ function buildTreeData(json) {
|
|||||||
node.sort(function (a, b) {
|
node.sort(function (a, b) {
|
||||||
const A = String(a.key).toUpperCase();
|
const A = String(a.key).toUpperCase();
|
||||||
const B = String(b.key).toUpperCase();
|
const B = String(b.key).toUpperCase();
|
||||||
|
// sort _ to top
|
||||||
|
if (A.startsWith('_') && !B.startsWith('_')) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (B.startsWith('_') && !A.startsWith('_')) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (A < B) {
|
if (A < B) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import {
|
|||||||
isRealInstance,
|
isRealInstance,
|
||||||
parseLocation,
|
parseLocation,
|
||||||
removeEmojis,
|
removeEmojis,
|
||||||
replaceBioSymbols
|
replaceBioSymbols,
|
||||||
|
textToHex
|
||||||
} from '../shared/utils';
|
} from '../shared/utils';
|
||||||
import {
|
import {
|
||||||
avatarRequest,
|
avatarRequest,
|
||||||
@@ -1226,12 +1227,16 @@ export const useUserStore = defineStore('User', () => {
|
|||||||
if (D.id === currentUser.value.id) {
|
if (D.id === currentUser.value.id) {
|
||||||
const treeData = {
|
const treeData = {
|
||||||
...currentUser.value,
|
...currentUser.value,
|
||||||
...D.ref
|
...D.ref,
|
||||||
|
_hexDisplayName: textToHex(D.ref?.displayName)
|
||||||
};
|
};
|
||||||
D.treeData = buildTreeData(treeData);
|
D.treeData = buildTreeData(treeData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
D.treeData = buildTreeData(D.ref);
|
D.treeData = buildTreeData({
|
||||||
|
...D.ref,
|
||||||
|
_hexDisplayName: textToHex(D.ref?.displayName)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function lookupUser(ref) {
|
async function lookupUser(ref) {
|
||||||
|
|||||||
Reference in New Issue
Block a user