Add game up time to wrist feed

This commit is contained in:
Natsumi
2022-02-11 12:25:55 +13:00
parent d10f2c3882
commit 1cb2c96a06
4 changed files with 17 additions and 7 deletions

View File

@@ -11640,7 +11640,8 @@ speechSynthesis.getVoices();
name: this.lastLocation.name,
playerList: Array.from(this.lastLocation.playerList.values()),
friendList: Array.from(this.lastLocation.friendList.values()),
progressPie
progressPie,
onlineFor: API.currentUser.$online_for
};
var json = JSON.stringify(lastLocation);
AppApi.ExecuteVrFeedFunction('lastLocationUpdate', json);

View File

@@ -178,9 +178,11 @@ Vue.component('marquee-text', MarqueeText);
name: '',
playerList: [],
friendList: [],
progressPie: false
progressPie: false,
onlineFor: 0
},
lastLocationTimer: '',
onlineForTimer: '',
wristFeed: [],
devices: []
},
@@ -337,12 +339,19 @@ Vue.component('marquee-text', MarqueeText);
var cpuUsage = await AppApi.CpuUsage();
this.cpuUsage = cpuUsage.toFixed(0);
}
this.lastLocationTimer = '';
if (this.lastLocation.date !== 0) {
this.lastLocationTimer = timeToText(
Date.now() - this.lastLocation.date
);
} else {
this.lastLocationTimer = '';
}
if (this.lastLocation.onlineForTimer !== 0) {
this.onlineForTimer = timeToText(
Date.now() - this.lastLocation.onlineFor
);
} else {
this.onlineForTimer = '';
}
if (!this.config.hideDevicesFromFeed) {

View File

@@ -404,7 +404,7 @@ html
template(v-else-if="downloadProgress > 0")
span(style="display:inline-block;margin-right:5px") {{ downloadProgress }}%
template(v-if="lastLocation.date !== 0")
span(style="float:right") {{ lastLocationTimer }}
span(style="float:right") {{ lastLocationTimer }} / {{ onlineForTimer }}
span(style="display:inline-block") {{ lastLocation.playerList.length }}
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
@@ -414,7 +414,7 @@ html
template(v-else-if="downloadProgress > 0")
span(style="display:inline-block;margin-right:5px") Downloading: {{ downloadProgress }}%
template(v-if="lastLocation.date !== 0")
span(style="float:right") Timer: {{ lastLocationTimer }}
span(style="float:right") Timer: {{ lastLocationTimer }} / {{ onlineForTimer }}
span(style="display:inline-block") Players: {{ lastLocation.playerList.length }}
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}

View File

@@ -205,7 +205,7 @@ button {
position: relative;
flex: none;
padding: 10px;
overflow: hidden auto;
overflow: hidden;
}
.x-containerbottom {