mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Many fixes and instance queuing notification
This commit is contained in:
187
html/src/app.js
187
html/src/app.js
@@ -409,11 +409,15 @@ speechSynthesis.getVoices();
|
|||||||
this.$throw(0, 'Invalid JSON response');
|
this.$throw(0, 'Invalid JSON response');
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
response.status === 504 ||
|
response.status === 429 &&
|
||||||
response.status === 502 ||
|
init.url.endsWith('/instances/groups')
|
||||||
(response.status === 429 &&
|
|
||||||
init.url.endswith('/instances/groups '))
|
|
||||||
) {
|
) {
|
||||||
|
$app.nextGroupInstanceRefresh = 120; // 1min
|
||||||
|
throw new Error(
|
||||||
|
`${response.status}: rate limited ${endpoint}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (response.status === 504 || response.status === 502) {
|
||||||
// ignore expected API errors
|
// ignore expected API errors
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`${response.status}: ${response.data} ${endpoint}`
|
`${response.status}: ${response.data} ${endpoint}`
|
||||||
@@ -445,7 +449,7 @@ speechSynthesis.getVoices();
|
|||||||
status === 401 &&
|
status === 401 &&
|
||||||
data.error.message === '"Missing Credentials"'
|
data.error.message === '"Missing Credentials"'
|
||||||
) {
|
) {
|
||||||
if (endpoint.substring(0, 10) === 'auth/user?') {
|
if (endpoint.substring(0, 9) === 'auth/user') {
|
||||||
this.$emit('AUTOLOGIN');
|
this.$emit('AUTOLOGIN');
|
||||||
}
|
}
|
||||||
throw new Error('401: Missing Credentials');
|
throw new Error('401: Missing Credentials');
|
||||||
@@ -848,7 +852,7 @@ speechSynthesis.getVoices();
|
|||||||
"<span><span @click=\"showWorldDialog\" :class=\"{ 'x-link': link && this.location !== 'private' && this.location !== 'offline'}\">" +
|
"<span><span @click=\"showWorldDialog\" :class=\"{ 'x-link': link && this.location !== 'private' && this.location !== 'offline'}\">" +
|
||||||
'<i v-if="isTraveling" class="el-icon el-icon-loading" style="display:inline-block;margin-right:5px"></i>' +
|
'<i v-if="isTraveling" class="el-icon el-icon-loading" style="display:inline-block;margin-right:5px"></i>' +
|
||||||
'<span>{{ text }}</span></span>' +
|
'<span>{{ text }}</span></span>' +
|
||||||
'<span v-if="groupName" @click.stop="showGroupDialog" class="x-link">({{ groupName }})</span>' +
|
'<span v-if="groupName" @click="showGroupDialog" :class="{ \'x-link\': link}">({{ groupName }})</span>' +
|
||||||
'<span class="flags" :class="region" style="display:inline-block;margin-left:5px"></span>' +
|
'<span class="flags" :class="region" style="display:inline-block;margin-left:5px"></span>' +
|
||||||
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
|
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
|
||||||
props: {
|
props: {
|
||||||
@@ -952,7 +956,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showGroupDialog() {
|
showGroupDialog() {
|
||||||
if (!this.location) {
|
if (!this.location || !this.link) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var L = API.parseLocation(this.location);
|
var L = API.parseLocation(this.location);
|
||||||
@@ -3739,6 +3743,7 @@ speechSynthesis.getVoices();
|
|||||||
this.cachedFavoriteGroups.clear();
|
this.cachedFavoriteGroups.clear();
|
||||||
this.cachedFavoriteGroupsByTypeName.clear();
|
this.cachedFavoriteGroupsByTypeName.clear();
|
||||||
this.currentUserGroups.clear();
|
this.currentUserGroups.clear();
|
||||||
|
this.queuedInstances.clear();
|
||||||
this.favoriteFriendGroups = [];
|
this.favoriteFriendGroups = [];
|
||||||
this.favoriteWorldGroups = [];
|
this.favoriteWorldGroups = [];
|
||||||
this.favoriteAvatarGroups = [];
|
this.favoriteAvatarGroups = [];
|
||||||
@@ -4716,6 +4721,7 @@ speechSynthesis.getVoices();
|
|||||||
case 'group-role-updated':
|
case 'group-role-updated':
|
||||||
var groupId = content.role.groupId;
|
var groupId = content.role.groupId;
|
||||||
console.log('group-role-updated', content);
|
console.log('group-role-updated', content);
|
||||||
|
|
||||||
// content {
|
// content {
|
||||||
// role: {
|
// role: {
|
||||||
// createdAt: string,
|
// createdAt: string,
|
||||||
@@ -4733,7 +4739,9 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
case 'group-member-updated':
|
case 'group-member-updated':
|
||||||
var groupId = content.groupId;
|
var groupId = content.groupId;
|
||||||
|
$app.onGroupJoined(groupId);
|
||||||
console.log('group-member-updated', content);
|
console.log('group-member-updated', content);
|
||||||
|
|
||||||
// content {
|
// content {
|
||||||
// groupId: string,
|
// groupId: string,
|
||||||
// id: string,
|
// id: string,
|
||||||
@@ -4747,6 +4755,81 @@ speechSynthesis.getVoices();
|
|||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'instance-queue-joined':
|
||||||
|
case 'instance-queue-position':
|
||||||
|
var instanceId = content.instanceLocation;
|
||||||
|
var ref = this.queuedInstances.get(instanceId);
|
||||||
|
if (typeof ref === 'undefined') {
|
||||||
|
ref = {
|
||||||
|
$msgBox: null,
|
||||||
|
$groupName: '',
|
||||||
|
$worldName: '',
|
||||||
|
location: instanceId,
|
||||||
|
position: 0,
|
||||||
|
queueSize: 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (content.position) {
|
||||||
|
ref.position = content.position;
|
||||||
|
}
|
||||||
|
if (content.queueSize) {
|
||||||
|
ref.queueSize = content.queueSize;
|
||||||
|
}
|
||||||
|
if (!ref.$msgBox) {
|
||||||
|
ref.$msgBox = $app.$message({
|
||||||
|
message: '',
|
||||||
|
type: 'info',
|
||||||
|
duration: 0,
|
||||||
|
showClose: true,
|
||||||
|
customClass: 'vrc-instance-queue-message'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!ref.$groupName) {
|
||||||
|
$app.getGroupName(instanceId).then((name) => {
|
||||||
|
ref.$groupName = name;
|
||||||
|
ref.$msgBox.message = `You are in position ${ref.position} of ${ref.queueSize} in the queue for ${name} `;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!ref.$worldName) {
|
||||||
|
$app.getWorldName(instanceId).then((name) => {
|
||||||
|
ref.$worldName = name;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ref.$msgBox.message = `You are in position ${ref.position} of ${ref.queueSize} in the queue for ${ref.$groupName} `;
|
||||||
|
API.queuedInstances.set(instanceId, ref);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'instance-queue-ready':
|
||||||
|
var instanceId = content.instanceLocation;
|
||||||
|
// var expiry = Date.parse(content.expiry);
|
||||||
|
var ref = this.queuedInstances.get(instanceId);
|
||||||
|
if (typeof ref !== 'undefined') {
|
||||||
|
ref.$msgBox.close();
|
||||||
|
this.queuedInstances.delete(instanceId);
|
||||||
|
}
|
||||||
|
var L = this.parseLocation(instanceId);
|
||||||
|
var group = this.cachedGroups.get(L.groupId);
|
||||||
|
var groupName = group?.name ? group.name : '';
|
||||||
|
var worldName = ref.$worldName ? ref.$worldName : '';
|
||||||
|
$app.$message({
|
||||||
|
message: `Instance ready to join ${groupName} - ${worldName}`,
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
var noty = {
|
||||||
|
created_at: new Date().toJSON(),
|
||||||
|
type: 'group.queueReady',
|
||||||
|
imageUrl: group?.iconUrl,
|
||||||
|
message: `Instance ready to join ${groupName}- ${worldName}`,
|
||||||
|
location: instanceId,
|
||||||
|
groupName,
|
||||||
|
worldName
|
||||||
|
};
|
||||||
|
$app.queueNotificationNoty(noty);
|
||||||
|
$app.notificationTable.data.push(noty);
|
||||||
|
$app.updateSharedFeed(true);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.log('Unknown pipeline type', args.json);
|
console.log('Unknown pipeline type', args.json);
|
||||||
}
|
}
|
||||||
@@ -6198,6 +6281,9 @@ speechSynthesis.getVoices();
|
|||||||
case 'group.joinRequest':
|
case 'group.joinRequest':
|
||||||
this.speak(noty.message);
|
this.speak(noty.message);
|
||||||
break;
|
break;
|
||||||
|
case 'group.queueReady':
|
||||||
|
this.speak(noty.message);
|
||||||
|
break;
|
||||||
case 'PortalSpawn':
|
case 'PortalSpawn':
|
||||||
if (noty.displayName) {
|
if (noty.displayName) {
|
||||||
this.speak(
|
this.speak(
|
||||||
@@ -6414,6 +6500,9 @@ speechSynthesis.getVoices();
|
|||||||
case 'group.joinRequest':
|
case 'group.joinRequest':
|
||||||
AppApi.XSNotification('VRCX', noty.message, timeout, image);
|
AppApi.XSNotification('VRCX', noty.message, timeout, image);
|
||||||
break;
|
break;
|
||||||
|
case 'group.queueReady':
|
||||||
|
AppApi.XSNotification('VRCX', noty.message, timeout, image);
|
||||||
|
break;
|
||||||
case 'PortalSpawn':
|
case 'PortalSpawn':
|
||||||
if (noty.displayName) {
|
if (noty.displayName) {
|
||||||
AppApi.XSNotification(
|
AppApi.XSNotification(
|
||||||
@@ -6680,6 +6769,13 @@ speechSynthesis.getVoices();
|
|||||||
image
|
image
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case 'group.queueReady':
|
||||||
|
AppApi.DesktopNotification(
|
||||||
|
'Instance Queue Ready',
|
||||||
|
noty.message,
|
||||||
|
image
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'PortalSpawn':
|
case 'PortalSpawn':
|
||||||
if (noty.displayName) {
|
if (noty.displayName) {
|
||||||
AppApi.DesktopNotification(
|
AppApi.DesktopNotification(
|
||||||
@@ -12137,6 +12233,7 @@ speechSynthesis.getVoices();
|
|||||||
this.searchAvatarResults = [];
|
this.searchAvatarResults = [];
|
||||||
this.searchAvatarPage = [];
|
this.searchAvatarPage = [];
|
||||||
this.searchAvatarPageNum = 0;
|
this.searchAvatarPageNum = 0;
|
||||||
|
this.searchGroupParams = {};
|
||||||
this.searchGroupResults = [];
|
this.searchGroupResults = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -13969,6 +14066,7 @@ speechSynthesis.getVoices();
|
|||||||
'group.informative': 'On',
|
'group.informative': 'On',
|
||||||
'group.invite': 'On',
|
'group.invite': 'On',
|
||||||
'group.joinRequest': 'Off',
|
'group.joinRequest': 'Off',
|
||||||
|
'group.queueReady': 'On',
|
||||||
PortalSpawn: 'Everyone',
|
PortalSpawn: 'Everyone',
|
||||||
Event: 'On',
|
Event: 'On',
|
||||||
VideoPlay: 'Off',
|
VideoPlay: 'Off',
|
||||||
@@ -14005,6 +14103,7 @@ speechSynthesis.getVoices();
|
|||||||
'group.informative': 'On',
|
'group.informative': 'On',
|
||||||
'group.invite': 'On',
|
'group.invite': 'On',
|
||||||
'group.joinRequest': 'On',
|
'group.joinRequest': 'On',
|
||||||
|
'group.queueReady': 'On',
|
||||||
PortalSpawn: 'Everyone',
|
PortalSpawn: 'Everyone',
|
||||||
Event: 'On',
|
Event: 'On',
|
||||||
VideoPlay: 'On',
|
VideoPlay: 'On',
|
||||||
@@ -14046,6 +14145,10 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.sharedFeedFilters.wrist['group.invite'] = 'On';
|
$app.data.sharedFeedFilters.wrist['group.invite'] = 'On';
|
||||||
$app.data.sharedFeedFilters.wrist['group.joinRequest'] = 'On';
|
$app.data.sharedFeedFilters.wrist['group.joinRequest'] = 'On';
|
||||||
}
|
}
|
||||||
|
if (!$app.data.sharedFeedFilters.noty['group.queueReady']) {
|
||||||
|
$app.data.sharedFeedFilters.noty['group.queueReady'] = 'On';
|
||||||
|
$app.data.sharedFeedFilters.wrist['group.queueReady'] = 'On';
|
||||||
|
}
|
||||||
|
|
||||||
$app.data.trustColor = JSON.parse(
|
$app.data.trustColor = JSON.parse(
|
||||||
configRepository.getString(
|
configRepository.getString(
|
||||||
@@ -14574,7 +14677,11 @@ speechSynthesis.getVoices();
|
|||||||
if (instanceId) {
|
if (instanceId) {
|
||||||
var shortName = urlParams.get('shortName');
|
var shortName = urlParams.get('shortName');
|
||||||
var location = `${worldId}:${instanceId}`;
|
var location = `${worldId}:${instanceId}`;
|
||||||
return this.verifyShortName(location, shortName);
|
if (shortName) {
|
||||||
|
return this.verifyShortName(location, shortName);
|
||||||
|
}
|
||||||
|
this.showWorldDialog(location);
|
||||||
|
return true;
|
||||||
} else if (worldId) {
|
} else if (worldId) {
|
||||||
this.showWorldDialog(worldId);
|
this.showWorldDialog(worldId);
|
||||||
return true;
|
return true;
|
||||||
@@ -16752,17 +16859,19 @@ speechSynthesis.getVoices();
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var instances = {};
|
var instances = {};
|
||||||
for (var [id, occupants] of D.ref.instances) {
|
if (D.ref.instances) {
|
||||||
instances[id] = {
|
for (var [id, occupants] of D.ref.instances) {
|
||||||
id,
|
instances[id] = {
|
||||||
tag: `${D.id}:${id}`,
|
id,
|
||||||
occupants,
|
tag: `${D.id}:${id}`,
|
||||||
friendCount: 0,
|
occupants,
|
||||||
full: false,
|
friendCount: 0,
|
||||||
users: [],
|
full: false,
|
||||||
shortName: '',
|
users: [],
|
||||||
json: {}
|
shortName: '',
|
||||||
};
|
json: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var { instanceId, shortName } = D.$location;
|
var { instanceId, shortName } = D.$location;
|
||||||
if (instanceId && typeof instances[instanceId] === 'undefined') {
|
if (instanceId && typeof instances[instanceId] === 'undefined') {
|
||||||
@@ -16934,12 +17043,12 @@ speechSynthesis.getVoices();
|
|||||||
id: instance.instanceId,
|
id: instance.instanceId,
|
||||||
tag: instance.location,
|
tag: instance.location,
|
||||||
$location: {},
|
$location: {},
|
||||||
occupants: instance.memberCount,
|
occupants: instance.userCount,
|
||||||
friendCount: 0,
|
friendCount: 0,
|
||||||
full: false,
|
full: false,
|
||||||
users: [],
|
users: [],
|
||||||
shortName: '',
|
shortName: instance.shortName,
|
||||||
json: {}
|
json: instance
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21795,7 +21904,6 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.getCurrentUserGroups = async function () {
|
$app.methods.getCurrentUserGroups = async function () {
|
||||||
var args = await API.getGroups({ n: 100, userId: API.currentUser.id });
|
var args = await API.getGroups({ n: 100, userId: API.currentUser.id });
|
||||||
this.inviteGroupDialog.groups = args.json;
|
|
||||||
API.currentUserGroups.clear();
|
API.currentUserGroups.clear();
|
||||||
args.json.forEach((group) => {
|
args.json.forEach((group) => {
|
||||||
API.currentUserGroups.set(group.id, group);
|
API.currentUserGroups.set(group.id, group);
|
||||||
@@ -24643,6 +24751,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
API.cachedGroups = new Map();
|
API.cachedGroups = new Map();
|
||||||
API.currentUserGroups = new Map();
|
API.currentUserGroups = new Map();
|
||||||
|
API.queuedInstances = new Map();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
params: {
|
params: {
|
||||||
@@ -25069,9 +25178,12 @@ speechSynthesis.getVoices();
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
API.getGroupInstances = function (params) {
|
API.getGroupInstances = function (params) {
|
||||||
return this.call(`groups/${params.groupId}/instances`, {
|
return this.call(
|
||||||
method: 'GET'
|
`users/${this.currentUser.id}/instances/groups/${params.groupId}`,
|
||||||
}).then((json) => {
|
{
|
||||||
|
method: 'GET'
|
||||||
|
}
|
||||||
|
).then((json) => {
|
||||||
var args = {
|
var args = {
|
||||||
json,
|
json,
|
||||||
params
|
params
|
||||||
@@ -25082,7 +25194,13 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
API.$on('GROUP:INSTANCES', function (args) {
|
API.$on('GROUP:INSTANCES', function (args) {
|
||||||
for (var json of args.json) {
|
for (var json of args.json.instances) {
|
||||||
|
this.$emit('INSTANCE', {
|
||||||
|
json,
|
||||||
|
params: {
|
||||||
|
fetchedAt: args.json.fetchedAt
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$emit('WORLD', {
|
this.$emit('WORLD', {
|
||||||
json: json.world,
|
json: json.world,
|
||||||
params: {
|
params: {
|
||||||
@@ -25146,6 +25264,13 @@ speechSynthesis.getVoices();
|
|||||||
fetchedAt: args.json.fetchedAt
|
fetchedAt: args.json.fetchedAt
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.$emit('WORLD', {
|
||||||
|
json: json.world,
|
||||||
|
params: {
|
||||||
|
worldId: json.world.id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
json.world = this.applyWorld(json.world);
|
||||||
|
|
||||||
var ref = this.cachedGroups.get(json.ownerId);
|
var ref = this.cachedGroups.get(json.ownerId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
@@ -25482,7 +25607,9 @@ speechSynthesis.getVoices();
|
|||||||
groupId
|
groupId
|
||||||
}).then((args3) => {
|
}).then((args3) => {
|
||||||
if (groupId === args3.params.groupId) {
|
if (groupId === args3.params.groupId) {
|
||||||
this.applyGroupDialogInstances(args3.json);
|
this.applyGroupDialogInstances(
|
||||||
|
args3.json.instances
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -25900,8 +26027,7 @@ speechSynthesis.getVoices();
|
|||||||
groupName: '',
|
groupName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userIds: '',
|
userIds: '',
|
||||||
userObject: {},
|
userObject: {}
|
||||||
groups: []
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.showInviteGroupDialog = function (groupId, userId) {
|
$app.methods.showInviteGroupDialog = function (groupId, userId) {
|
||||||
@@ -25914,7 +26040,6 @@ speechSynthesis.getVoices();
|
|||||||
D.userId = userId;
|
D.userId = userId;
|
||||||
D.userObject = {};
|
D.userObject = {};
|
||||||
D.visible = true;
|
D.visible = true;
|
||||||
D.loading = true;
|
|
||||||
if (groupId) {
|
if (groupId) {
|
||||||
API.getCachedGroup({
|
API.getCachedGroup({
|
||||||
groupId
|
groupId
|
||||||
|
|||||||
@@ -700,3 +700,8 @@ i.x-user-status.busy {
|
|||||||
.changelog-dialog img {
|
.changelog-dialog img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vrc-instance-queue-message {
|
||||||
|
padding: 3px;
|
||||||
|
top: 0 !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1552,6 +1552,11 @@ html
|
|||||||
el-radio-group(v-model="sharedFeedFilters.noty['group.joinRequest']" size="mini")
|
el-radio-group(v-model="sharedFeedFilters.noty['group.joinRequest']" size="mini")
|
||||||
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
||||||
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
||||||
|
.toggle-item
|
||||||
|
span.toggle-name Instance Queue Ready
|
||||||
|
el-radio-group(v-model="sharedFeedFilters.noty['group.queueReady']" size="mini")
|
||||||
|
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
||||||
|
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
||||||
.toggle-item
|
.toggle-item
|
||||||
span.toggle-name Portal Spawn
|
span.toggle-name Portal Spawn
|
||||||
el-radio-group(v-model="sharedFeedFilters.noty.PortalSpawn" size="mini")
|
el-radio-group(v-model="sharedFeedFilters.noty.PortalSpawn" size="mini")
|
||||||
@@ -1764,6 +1769,11 @@ html
|
|||||||
el-radio-group(v-model="sharedFeedFilters.wrist['group.joinRequest']" size="mini")
|
el-radio-group(v-model="sharedFeedFilters.wrist['group.joinRequest']" size="mini")
|
||||||
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
||||||
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
||||||
|
.toggle-item
|
||||||
|
span.toggle-name Instance Queue Ready
|
||||||
|
el-radio-group(v-model="sharedFeedFilters.wrist['group.queueReady']" size="mini")
|
||||||
|
el-radio-button(label="Off") {{ $t('dialog.shared_feed_filters.off') }}
|
||||||
|
el-radio-button(label="On") {{ $t('dialog.shared_feed_filters.on') }}
|
||||||
.toggle-item
|
.toggle-item
|
||||||
span.toggle-name Portal Spawn
|
span.toggle-name Portal Spawn
|
||||||
el-radio-group(v-model="sharedFeedFilters.wrist.PortalSpawn" size="mini")
|
el-radio-group(v-model="sharedFeedFilters.wrist.PortalSpawn" size="mini")
|
||||||
@@ -2347,8 +2357,8 @@ html
|
|||||||
span {{ $t('dialog.invite_to_group.description') }}
|
span {{ $t('dialog.invite_to_group.description') }}
|
||||||
br
|
br
|
||||||
el-select(v-model="inviteGroupDialog.groupId" clearable :placeholder="$t('dialog.invite_to_group.choose_group_placeholder')" filterable :disabled="inviteGroupDialog.loading" @change="isAllowedToInviteToGroup" style="margin-top:15px")
|
el-select(v-model="inviteGroupDialog.groupId" clearable :placeholder="$t('dialog.invite_to_group.choose_group_placeholder')" filterable :disabled="inviteGroupDialog.loading" @change="isAllowedToInviteToGroup" style="margin-top:15px")
|
||||||
el-option-group(v-if="inviteGroupDialog.groups.length" :label="$t('dialog.invite_to_group.groups')" style="width:410px")
|
el-option-group(v-if="API.currentUserGroups.size" :label="$t('dialog.invite_to_group.groups')" style="width:410px")
|
||||||
el-option.x-friend-item(v-for="group in inviteGroupDialog.groups" :key="group.id" :label="group.name" :value="group.id" style="height:auto")
|
el-option.x-friend-item(v-for="group in API.currentUserGroups.values()" :key="group.id" :label="group.name" :value="group.id" style="height:auto")
|
||||||
.avatar
|
.avatar
|
||||||
img(v-lazy="group.iconUrl")
|
img(v-lazy="group.iconUrl")
|
||||||
.detail
|
.detail
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ mixin notificationsTab()
|
|||||||
template(#tool)
|
template(#tool)
|
||||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||||
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" :placeholder="$t('view.notification.filter_placeholder')")
|
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" :placeholder="$t('view.notification.filter_placeholder')")
|
||||||
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'moderation.warning.group']" :key="type" :label="type" :value="type")
|
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'group.queueReady', 'moderation.warning.group']" :key="type" :label="type" :value="type")
|
||||||
el-input(v-model="notificationTable.filters[1].value" :placeholder="$t('view.notification.search_placeholder')" style="flex:none;width:150px;margin:0 10px")
|
el-input(v-model="notificationTable.filters[1].value" :placeholder="$t('view.notification.search_placeholder')" style="flex:none;width:150px;margin:0 10px")
|
||||||
el-tooltip(placement="bottom" :content="$t('view.notification.refresh_tooltip')" :disabled="hideTooltips")
|
el-tooltip(placement="bottom" :content="$t('view.notification.refresh_tooltip')" :disabled="hideTooltips")
|
||||||
el-button(type="default" :loading="API.isNotificationsLoading" @click="API.refreshNotifications()" icon="el-icon-refresh" circle style="flex:none")
|
el-button(type="default" :loading="API.isNotificationsLoading" @click="API.refreshNotifications()" icon="el-icon-refresh" circle style="flex:none")
|
||||||
@@ -20,6 +20,10 @@ mixin notificationsTab()
|
|||||||
template(#content)
|
template(#content)
|
||||||
location(v-if="scope.row.details" :location="scope.row.details.worldId" :hint="scope.row.details.worldName" :grouphint="scope.row.details.groupName" :link="false")
|
location(v-if="scope.row.details" :location="scope.row.details.worldId" :hint="scope.row.details.worldName" :grouphint="scope.row.details.groupName" :link="false")
|
||||||
span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)")
|
span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)")
|
||||||
|
el-tooltip(v-if="scope.row.type === 'group.queueReady'" placement="top")
|
||||||
|
template(#content)
|
||||||
|
location(v-if="scope.row.location" :location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false")
|
||||||
|
span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.location)")
|
||||||
template(v-else-if="scope.row.link")
|
template(v-else-if="scope.row.link")
|
||||||
el-tooltip(placement="top" :content="scope.row.linkText" :disabled="hideTooltips")
|
el-tooltip(placement="top" :content="scope.row.linkText" :disabled="hideTooltips")
|
||||||
span.x-link(v-text="scope.row.type" @click="openNotificationLink(scope.row.link)")
|
span.x-link(v-text="scope.row.type" @click="openNotificationLink(scope.row.link)")
|
||||||
@@ -84,6 +88,9 @@ mixin notificationsTab()
|
|||||||
template(v-if="scope.row.type !== 'requestInviteResponse' && scope.row.type !== 'inviteResponse' && scope.row.type !== 'message' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
|
template(v-if="scope.row.type !== 'requestInviteResponse' && scope.row.type !== 'inviteResponse' && scope.row.type !== 'message' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
|
||||||
el-tooltip(placement="top" content="Decline" :disabled="hideTooltips")
|
el-tooltip(placement="top" content="Decline" :disabled="hideTooltips")
|
||||||
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="hideNotification(scope.row)")
|
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="hideNotification(scope.row)")
|
||||||
|
template(v-if="scope.row.type === 'group.queueReady'")
|
||||||
|
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
|
||||||
|
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
|
||||||
template(v-if="scope.row.type !== 'friendRequest' && scope.row.type !== 'hiddenFriendRequest' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
|
template(v-if="scope.row.type !== 'friendRequest' && scope.row.type !== 'hiddenFriendRequest' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
|
||||||
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
|
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
|
||||||
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
|
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
|
||||||
|
|||||||
@@ -580,6 +580,9 @@ Vue.component('marquee-text', MarqueeText);
|
|||||||
case 'group.joinRequest':
|
case 'group.joinRequest':
|
||||||
text = escapeTag(noty.message);
|
text = escapeTag(noty.message);
|
||||||
break;
|
break;
|
||||||
|
case 'group.queueReady':
|
||||||
|
text = escapeTag(noty.message);
|
||||||
|
break;
|
||||||
case 'PortalSpawn':
|
case 'PortalSpawn':
|
||||||
if (noty.displayName) {
|
if (noty.displayName) {
|
||||||
text = `<strong>${
|
text = `<strong>${
|
||||||
|
|||||||
@@ -139,6 +139,11 @@ html
|
|||||||
span.extra
|
span.extra
|
||||||
span.time {{ feed.created_at | formatDate }}
|
span.time {{ feed.created_at | formatDate }}
|
||||||
| 🏷️ #[span.name(v-text="feed.message")]
|
| 🏷️ #[span.name(v-text="feed.message")]
|
||||||
|
div(v-else-if="feed.type === 'group.queueReady'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
|
.detail
|
||||||
|
span.extra
|
||||||
|
span.time {{ feed.created_at | formatDate }}
|
||||||
|
| 📨 #[span.name(v-text="feed.message")]
|
||||||
div(v-else-if="feed.type === 'PortalSpawn'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
div(v-else-if="feed.type === 'PortalSpawn'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
@@ -339,6 +344,11 @@ html
|
|||||||
span.extra
|
span.extra
|
||||||
span.time {{ feed.created_at | formatDate }}
|
span.time {{ feed.created_at | formatDate }}
|
||||||
| #[span.name(v-text="feed.message")]
|
| #[span.name(v-text="feed.message")]
|
||||||
|
div(v-else-if="feed.type === 'group.queueReady'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
|
.detail
|
||||||
|
span.extra
|
||||||
|
span.time {{ feed.created_at | formatDate }}
|
||||||
|
| #[span.name(v-text="feed.message")]
|
||||||
div(v-else-if="feed.type === 'PortalSpawn'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
div(v-else-if="feed.type === 'PortalSpawn'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
.detail
|
.detail
|
||||||
span.extra
|
span.extra
|
||||||
|
|||||||
Reference in New Issue
Block a user