Skip to content

Commit b731659

Browse files
committed
Finish up deletion logic
1 parent 039650b commit b731659

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

resources/assets/scripts/components/server/components/database/CreateDatabaseModal.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@
2323
<div class="text-right">
2424
<button class="btn btn-secondary btn-sm mr-2" v-on:click.once="$emit('close')">Cancel</button>
2525
<button class="btn btn-green btn-sm"
26-
:disabled="errors.any() || !canSubmit"
26+
:disabled="errors.any() || !canSubmit || showSpinner"
2727
v-on:click="submit"
28-
>Create</button>
28+
>
29+
<span class="spinner white" v-bind:class="{ hidden: !showSpinner }">&nbsp;</span>
30+
<span :class="{ hidden: showSpinner }">
31+
Create
32+
</span>
33+
</button>
2934
</div>
3035
</div>
3136
</template>
@@ -40,6 +45,7 @@
4045
data: function () {
4146
return {
4247
loading: false,
48+
showSpinner: false,
4349
database: '',
4450
remote: '%',
4551
errorMessage: '',
@@ -54,6 +60,7 @@
5460
5561
methods: {
5662
submit: function () {
63+
this.showSpinner = true;
5764
this.errorMessage = '';
5865
this.loading = true;
5966
@@ -73,6 +80,7 @@
7380
console.error('A network error was encountered while processing this request.', err.response);
7481
}).then(() => {
7582
this.loading = false;
83+
this.showSpinner = false;
7684
})
7785
}
7886
}

resources/assets/scripts/components/server/subpages/Databases.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="spinner spinner-xl blue"></div>
55
</div>
66
<div class="animate fadein" v-else>
7-
<div class="context-box" v-if="!databases.length">
7+
<div class="content-box mb-6" v-if="!databases.length">
88
<div class="flex items-center">
99
<database-icon class="flex-none text-grey-darker"></database-icon>
1010
<div class="flex-1 px-4 text-grey-darker">
@@ -92,8 +92,6 @@
9292
* is closed with a successful callback.
9393
*/
9494
handleModalCallback: function (object) {
95-
console.log('handle', object);
96-
9795
const data = object;
9896
data.password = data.relationships.password.attributes.password;
9997
data.showPassword = false;

0 commit comments

Comments
 (0)