mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
Use gunicorn instead of Werkzeug and 32 more very minor changes (#35)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user