diff --git a/src/components/services/widget/container.jsx b/src/components/services/widget/container.jsx
index c89047c9..f4d8c13e 100644
--- a/src/components/services/widget/container.jsx
+++ b/src/components/services/widget/container.jsx
@@ -33,5 +33,5 @@ export default function Container({ error = false, children, service }) {
}));
}
- return
{visibleChildren.slice(0, 4)}
;
+ return {visibleChildren}
;
}
diff --git a/src/widgets/nextcloud/component.jsx b/src/widgets/nextcloud/component.jsx
index 96de96dc..9bc54dc8 100755
--- a/src/widgets/nextcloud/component.jsx
+++ b/src/widgets/nextcloud/component.jsx
@@ -13,16 +13,20 @@ export default function Component({ service }) {
if (nextcloudError) {
return ;
}
+
+ // cpuload & memoryusage were deprecated, dont break existing installs & dont have > 4 blocks total
+ let deprecatedFieldsCount = widget.fields ? widget.fields.includes('cpuload') + widget.fields.includes('memoryusage') : 0;
+ if (widget.fields && widget.fields.length - deprecatedFieldsCount < 4) deprecatedFieldsCount -= 4 - (widget.fields.length - deprecatedFieldsCount);
if (!nextcloudData) {
return (
-
-
+ {widget.fields?.includes('cpuload') && }
+ {widget.fields?.includes('memoryusage') && }
-
-
+ {deprecatedFieldsCount < 2 && }
+ {deprecatedFieldsCount < 1 && }
);
}
@@ -32,12 +36,12 @@ export default function Component({ service }) {
return (
-
-
+ {widget.fields?.includes('cpuload') && }
+ {widget.fields?.includes('memoryusage') && }
-
-
+ {deprecatedFieldsCount < 2 && }
+ {deprecatedFieldsCount < 1 && }
);
}