mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Use gunicorn instead of Werkzeug and 32 more very minor changes (#35)
This commit is contained in:
+1
-1
@@ -21,9 +21,9 @@ export default defineStore("album", {
|
||||
this.tracks = tracks.tracks;
|
||||
this.info = tracks.info;
|
||||
this.artists = artists;
|
||||
this.bio = null;
|
||||
},
|
||||
fetchBio(title: string, albumartist: string) {
|
||||
this.bio = null;
|
||||
getAlbumBio(title, albumartist).then((bio) => {
|
||||
this.bio = bio;
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
+15
-1
@@ -1,6 +1,12 @@
|
||||
import { defineStore } from "pinia";
|
||||
import state from "../composables/state";
|
||||
import { Track, fromFolder, fromAlbum, fromPlaylist } from "../interfaces";
|
||||
import {
|
||||
Track,
|
||||
fromFolder,
|
||||
fromAlbum,
|
||||
fromPlaylist,
|
||||
fromSearch,
|
||||
} from "../interfaces";
|
||||
import notif from "../composables/mediaNotification";
|
||||
import { FromOptions } from "../composables/enums";
|
||||
|
||||
@@ -181,6 +187,14 @@ export default defineStore("Queue", {
|
||||
playlistid: pid,
|
||||
};
|
||||
|
||||
this.setNewQueue(tracks);
|
||||
},
|
||||
playFromSearch(query: string, tracks: Track[]) {
|
||||
this.from = <fromSearch>{
|
||||
type: FromOptions.search,
|
||||
query: query,
|
||||
};
|
||||
|
||||
this.setNewQueue(tracks);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ export default defineStore("tabs", {
|
||||
current: tablist.home,
|
||||
}),
|
||||
actions: {
|
||||
changeTab(tab) {
|
||||
changeTab(tab: string) {
|
||||
if (tab === this.tabs.queue) {
|
||||
setTimeout(() => {
|
||||
perks.focusCurrent();
|
||||
Reference in New Issue
Block a user