Small changes

This commit is contained in:
Natsumi
2021-09-08 07:13:35 +12:00
parent 1a00688f2c
commit ffa2bd88f4
2 changed files with 32 additions and 17 deletions

View File

@@ -3665,14 +3665,12 @@ speechSynthesis.getVoices();
this.$emit('PIPELINE', {
json
});
if (
$app.debugWebSocket &&
json.content &&
this.cachedUsers.has(json.content.userId)
) {
if ($app.debugWebSocket && json.content) {
var displayName = '';
var user = this.cachedUsers.get(json.content.userId);
displayName = user.displayName;
if (user) {
displayName = user.displayName;
}
console.log(
'WebSocket',
json.type,
@@ -7349,7 +7347,7 @@ speechSynthesis.getVoices();
params.featured = 'false';
break;
default:
params.sort = 'popularity';
params.sort = 'relevance';
params.search = this.searchText;
break;
}
@@ -8926,7 +8924,7 @@ speechSynthesis.getVoices();
this.currentUserTreeData = buildTreeData(API.currentUser);
};
$app.methods.promptUserDialog = function () {
$app.methods.promptUserIdDialog = function () {
this.$prompt('Enter a User URL or ID (UUID)', 'Direct Access', {
distinguishCancelAndClose: true,
confirmButtonText: 'OK',
@@ -8954,6 +8952,21 @@ speechSynthesis.getVoices();
});
};
$app.methods.promptUsernameDialog = function () {
this.$prompt('Enter a Username', 'Direct Access', {
distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
inputPattern: /\S+/,
inputErrorMessage: 'Username is required',
callback: (action, instance) => {
if (action === 'confirm' && instance.inputValue) {
this.lookupUser({displayName: instance.inputValue});
}
}
});
};
$app.methods.promptWorldDialog = function () {
this.$prompt('Enter a World URL or ID (UUID)', 'Direct Access', {
distinguishCancelAndClose: true,
@@ -8985,7 +8998,7 @@ speechSynthesis.getVoices();
};
$app.methods.promptAvatarDialog = function () {
this.$prompt('Enter a Avatar ID (UUID)', 'Direct Access', {
this.$prompt('Enter a Avatar URL or ID (UUID)', 'Direct Access', {
distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',