mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Fix: Disable save button on submit (#3729)
This commit is contained in:
parent
0af4ee6c34
commit
1e12ca4786
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<!-- Sidebar Footer -->
|
<!-- Sidebar Footer -->
|
||||||
<div class="sidebar-footer">
|
<div class="sidebar-footer">
|
||||||
<button class="btn btn-success me-2" @click="save">
|
<button class="btn btn-success me-2" :disabled="loading" @click="save">
|
||||||
<font-awesome-icon icon="save" />
|
<font-awesome-icon icon="save" />
|
||||||
{{ $t("Save") }}
|
{{ $t("Save") }}
|
||||||
</button>
|
</button>
|
||||||
@ -438,6 +438,7 @@ export default {
|
|||||||
lastUpdateTime: dayjs(),
|
lastUpdateTime: dayjs(),
|
||||||
updateCountdown: null,
|
updateCountdown: null,
|
||||||
updateCountdownText: null,
|
updateCountdownText: null,
|
||||||
|
loading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -806,6 +807,7 @@ export default {
|
|||||||
|
|
||||||
/** Save the status page */
|
/** Save the status page */
|
||||||
save() {
|
save() {
|
||||||
|
this.loading = true;
|
||||||
let startTime = new Date();
|
let startTime = new Date();
|
||||||
this.config.slug = this.config.slug.trim().toLowerCase();
|
this.config.slug = this.config.slug.trim().toLowerCase();
|
||||||
|
|
||||||
@ -823,10 +825,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.loading = false;
|
||||||
location.href = "/status/" + this.config.slug;
|
location.href = "/status/" + this.config.slug;
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
this.loading = false;
|
||||||
toast.error(res.msg);
|
toast.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user