refactoring of SideMenuWithCategories.vue
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2022-10-18 22:27:50 +02:00
parent 2a67038ff4
commit f6d9a9f71c
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -79,17 +79,13 @@ export default {
}, },
methods: { methods: {
retrieveApps() { retrieveApps() {
this.apps = []
let that = this
axios axios
.get(OC.generateUrl('/apps/side_menu/nav/items')) .get(OC.generateUrl('/apps/side_menu/nav/items'))
.then(function(response) { .then((response) => {
that.items = response.data.items this.items = response.data.items
let apps = [] let apps = []
for (let category of that.items) { for (let category of this.items) {
for (let a in category.apps) { for (let a in category.apps) {
apps.push(category.apps[a]) apps.push(category.apps[a])
} }
@ -107,15 +103,13 @@ export default {
}, },
retrieveConfig() { retrieveConfig() {
let that = this
axios axios
.get(OC.generateUrl('/apps/side_menu/js/config')) .get(OC.generateUrl('/apps/side_menu/js/config'))
.then(function(response) { .then((response) => {
const config = response.data const config = response.data
that.targetBlankApps = config['target-blank-apps'] this.targetBlankApps = config['target-blank-apps']
that.settings = config['settings'] this.settings = config['settings']
}) })
}, },
}, },