mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Small changes
This commit is contained in:
@@ -2805,6 +2805,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
API.refreshNotifications = async function () {
|
API.refreshNotifications = async function () {
|
||||||
this.isNotificationsLoading = true;
|
this.isNotificationsLoading = true;
|
||||||
|
try {
|
||||||
this.expireFriendRequestNotifications();
|
this.expireFriendRequestNotifications();
|
||||||
var params = {
|
var params = {
|
||||||
n: 100,
|
n: 100,
|
||||||
@@ -2845,6 +2846,9 @@ speechSynthesis.getVoices();
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
this.isNotificationsLoading = false;
|
this.isNotificationsLoading = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2933,6 +2937,28 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
API.$on('NOTIFICATION:V2:UPDATE', function (args) {
|
||||||
|
var notificationId = args.params.notificationId;
|
||||||
|
var json = args.json;
|
||||||
|
if (!json) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
json.id = notificationId;
|
||||||
|
this.$emit('NOTIFICATION', {
|
||||||
|
json,
|
||||||
|
params: {
|
||||||
|
notificationId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (json.seen) {
|
||||||
|
this.$emit('NOTIFICATION:SEE', {
|
||||||
|
params: {
|
||||||
|
notificationId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
params: {
|
params: {
|
||||||
notificationId: string,
|
notificationId: string,
|
||||||
@@ -4183,6 +4209,16 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'notification-v2-update':
|
||||||
|
console.log('notification-v2-update', content);
|
||||||
|
this.$emit('NOTIFICATION:V2:UPDATE', {
|
||||||
|
json: content.updates,
|
||||||
|
params: {
|
||||||
|
notificationId: content.id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
case 'see-notification':
|
case 'see-notification':
|
||||||
this.$emit('NOTIFICATION:SEE', {
|
this.$emit('NOTIFICATION:SEE', {
|
||||||
params: {
|
params: {
|
||||||
@@ -11161,6 +11197,9 @@ speechSynthesis.getVoices();
|
|||||||
var partyId = `${L.worldId}:${L.instanceName}`;
|
var partyId = `${L.worldId}:${L.instanceName}`;
|
||||||
var partySize = this.lastLocation.playerList.size;
|
var partySize = this.lastLocation.playerList.size;
|
||||||
var partyMaxSize = L.worldCapacity;
|
var partyMaxSize = L.worldCapacity;
|
||||||
|
if (partySize > partyMaxSize) {
|
||||||
|
partyMaxSize = partySize;
|
||||||
|
}
|
||||||
var buttonText = 'Join';
|
var buttonText = 'Join';
|
||||||
var buttonUrl = L.joinUrl;
|
var buttonUrl = L.joinUrl;
|
||||||
if (!this.discordJoinButton) {
|
if (!this.discordJoinButton) {
|
||||||
|
|||||||
+2
-2
@@ -776,11 +776,11 @@ html
|
|||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
template(v-if="scope.row.details && scope.row.details.imageUrl")
|
template(v-if="scope.row.details && scope.row.details.imageUrl")
|
||||||
el-popover(placement="right" width="500px" trigger="click")
|
el-popover(placement="right" width="500px" trigger="click")
|
||||||
img.x-link(slot="reference" v-lazy="scope.row.details.imageUrl" style="flex:none;width:90px;border-radius:4px")
|
img.x-link(slot="reference" v-lazy="scope.row.details.imageUrl" style="flex:none;height:50px;border-radius:4px")
|
||||||
img.x-link(v-lazy="scope.row.details.imageUrl" style="width:500px" @click="downloadAndSaveImage(scope.row.details.imageUrl)")
|
img.x-link(v-lazy="scope.row.details.imageUrl" style="width:500px" @click="downloadAndSaveImage(scope.row.details.imageUrl)")
|
||||||
template(v-else-if="scope.row.imageUrl")
|
template(v-else-if="scope.row.imageUrl")
|
||||||
el-popover(placement="right" width="500px" trigger="click")
|
el-popover(placement="right" width="500px" trigger="click")
|
||||||
img.x-link(slot="reference" v-lazy="scope.row.imageUrl" style="flex:none;width:90px;border-radius:4px")
|
img.x-link(slot="reference" v-lazy="scope.row.imageUrl" style="flex:none;height:50px;border-radius:4px")
|
||||||
img.x-link(v-lazy="scope.row.imageUrl" style="width:500px" @click="downloadAndSaveImage(scope.row.imageUrl)")
|
img.x-link(v-lazy="scope.row.imageUrl" style="width:500px" @click="downloadAndSaveImage(scope.row.imageUrl)")
|
||||||
el-table-column(:label="$t('table.notification.message')" prop="message")
|
el-table-column(:label="$t('table.notification.message')" prop="message")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
|
|||||||
+14
-4
@@ -393,14 +393,21 @@ Vue.component('marquee-text', MarqueeText);
|
|||||||
|
|
||||||
if (!this.config.hideDevicesFromFeed) {
|
if (!this.config.hideDevicesFromFeed) {
|
||||||
AppApi.GetVRDevices().then((devices) => {
|
AppApi.GetVRDevices().then((devices) => {
|
||||||
|
var deviceList = [];
|
||||||
|
var baseStations = 0;
|
||||||
devices.forEach((device) => {
|
devices.forEach((device) => {
|
||||||
device[2] = parseInt(device[2], 10);
|
device[2] = parseInt(device[2], 10);
|
||||||
|
if (device[0] === 'base' && device[1] === 'connected') {
|
||||||
|
baseStations++;
|
||||||
|
} else {
|
||||||
|
deviceList.unshift(device);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
devices.sort((a, b) => {
|
deviceList.sort((a, b) => {
|
||||||
if (a[0] === b[0]) {
|
if (a[0] === b[0]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (a[0] === 'base') {
|
if (a[0] === 'tracker' || a[0] === 'base') {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (a[0].toLowerCase().includes('controller')) {
|
if (a[0].toLowerCase().includes('controller')) {
|
||||||
@@ -408,7 +415,7 @@ Vue.component('marquee-text', MarqueeText);
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
devices.sort((a, b) => {
|
deviceList.sort((a, b) => {
|
||||||
if (a[1] === b[1]) {
|
if (a[1] === b[1]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -420,7 +427,10 @@ Vue.component('marquee-text', MarqueeText);
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
this.devices = devices;
|
if (baseStations > 0) {
|
||||||
|
deviceList.push(['base', 'connected', baseStations]);
|
||||||
|
}
|
||||||
|
this.devices = deviceList;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.devices = [];
|
this.devices = [];
|
||||||
|
|||||||
@@ -437,6 +437,7 @@ html
|
|||||||
template(v-else-if="device[0] === 'base'")
|
template(v-else-if="device[0] === 'base'")
|
||||||
img(v-if="device[1] !== 'connected'" src="images/base_status_off.png" class="tracker-device")
|
img(v-if="device[1] !== 'connected'" src="images/base_status_off.png" class="tracker-device")
|
||||||
img(v-else src="images/base_status_ready.png" class="tracker-device")
|
img(v-else src="images/base_status_ready.png" class="tracker-device")
|
||||||
|
span(v-if="device[2] !== 100") {{ device[2] }}x
|
||||||
template(v-else)
|
template(v-else)
|
||||||
img(v-if="device[1] !== 'connected'" src="images/other_status_off.png" class="tracker-device")
|
img(v-if="device[1] !== 'connected'" src="images/other_status_off.png" class="tracker-device")
|
||||||
img(v-else-if="device[2] < 20" src="images/other_status_ready_low.png" class="tracker-device")
|
img(v-else-if="device[2] < 20" src="images/other_status_ready_low.png" class="tracker-device")
|
||||||
|
|||||||
Reference in New Issue
Block a user