BREAK EVERYTHING

- some broken edits
This commit is contained in:
geoffrey45
2022-06-17 20:29:09 +03:00
parent 7718a7c99f
commit 06ed41d869
9 changed files with 101 additions and 49 deletions
+12 -2
View File
@@ -1,6 +1,6 @@
import { ref, reactive } from "@vue/reactivity";
import { defineStore } from "pinia";
import { AlbumInfo, Artist, Track } from "../interfaces";
import { AlbumInfo, Artist, Playlist, Track } from "../interfaces";
import {
searchTracks,
searchAlbums,
@@ -33,6 +33,7 @@ export default defineStore("search", () => {
tracks: 0,
albums: 0,
artists: 0,
playlists: 0,
});
const tracks = reactive({
@@ -53,6 +54,12 @@ export default defineStore("search", () => {
more: false,
});
const playlists = reactive({
query: "",
value: <Playlist[]>[],
more: false,
});
/**
* Searches for tracks, albums and artists
* @param newquery query to search for
@@ -123,7 +130,9 @@ export default defineStore("search", () => {
.then(() => scrollOnLoad());
}
function updateLoadCounter(type: string) {
type loadType = "tracks" | "albums" | "artists" | "playlists";
function updateLoadCounter(type: loadType) {
switch (type) {
case "tracks":
loadCounter.tracks += 6;
@@ -204,6 +213,7 @@ export default defineStore("search", () => {
tracks,
albums,
artists,
playlists,
query,
currentTab,
loadCounter,