add mount of menu

fix store usage

add page loader
This commit is contained in:
Simon Vieille
2025-04-06 14:09:06 +02:00
parent d8a622ce0f
commit b287b671be
15 changed files with 175 additions and 81 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { axios } from '@nextcloud/axios'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
export const useConfigStore = defineStore('config', () => {
@@ -11,8 +11,12 @@ export const useConfigStore = defineStore('config', () => {
return config.value
}
config.value = await fetch(generateUrl('/apps/side_menu/js/config')).then((response) => response.data)
config.value = await axios.get(generateUrl('/apps/side_menu/js/config')).then((response) => response.data)
return config.value
}
return {
getConfig,
}
})