add new workspaces for users
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user