migrate admin settings

This commit is contained in:
Simon Vieille
2025-04-10 19:54:03 +02:00
parent 8c5c43dafa
commit f9c3f96919
25 changed files with 1024 additions and 108 deletions
+12
View File
@@ -5,6 +5,7 @@ import { generateUrl } from '@nextcloud/router'
export const useConfigStore = defineStore('config', () => {
const config = ref(null)
const appConfig = ref(null)
async function getConfig() {
if (config.value !== null) {
@@ -16,7 +17,18 @@ export const useConfigStore = defineStore('config', () => {
return config.value
}
async function getAppConfig() {
if (appConfig.value !== null) {
return appConfig.value
}
appConfig.value = await axios.get(generateUrl('/apps/side_menu/admin/config')).then((response) => response.data)
return appConfig.value
}
return {
getConfig,
getAppConfig,
}
})