From 97436489c6b7fc04560c1d556b6b896f3a7fcfaa Mon Sep 17 00:00:00 2001 From: SebClem Date: Wed, 26 Oct 2022 15:34:45 +0200 Subject: [PATCH] :hammer: Show cloud backups list --- nextcloud_backup/frontend/src/App.vue | 9 +- .../src/components/cloud/CloudList.vue | 103 ++++++++++++++++++ .../frontend/src/plugins/vuetify.ts | 3 +- .../frontend/src/services/webdavService.ts | 10 ++ nextcloud_backup/frontend/src/types/webdav.ts | 8 ++ 5 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 nextcloud_backup/frontend/src/components/cloud/CloudList.vue create mode 100644 nextcloud_backup/frontend/src/services/webdavService.ts create mode 100644 nextcloud_backup/frontend/src/types/webdav.ts diff --git a/nextcloud_backup/frontend/src/App.vue b/nextcloud_backup/frontend/src/App.vue index f6838e9..b701a38 100644 --- a/nextcloud_backup/frontend/src/App.vue +++ b/nextcloud_backup/frontend/src/App.vue @@ -3,7 +3,13 @@ - + + + + + + + @@ -11,6 +17,7 @@ import NavbarComponent from "./components/NavbarComponent.vue"; import MessageBar from "./components/MessageBar.vue"; import WebdavSettingsMenu from "./components/settings/WebdavConfigMenu.vue"; +import CloudList from "./components/cloud/CloudList.vue"; diff --git a/nextcloud_backup/frontend/src/components/cloud/CloudList.vue b/nextcloud_backup/frontend/src/components/cloud/CloudList.vue new file mode 100644 index 0000000..973cee4 --- /dev/null +++ b/nextcloud_backup/frontend/src/components/cloud/CloudList.vue @@ -0,0 +1,103 @@ + + + diff --git a/nextcloud_backup/frontend/src/plugins/vuetify.ts b/nextcloud_backup/frontend/src/plugins/vuetify.ts index 0661e9d..762a72b 100644 --- a/nextcloud_backup/frontend/src/plugins/vuetify.ts +++ b/nextcloud_backup/frontend/src/plugins/vuetify.ts @@ -8,7 +8,8 @@ import { createVuetify } from "vuetify"; const darkTheme = { dark: true, colors: { - primary: "#0091ea", + primary: "#0091ea", //light-blue accent-4 + accent: "#FF6F00", //amber darken-4 }, }; diff --git a/nextcloud_backup/frontend/src/services/webdavService.ts b/nextcloud_backup/frontend/src/services/webdavService.ts new file mode 100644 index 0000000..5f07076 --- /dev/null +++ b/nextcloud_backup/frontend/src/services/webdavService.ts @@ -0,0 +1,10 @@ +import type { WebdavBackup } from "@/types/webdav"; +import kyClient from "./kyClient"; + +export function getAutoBackupList() { + return kyClient.get("webdav/backup/auto").json(); +} + +export function getManualBackupList() { + return kyClient.get("webdav/backup/manual").json(); +} diff --git a/nextcloud_backup/frontend/src/types/webdav.ts b/nextcloud_backup/frontend/src/types/webdav.ts new file mode 100644 index 0000000..413ddea --- /dev/null +++ b/nextcloud_backup/frontend/src/types/webdav.ts @@ -0,0 +1,8 @@ +import type { DateTime } from "luxon"; + +export interface WebdavBackup { + id: string; + name: string; + size: number; + lastEdit: DateTime; +} \ No newline at end of file