commit
df652a1635
@ -3,7 +3,7 @@ title: Romm
|
|||||||
description: Romm Widget Configuration
|
description: Romm Widget Configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
Allowed fields: `["platforms", "totalRoms", "totalSaves", "totalStates", "totalScreenshots", "totalFilesize"]`.
|
Allowed fields: `["platforms", "roms", "saves", "states", "screenshots", "totalfilesize"]`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
widget:
|
widget:
|
||||||
@ -11,5 +11,5 @@ widget:
|
|||||||
url: http://romm.host.or.ip
|
url: http://romm.host.or.ip
|
||||||
username: username # optional
|
username: username # optional
|
||||||
password: password # optional
|
password: password # optional
|
||||||
fields: ["platforms", "totalRoms", "totalSaves", "totalScreenshots"]
|
fields: ["platforms", "roms", "saves", "screenshots"]
|
||||||
```
|
```
|
||||||
|
|||||||
@ -831,7 +831,11 @@
|
|||||||
},
|
},
|
||||||
"romm": {
|
"romm": {
|
||||||
"platforms": "Platforms",
|
"platforms": "Platforms",
|
||||||
"totalRoms": "Total ROMs"
|
"roms": "Games",
|
||||||
|
"saves": "Saves",
|
||||||
|
"states": "States",
|
||||||
|
"screenshots": "Screenshots",
|
||||||
|
"totalfilesize": "Total Size"
|
||||||
},
|
},
|
||||||
"netdata": {
|
"netdata": {
|
||||||
"warnings": "Warnings",
|
"warnings": "Warnings",
|
||||||
|
|||||||
@ -18,8 +18,17 @@ export default function Component({ service }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (responseError) {
|
if (!response) {
|
||||||
return <Container service={service} error={responseError} />;
|
return (
|
||||||
|
<Container service={service}>
|
||||||
|
<Block label="romm.platforms" />
|
||||||
|
<Block label="romm.roms" />
|
||||||
|
<Block label="romm.saves" />
|
||||||
|
<Block label="romm.states" />
|
||||||
|
<Block label="romm.screenshots" />
|
||||||
|
<Block label="romm.totalfilesize" />
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response) {
|
if (response) {
|
||||||
@ -28,11 +37,11 @@ export default function Component({ service }) {
|
|||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="romm.platforms" value={t("common.number", { value: response.PLATFORMS })} />
|
<Block label="romm.platforms" value={t("common.number", { value: response.PLATFORMS })} />
|
||||||
<Block label="romm.totalRoms" value={t("common.number", { value: response.ROMS })} />
|
<Block label="romm.roms" value={t("common.number", { value: response.ROMS })} />
|
||||||
<Block label="romm.totalSaves" value={t("common.number", { value: response.SAVES })} />
|
<Block label="romm.saves" value={t("common.number", { value: response.SAVES })} />
|
||||||
<Block label="romm.totalStates" value={t("common.number", { value: response.STATES })} />
|
<Block label="romm.states" value={t("common.number", { value: response.STATES })} />
|
||||||
<Block label="romm.totalScreenshots" value={t("common.number", { value: response.SCREENSHOTS })} />
|
<Block label="romm.screenshots" value={t("common.number", { value: response.SCREENSHOTS })} />
|
||||||
<Block label="romm.totalFilesize" value={t("common.filesize", { value: totalFilesizeGB })} />
|
<Block label="romm.totalfilesize" value={t("common.filesize", { value: totalFilesizeGB })} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user