Add the spinner component to App.vue instead of Accounts.vue so that is usable from all pages.

Update showSpinner function to accept the message to be displayed, defaults to 'loading' if none is provided.
This commit is contained in:
Josh
2023-04-24 23:09:50 +12:00
parent b9780087cc
commit 68e3a8d100
3 changed files with 21 additions and 13 deletions

View File

@ -7,6 +7,8 @@
<div v-if="this.$root.isTestingApp" class="demo has-background-warning has-text-centered is-size-7-mobile">
{{ $t('commons.testing_do_not_post_sensitive_data') }}
</div>
<!-- Loading spinner -->
<spinner :active="$root.spinner.active" :message="$root.spinner.message"/>
<notifications id="vueNotification" role="alert" width="100%" position="top" :duration="4000" :speed="0" :max="1" classes="notification is-radiusless" />
<main class="main-section">
<router-view></router-view>
@ -15,9 +17,14 @@
</template>
<script>
import Spinner from "./Spinner.vue";
export default {
name: 'App',
components: {
Spinner
},
data(){
return {
}
@ -31,4 +38,4 @@
}
}
</script>
</script>