From accbb50463791858d728f6f6174c5202f3d26dfc Mon Sep 17 00:00:00 2001 From: InsertDisc <31751462+InsertDisc@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:35:50 -0400 Subject: [PATCH 1/4] Update component.jsx Add missing empty response block Removed redundant error handling. Renamed fields to be simpler. --- src/widgets/romm/component.jsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index 5b36922e..3a2c297d 100644 --- a/src/widgets/romm/component.jsx +++ b/src/widgets/romm/component.jsx @@ -18,8 +18,18 @@ export default function Component({ service }) { ); } - if (responseError) { - return ; + if (!response) { + + return ( + + + + + + + + + ); } if (response) { @@ -28,11 +38,11 @@ export default function Component({ service }) { return ( - - - - - + + + + + ); } From af0aceec7ecb4da18407785223ab5cd66ce16a9e Mon Sep 17 00:00:00 2001 From: InsertDisc <31751462+InsertDisc@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:44:17 -0400 Subject: [PATCH 2/4] Update common.json Added additional fields for RomM. --- public/locales/en/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 1ac41f90..195053b8 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -831,7 +831,11 @@ }, "romm": { "platforms": "Platforms", - "totalRoms": "Total ROMs" + "roms": "Games", + "saves": "Saves", + "states": "States", + "screenshots": "Screenshots", + "totalfilesize": "Total Size" }, "netdata": { "warnings": "Warnings", From c4853c145684e62a1805cbf70abd087c39e87d3e Mon Sep 17 00:00:00 2001 From: InsertDisc <31751462+InsertDisc@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:54:47 -0400 Subject: [PATCH 3/4] Update romm.md Corrected field names --- docs/widgets/services/romm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/widgets/services/romm.md b/docs/widgets/services/romm.md index 73f9c01a..6d8bc8b3 100644 --- a/docs/widgets/services/romm.md +++ b/docs/widgets/services/romm.md @@ -3,7 +3,7 @@ title: Romm description: Romm Widget Configuration --- -Allowed fields: `["platforms", "totalRoms", "totalSaves", "totalStates", "totalScreenshots", "totalFilesize"]`. +Allowed fields: `["platforms", "roms", "saves", "states", "screenshots", "totalfilesize"]`. ```yaml widget: @@ -11,5 +11,5 @@ widget: url: http://romm.host.or.ip username: username # optional password: password # optional - fields: ["platforms", "totalRoms", "totalSaves", "totalScreenshots"] + fields: ["platforms", "roms", "saves", "screenshots"] ``` From bbd83a1eaae9a2c7d02fb01c660746b172fa2457 Mon Sep 17 00:00:00 2001 From: InsertDisc <31751462+InsertDisc@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:00:22 -0400 Subject: [PATCH 4/4] Update component.jsx Remove unnecessary empty line per lint --- src/widgets/romm/component.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index 3a2c297d..94be30d1 100644 --- a/src/widgets/romm/component.jsx +++ b/src/widgets/romm/component.jsx @@ -19,7 +19,6 @@ export default function Component({ service }) { } if (!response) { - return (