mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Lint
This commit is contained in:
+50
-50
@@ -995,7 +995,7 @@ speechSynthesis.getVoices();
|
|||||||
async parse() {
|
async parse() {
|
||||||
this.username = this.userid;
|
this.username = this.userid;
|
||||||
if (this.userid) {
|
if (this.userid) {
|
||||||
var args = await API.getCachedUser({ userId: this.userid });
|
var args = await API.getCachedUser({userId: this.userid});
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
typeof args !== 'undefined' &&
|
typeof args !== 'undefined' &&
|
||||||
@@ -8884,15 +8884,15 @@ speechSynthesis.getVoices();
|
|||||||
if (this.debugPhotonLogging) {
|
if (this.debugPhotonLogging) {
|
||||||
console.log('VrcEvent:', eventData);
|
console.log('VrcEvent:', eventData);
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
eventData.EventType === '_InstantiateObject' &&
|
eventData.EventType === '_InstantiateObject' &&
|
||||||
eventData.Data[0] === 'Portals/PortalInternalDynamic'
|
eventData.Data[0] === 'Portals/PortalInternalDynamic'
|
||||||
) {
|
) {
|
||||||
this.lastPortalId = eventData.Data[3];
|
this.lastPortalId = eventData.Data[3];
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
eventData.EventType === '_DestroyObject' &&
|
eventData.EventType === '_DestroyObject' &&
|
||||||
this.lastPortalList.has(eventData.Data[0])
|
this.lastPortalList.has(eventData.Data[0])
|
||||||
) {
|
) {
|
||||||
var portalId = eventData.Data[0];
|
var portalId = eventData.Data[0];
|
||||||
var date = this.lastPortalList.get(portalId);
|
var date = this.lastPortalList.get(portalId);
|
||||||
@@ -8905,7 +8905,7 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else if (eventData.EventType === 'ConfigurePortal') {
|
} else if (eventData.EventType === 'ConfigurePortal') {
|
||||||
var instanceId = `${eventData.Data[0]}:${eventData.Data[1]}`;
|
var instanceId = `${eventData.Data[0]}:${eventData.Data[1]}`;
|
||||||
if (this.lastPortalId) {
|
if (this.lastPortalId) {
|
||||||
this.lastPortalList.set(
|
this.lastPortalList.set(
|
||||||
this.lastPortalId,
|
this.lastPortalId,
|
||||||
@@ -8913,9 +8913,9 @@ speechSynthesis.getVoices();
|
|||||||
);
|
);
|
||||||
this.lastPortalId = '';
|
this.lastPortalId = '';
|
||||||
}
|
}
|
||||||
var displayName = this.getDisplayNameFromPhotonId(senderId);
|
var displayName = this.getDisplayNameFromPhotonId(senderId);
|
||||||
if (displayName) {
|
if (displayName) {
|
||||||
var ref1 = {
|
var ref1 = {
|
||||||
id: this.getUserIdFromPhotonId(senderId),
|
id: this.getUserIdFromPhotonId(senderId),
|
||||||
displayName
|
displayName
|
||||||
};
|
};
|
||||||
@@ -8928,12 +8928,12 @@ speechSynthesis.getVoices();
|
|||||||
type: 'Event',
|
type: 'Event',
|
||||||
data: `${displayName} called non existent RPC ${eventData.Type}`
|
data: `${displayName} called non existent RPC ${eventData.Type}`
|
||||||
};
|
};
|
||||||
this.addPhotonEventToGameLog(entry);
|
this.addPhotonEventToGameLog(entry);
|
||||||
}
|
}
|
||||||
if (eventData.Type === 14) {
|
if (eventData.Type === 14) {
|
||||||
if (eventData.EventType === 'ChangeVisibility') {
|
if (eventData.EventType === 'ChangeVisibility') {
|
||||||
if (eventData.Data[0] === true) {
|
if (eventData.Data[0] === true) {
|
||||||
var text = 'EnableCamera';
|
var text = 'EnableCamera';
|
||||||
} else if (eventData.Data[0] === false) {
|
} else if (eventData.Data[0] === false) {
|
||||||
var text = 'DisableCamera';
|
var text = 'DisableCamera';
|
||||||
}
|
}
|
||||||
@@ -8951,7 +8951,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var text = `${eventData.EventType}${eventVrc}`;
|
var text = `${eventData.EventType}${eventVrc}`;
|
||||||
}
|
}
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
photonId: senderId,
|
photonId: senderId,
|
||||||
text,
|
text,
|
||||||
type: 'Event',
|
type: 'Event',
|
||||||
@@ -12533,29 +12533,29 @@ speechSynthesis.getVoices();
|
|||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
inputValue: world.ref.previewYoutubeId,
|
inputValue: world.ref.previewYoutubeId,
|
||||||
inputErrorMessage: 'Valid YouTube URL is required',
|
inputErrorMessage: 'Valid YouTube URL is required',
|
||||||
callback: (action, instance) => {
|
callback: (action, instance) => {
|
||||||
if (
|
if (
|
||||||
action === 'confirm' &&
|
action === 'confirm' &&
|
||||||
instance.inputValue !== world.ref.previewYoutubeId
|
instance.inputValue !== world.ref.previewYoutubeId
|
||||||
) {
|
) {
|
||||||
if (instance.inputValue.length > 11) {
|
if (instance.inputValue.length > 11) {
|
||||||
try {
|
try {
|
||||||
var url = new URL(instance.inputValue);
|
var url = new URL(instance.inputValue);
|
||||||
var id1 = url.pathname;
|
var id1 = url.pathname;
|
||||||
var id2 = url.searchParams.get('v');
|
var id2 = url.searchParams.get('v');
|
||||||
if (id1 && id1.length === 12) {
|
if (id1 && id1.length === 12) {
|
||||||
instance.inputValue = id1.substring(1, 12);
|
instance.inputValue = id1.substring(1, 12);
|
||||||
}
|
}
|
||||||
if (id2 && id2.length === 11) {
|
if (id2 && id2.length === 11) {
|
||||||
instance.inputValue = id2;
|
instance.inputValue = id2;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: 'Invalid YouTube URL',
|
message: 'Invalid YouTube URL',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12563,13 +12563,13 @@ speechSynthesis.getVoices();
|
|||||||
API.saveWorld({
|
API.saveWorld({
|
||||||
id: world.id,
|
id: world.id,
|
||||||
previewYoutubeId: instance.inputValue
|
previewYoutubeId: instance.inputValue
|
||||||
}).then((args) => {
|
}).then((args) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: 'World YouTube preview changed',
|
message: 'World YouTube preview changed',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
|
||||||
return args;
|
|
||||||
});
|
});
|
||||||
|
return args;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user