1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: loading animation in properties tabs

This commit is contained in:
2021-01-22 18:27:45 +01:00
parent 4bc9bbfb34
commit 1cf6485896
7 changed files with 73 additions and 25 deletions

View File

@ -95,7 +95,8 @@
</div>
</div>
</div>
<div class="workspace-query-results column col-12 mt-2">
<div class="workspace-query-results column col-12 mt-2 p-relative">
<BaseLoader v-if="isLoading" />
<label class="form-label ml-2">{{ $t('message.triggerStatement') }}</label>
<QueryEditor
v-if="isSelected"
@ -110,13 +111,15 @@
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import QueryEditor from '@/components/QueryEditor';
import { mapGetters, mapActions } from 'vuex';
import BaseLoader from '@/components/BaseLoader';
import Triggers from '@/ipc-api/Triggers';
export default {
name: 'WorkspacePropsTabTrigger',
components: {
BaseLoader,
QueryEditor
},
props: {
@ -126,7 +129,7 @@ export default {
data () {
return {
tabUid: 'prop',
isQuering: false,
isLoading: false,
isSaving: false,
originalTrigger: null,
localTrigger: { sql: '' },
@ -197,7 +200,9 @@ export default {
}),
async getTriggerData () {
if (!this.trigger) return;
this.isQuering = true;
this.localTrigger = { sql: '' };
this.isLoading = true;
const params = {
uid: this.connection.uid,
@ -220,7 +225,7 @@ export default {
}
this.resizeQueryEditor();
this.isQuering = false;
this.isLoading = false;
},
async saveChanges () {
if (this.isSaving) return;