mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Trim direct access input
This commit is contained in:
+22
-9
@@ -1723,6 +1723,9 @@ speechSynthesis.getVoices();
|
|||||||
var tag = $app.customUserTags.get(json.id);
|
var tag = $app.customUserTags.get(json.id);
|
||||||
ref.$customTag = tag.tag;
|
ref.$customTag = tag.tag;
|
||||||
ref.$customTagColour = tag.colour;
|
ref.$customTagColour = tag.colour;
|
||||||
|
} else if (ref.$customTag) {
|
||||||
|
ref.$customTag = '';
|
||||||
|
ref.$customTagColour = '';
|
||||||
}
|
}
|
||||||
ref.$isVRCPlus = ref.tags.includes('system_supporter');
|
ref.$isVRCPlus = ref.tags.includes('system_supporter');
|
||||||
this.applyUserTrustLevel(ref);
|
this.applyUserTrustLevel(ref);
|
||||||
@@ -14066,7 +14069,7 @@ speechSynthesis.getVoices();
|
|||||||
inputErrorMessage: $t('prompt.direct_access_omni.input_error'),
|
inputErrorMessage: $t('prompt.direct_access_omni.input_error'),
|
||||||
callback: (action, instance) => {
|
callback: (action, instance) => {
|
||||||
if (action === 'confirm' && instance.inputValue) {
|
if (action === 'confirm' && instance.inputValue) {
|
||||||
var input = instance.inputValue;
|
var input = instance.inputValue.trim();
|
||||||
if (!this.directAccessParse(input)) {
|
if (!this.directAccessParse(input)) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: $t(
|
message: $t(
|
||||||
@@ -14083,7 +14086,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.directAccessPaste = function () {
|
$app.methods.directAccessPaste = function () {
|
||||||
AppApi.GetClipboard().then((clipboard) => {
|
AppApi.GetClipboard().then((clipboard) => {
|
||||||
if (!this.directAccessParse(clipboard)) {
|
if (!this.directAccessParse(clipboard.trim())) {
|
||||||
this.promptOmniDirectDialog();
|
this.promptOmniDirectDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -14153,7 +14156,7 @@ speechSynthesis.getVoices();
|
|||||||
if (!input) {
|
if (!input) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.directAccessWorld(input.trim())) {
|
if (this.directAccessWorld(input)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (input.startsWith('https://vrchat.')) {
|
if (input.startsWith('https://vrchat.')) {
|
||||||
@@ -14190,13 +14193,13 @@ speechSynthesis.getVoices();
|
|||||||
input.substring(0, 4) === 'usr_' ||
|
input.substring(0, 4) === 'usr_' ||
|
||||||
/^[A-Za-z0-9]{10}$/g.test(input)
|
/^[A-Za-z0-9]{10}$/g.test(input)
|
||||||
) {
|
) {
|
||||||
this.showUserDialog(input.trim());
|
this.showUserDialog(input);
|
||||||
return true;
|
return true;
|
||||||
} else if (input.substring(0, 5) === 'avtr_') {
|
} else if (input.substring(0, 5) === 'avtr_') {
|
||||||
this.showAvatarDialog(input.trim());
|
this.showAvatarDialog(input);
|
||||||
return true;
|
return true;
|
||||||
} else if (input.substring(0, 4) === 'grp_') {
|
} else if (input.substring(0, 4) === 'grp_') {
|
||||||
this.showGroupDialog(input.trim());
|
this.showGroupDialog(input);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -21729,6 +21732,9 @@ speechSynthesis.getVoices();
|
|||||||
this.photonLastEvent7List = Date.parse(data.dt);
|
this.photonLastEvent7List = Date.parse(data.dt);
|
||||||
break;
|
break;
|
||||||
case 'VrcxMessage':
|
case 'VrcxMessage':
|
||||||
|
if (this.debugPhotonLogging) {
|
||||||
|
console.log('VrcxMessage:', data);
|
||||||
|
}
|
||||||
this.eventVrcxMessage(data);
|
this.eventVrcxMessage(data);
|
||||||
break;
|
break;
|
||||||
case 'Ping':
|
case 'Ping':
|
||||||
@@ -21800,6 +21806,16 @@ speechSynthesis.getVoices();
|
|||||||
case 'CustomTag':
|
case 'CustomTag':
|
||||||
this.addCustomTag(data);
|
this.addCustomTag(data);
|
||||||
break;
|
break;
|
||||||
|
case 'ClearCustomTags':
|
||||||
|
this.customUserTags.forEach((value, key) => {
|
||||||
|
this.customUserTags.delete(key);
|
||||||
|
var ref = API.cachedUsers.get(key);
|
||||||
|
if (typeof ref !== 'undefined') {
|
||||||
|
ref.$customTag = '';
|
||||||
|
ref.$customTagColour = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
case 'Noty':
|
case 'Noty':
|
||||||
var entry = {
|
var entry = {
|
||||||
created_at: new Date().toJSON(),
|
created_at: new Date().toJSON(),
|
||||||
@@ -21809,9 +21825,6 @@ speechSynthesis.getVoices();
|
|||||||
database.addGamelogEventToDatabase(entry);
|
database.addGamelogEventToDatabase(entry);
|
||||||
this.queueGameLogNoty(entry);
|
this.queueGameLogNoty(entry);
|
||||||
this.addGameLog(entry);
|
this.addGameLog(entry);
|
||||||
if (data.Tag) {
|
|
||||||
this.addCustomTag(data);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('VRCXMessage:', data);
|
console.log('VRCXMessage:', data);
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
},
|
},
|
||||||
"game_log": {
|
"game_log": {
|
||||||
"header": "Game Log",
|
"header": "Game Log",
|
||||||
"resource_load": "Log Resource Load entries"
|
"resource_load": "Log Udon resource load"
|
||||||
},
|
},
|
||||||
"legal_notice": {
|
"legal_notice": {
|
||||||
"header": "Legal Notice",
|
"header": "Legal Notice",
|
||||||
|
|||||||
Reference in New Issue
Block a user