w: upgrade deps

This commit is contained in:
undefined committed 2021-12-16 00:16:27 +08:00
1 parent 47499bdcd6
commit 0824487342
19 files changed
+132 -88

No files matched your search

+1 -5
View File
@@ -24,16 +24,12 @@ async function getStatus() {
class StatusHandler extends Handler {
async get() {
const path = [
['Hydro', 'homepage'],
['status', null],
];
const stats = await getStatus();
for (const stat of stats) {
if (!stat.battery.hasBattery) stat.battery = 'No battery';
else stat.battery = `${stat.battery.type} ${stat.battery.model} ${stat.battery.percent}%${stat.battery.isCharging ? ' Charging' : ''}`;
}
this.response.body = { stats, path };
this.response.body = { stats };
this.response.template = 'status.html';
}
}