Use gunicorn instead of Werkzeug and 32 more very minor changes (#35)

This commit is contained in:
Mungai Geoffrey
2022-04-21 03:29:42 +03:00
committed by GitHub
parent 68b474bbba
commit ef68cae625
33 changed files with 751 additions and 227 deletions
+26
View File
@@ -0,0 +1,26 @@
import { defineStore } from "pinia";
export default defineStore("Loader", {
state: () => ({
loading: false,
duration: 0,
}),
actions: {
startLoading() {
this.loading = true;
this.duration = new Date().getTime();
},
stopLoading() {
const diff = new Date().getTime() - this.duration;
console.log(diff);
if (diff <= 250) {
setTimeout(() => {
this.loading = false;
}, 250 - diff);
} else {
this.loading = false;
}
},
},
});