add new workspaces for users

This commit is contained in:
Adrian Zürcher
2026-02-19 10:49:12 +01:00
parent b726eb42dc
commit 6392877dc1
21 changed files with 744 additions and 80 deletions

View File

@@ -52,7 +52,7 @@ import { appApi } from 'src/boot/axios';
import { i18n } from 'src/boot/lang';
import SiteTitle from 'src/vueLib/general/SiteTitle.vue';
import { useNotify } from 'src/vueLib/general/useNotify';
import { databaseName } from 'src/vueLib/models/settings';
import { databaseName, workspace } from 'src/vueLib/models/settings';
import { onMounted, ref } from 'vue';
const stats = ref();
@@ -71,8 +71,10 @@ const amounts = ref<{
const { NotifyResponse } = useNotify();
onMounted(async () => {
let path = databaseName.value;
if (workspace.value !== '') path = workspace.value + '/' + path;
stats.value = await appApi
.post('/stats', { database: databaseName.value })
.post('/stats', { database: path })
.then((resp) => {
if ((resp.data.databaseSize as number) >= 1000000000) {
return (resp.data.data.databaseSize / 1000000000).toFixed(2) + ' GB';