diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index a24ca877..1952e334 100755
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -495,5 +495,10 @@
"memoryusage": "Memory Usage",
"freespace": "Free Space",
"activeusers": "Active Users"
+ },
+ "kopia": {
+ "status": "Status",
+ "backupsize": "Backup Size",
+ "backuptime": "Backup Time"
}
}
\ No newline at end of file
diff --git a/src/widgets/components.js b/src/widgets/components.js
index d39a7cc7..e4ecb947 100644
--- a/src/widgets/components.js
+++ b/src/widgets/components.js
@@ -25,6 +25,7 @@ const components = {
jellyfin: dynamic(() => import("./emby/component")),
jellyseerr: dynamic(() => import("./jellyseerr/component")),
komga: dynamic(() => import("./komga/component")),
+ kopia: dynamic(() => import("./kopia/component")),
lidarr: dynamic(() => import("./lidarr/component")),
mastodon: dynamic(() => import("./mastodon/component")),
medusa: dynamic(() => import("./medusa/component")),
diff --git a/src/widgets/kopia/component.jsx b/src/widgets/kopia/component.jsx
new file mode 100755
index 00000000..1e22ba86
--- /dev/null
+++ b/src/widgets/kopia/component.jsx
@@ -0,0 +1,42 @@
+import { useTranslation } from "next-i18next";
+
+import Container from "components/services/widget/container";
+import Block from "components/services/widget/block";
+import useWidgetAPI from "utils/proxy/use-widget-api";
+
+export default function Component({ service }) {
+ const { t } = useTranslation();
+
+ const { widget } = service;
+ const { data: kopiaData, error: kopiaError } = useWidgetAPI(widget, "api");
+
+ if (kopiaError) {
+ return ;
+ }
+
+ if (!kopiaData) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ const startTime = new Date(kopiaData.sources[0].lastSnapshot.startTime);
+ const endTime = new Date(kopiaData.sources[0].lastSnapshot.endTime);
+ const duration = new Date(endTime - startTime);
+ const hours = duration.getUTCHours().toString().padStart(2, '0');
+ const minutes = duration.getUTCMinutes().toString().padStart(2, '0');
+ const seconds = duration.getSeconds().toString().padStart(2, '0');
+ const time = (hours + minutes + seconds).split(':');
+
+ return (
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/widgets/kopia/widget.js b/src/widgets/kopia/widget.js
new file mode 100755
index 00000000..288ec0dd
--- /dev/null
+++ b/src/widgets/kopia/widget.js
@@ -0,0 +1,14 @@
+import genericProxyHandler from "utils/proxy/handlers/generic";
+
+const widget = {
+ api: "{url}/{endpoint}",
+ proxyHandler: genericProxyHandler,
+
+ mappings: {
+ api: {
+ endpoint: "api/v1/sources",
+ },
+ },
+};
+
+export default widget;
\ No newline at end of file
diff --git a/src/widgets/widgets.js b/src/widgets/widgets.js
index 72fe803b..bf9457c6 100644
--- a/src/widgets/widgets.js
+++ b/src/widgets/widgets.js
@@ -19,6 +19,7 @@ import homebridge from "./homebridge/widget";
import jackett from "./jackett/widget";
import jellyseerr from "./jellyseerr/widget";
import komga from "./komga/widget";
+import kopia from "./kopia/widget";
import lidarr from "./lidarr/widget";
import mastodon from "./mastodon/widget";
import medusa from "./medusa/widget";
@@ -89,6 +90,7 @@ const widgets = {
jellyfin: emby,
jellyseerr,
komga,
+ kopia,
lidarr,
mastodon,
medusa,