Skip to content

Commit

Permalink
Changed application Loading provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Redjaw committed Oct 15, 2024
1 parent 2f49a27 commit 8b7d4c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PrimeVue from 'primevue/config'
import router from './App.routes.js'
import store from './App.store.js'
import { createPinia } from 'pinia'
import { Quasar, Notify } from 'quasar'
import { Quasar, Notify, Loading } from 'quasar'

import VueAxios from 'vue-axios'
import interceptor from './axios.js'
Expand Down Expand Up @@ -61,7 +61,8 @@ app.use(VueAxios, interceptor)
.use(ResizeObserver)
.use(Quasar, {
plugins: {
Notify
Notify,
Loading
}
})

Expand Down
10 changes: 6 additions & 4 deletions src/modules/documentExecution/main/DocumentExecution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export default defineComponent({
window.removeEventListener('message', this.iframeEventsListener)
},
async created() {
this.setLoading(true)
this.$q.loading.show()
this.setEventListeners()
window.addEventListener('message', this.iframeEventsListener)
Expand All @@ -423,7 +423,10 @@ export default defineComponent({
await this.loadUserConfig()
this.setMode()
} else {
if (this.propMode !== 'document-execution' && !this.$route.path.includes('olap-designer') && this.$route.name !== 'document-execution' && this.$route.name !== 'document-execution-embed' && this.$route.name !== 'document-execution-workspace') return
if (this.propMode !== 'document-execution' && !this.$route.path.includes('olap-designer') && this.$route.name !== 'document-execution' && this.$route.name !== 'document-execution-embed' && this.$route.name !== 'document-execution-workspace') {
this.$q.loading.hide()
return
}
if (this.$route.name === 'new-dashboard') this.newDashboardMode = true
await this.loadUserConfig()
Expand All @@ -436,8 +439,6 @@ export default defineComponent({
document: this.document
})
}
this.setLoading(false)
if (!this.document.label) return
if (this.document.label === 'new-dashboard') {
this.newDashboardMode = true
Expand Down Expand Up @@ -754,6 +755,7 @@ export default defineComponent({
else if (this.$route.path.includes('olap')) this.mode = 'olap'
else if (this.$route.path.includes('dashboard')) this.mode = 'dashboard'
else this.mode = 'iframe'
this.$q.loading.hide()
},
async loadPage(initialLoading = false, documentLabel: string | null = null, crossNavigationPopupMode = false) {
this.loading = crossNavigationPopupMode ? false : true
Expand Down

0 comments on commit 8b7d4c8

Please sign in to comment.