mdi-package-variant-closed
-
{{ storage.location || \`Storage #\${storage.id}\` }}
+
{{ storage.name || storage.location || \`Storage #\${storage.id}\` }}
{{ objectsInCurrentStorage.length }} objects
diff --git a/web/src/pages/storage.vue b/web/src/pages/storage.vue
new file mode 100644
index 0000000..d14b55c
--- /dev/null
+++ b/web/src/pages/storage.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+ Storage Spaces
+
+
+ Add Storage Space
+
+
+
+
+
+ {{ error }}
+
+
+
+
+
+
+
+
+
+ ID |
+ Name |
+ Location |
+ Parent |
+ Actions |
+
+
+
+
+ {{ space.id }} |
+ {{ space.name || '-' }} |
+ {{ space.location || '-' }} |
+
+
+ {{ getParentName(space.parent.int64) }}
+
+ -
+ |
+
+
+ mdi-eye
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ Add New Storage Space
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ error }}
+
+
+
+
+
+ Cancel
+
+ Save
+
+
+
+
+
+
+
+
diff --git a/web/src/stores/storage.ts b/web/src/stores/storage.ts
index 0c75f68..c91d573 100644
--- a/web/src/stores/storage.ts
+++ b/web/src/stores/storage.ts
@@ -8,6 +8,7 @@ interface StorageSpace {
int64: number;
} | null;
location: string | null;
+ name: string | null;
}
interface StorageObject {
@@ -43,7 +44,7 @@ export const useStorageStore = defineStore('storage', {
},
actions: {
- async createStorageSpace(data: { location: string; parentId: number | null }): Promise
{
+ async createStorageSpace(data: { name: string; location: string; parentId: number | null }): Promise {
this.loading = true;
this.error = null;
@@ -57,6 +58,7 @@ export const useStorageStore = defineStore('storage', {
'Content-Type': 'application/json',
},
body: JSON.stringify({
+ name: data.name,
location: data.location,
parent: parentData
}),
@@ -95,7 +97,8 @@ export const useStorageStore = defineStore('storage', {
this.storageSpaces = data.map((space: any) => ({
id: space.id,
parent: space.parent,
- location: space.location
+ location: space.location,
+ name: space.name
}));
} catch (error: any) {
this.error = error.message;