mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 22:03:50 +02:00
feat: Instance Activity Chart (#1141)
* feat: Instance Activity Chart * fix: chart data handling
This commit is contained in:
@@ -89,7 +89,8 @@ export default class extends baseClass {
|
||||
link: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
isOpenPreviousInstanceInfoDialog: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -177,7 +178,14 @@ export default class extends baseClass {
|
||||
API.$emit('SHOW_WORLD_DIALOG_SHORTNAME', this.hint);
|
||||
return;
|
||||
}
|
||||
API.$emit('SHOW_WORLD_DIALOG', instanceId);
|
||||
if (this.isOpenPreviousInstanceInfoDialog) {
|
||||
this.$emit(
|
||||
'open-previous-instance-info-dialog',
|
||||
instanceId
|
||||
);
|
||||
} else {
|
||||
API.$emit('SHOW_WORLD_DIALOG', instanceId);
|
||||
}
|
||||
}
|
||||
},
|
||||
showGroupDialog() {
|
||||
|
||||
@@ -40,13 +40,13 @@ export default {
|
||||
return obj;
|
||||
},
|
||||
|
||||
timeToText(sec) {
|
||||
var n = Number(sec);
|
||||
timeToText(sec, isNeedSeconds = false) {
|
||||
let n = Number(sec);
|
||||
if (isNaN(n)) {
|
||||
return this.escapeTag(sec);
|
||||
}
|
||||
n = Math.floor(n / 1000);
|
||||
var arr = [];
|
||||
const arr = [];
|
||||
if (n < 0) {
|
||||
n = -n;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
arr.push(`${Math.floor(n / 60)}m`);
|
||||
n %= 60;
|
||||
}
|
||||
if (arr.length === 0 && n < 60) {
|
||||
if (isNeedSeconds || (arr.length === 0 && n < 60)) {
|
||||
arr.push(`${n}s`);
|
||||
}
|
||||
return arr.join(' ');
|
||||
|
||||
Reference in New Issue
Block a user