Finish up deletion logic
This commit is contained in:
parent
039650bf75
commit
b731659135
|
@ -23,9 +23,14 @@
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button class="btn btn-secondary btn-sm mr-2" v-on:click.once="$emit('close')">Cancel</button>
|
<button class="btn btn-secondary btn-sm mr-2" v-on:click.once="$emit('close')">Cancel</button>
|
||||||
<button class="btn btn-green btn-sm"
|
<button class="btn btn-green btn-sm"
|
||||||
:disabled="errors.any() || !canSubmit"
|
:disabled="errors.any() || !canSubmit || showSpinner"
|
||||||
v-on:click="submit"
|
v-on:click="submit"
|
||||||
>Create</button>
|
>
|
||||||
|
<span class="spinner white" v-bind:class="{ hidden: !showSpinner }"> </span>
|
||||||
|
<span :class="{ hidden: showSpinner }">
|
||||||
|
Create
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -40,6 +45,7 @@
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
showSpinner: false,
|
||||||
database: '',
|
database: '',
|
||||||
remote: '%',
|
remote: '%',
|
||||||
errorMessage: '',
|
errorMessage: '',
|
||||||
|
@ -54,6 +60,7 @@
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
submit: function () {
|
submit: function () {
|
||||||
|
this.showSpinner = true;
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
|
@ -73,6 +80,7 @@
|
||||||
console.error('A network error was encountered while processing this request.', err.response);
|
console.error('A network error was encountered while processing this request.', err.response);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.showSpinner = false;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="spinner spinner-xl blue"></div>
|
<div class="spinner spinner-xl blue"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="animate fadein" v-else>
|
<div class="animate fadein" v-else>
|
||||||
<div class="context-box" v-if="!databases.length">
|
<div class="content-box mb-6" v-if="!databases.length">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<database-icon class="flex-none text-grey-darker"></database-icon>
|
<database-icon class="flex-none text-grey-darker"></database-icon>
|
||||||
<div class="flex-1 px-4 text-grey-darker">
|
<div class="flex-1 px-4 text-grey-darker">
|
||||||
|
@ -92,8 +92,6 @@
|
||||||
* is closed with a successful callback.
|
* is closed with a successful callback.
|
||||||
*/
|
*/
|
||||||
handleModalCallback: function (object) {
|
handleModalCallback: function (object) {
|
||||||
console.log('handle', object);
|
|
||||||
|
|
||||||
const data = object;
|
const data = object;
|
||||||
data.password = data.relationships.password.attributes.password;
|
data.password = data.relationships.password.attributes.password;
|
||||||
data.showPassword = false;
|
data.showPassword = false;
|
||||||
|
|
Loading…
Reference in New Issue