mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
w: upgrade deps
This commit is contained in:
1 parent
47499bdcd6
commit
0824487342
19 files changed
+132
-88
No files matched your search
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user