diff --git a/src/composables/state.js b/src/composables/state.ts similarity index 53% rename from src/composables/state.js rename to src/composables/state.ts index 24ec2bd..3d51b89 100644 --- a/src/composables/state.js +++ b/src/composables/state.ts @@ -1,65 +1,48 @@ import { ref } from "@vue/reactivity"; import { reactive } from "vue"; +import * as i from "../interfaces"; const search_query = ref(""); -const queue = ref([ - { +const queue = ref( + Array({ title: "Nothing played yet", artists: ["... blah blah blah"], - image: "http://0.0.0.0:8900/images/defaults/5.webp", - _id: { - $oid: "", - }, - }, -]); + image: "http://0.0.0.0:8900/images/thumbnails/4.webp", + trackid: "", + }) +); const folder_song_list = ref([]); const folder_list = ref([]); -const current = ref({ +const current = ref({ title: "Nothing played yet", artists: ["... blah blah blah"], - image: "http://0.0.0.0:8900/images/defaults/1.webp", - _id: { - $oid: "", - }, + image: "http://0.0.0.0:8900/images/thumbnails/4.webp", + trackid: "", }); -const prev = ref({ - title: "The previous song", +const prev = ref({ + title: "Nothing played yet", artists: ["... blah blah blah"], - _id: { - $oid: "", - }, + image: "http://0.0.0.0:8900/images/thumbnails/4.webp", + trackid: "", }); const album = reactive({ - tracklist: [], - info: {}, - artists: [], + tracklist: Array(), + info: {}, + artists: Array(), bio: "", }); -const filters = ref([]); - -const magic_flag = ref(false); const loading = ref(false); - const is_playing = ref(false); - const settings = reactive({ uri: "http://0.0.0.0:9876", }); -const tablist = { - home: "home", - search: "search", - queue: "queue", -}; - -const current_tab = ref(tablist.home); - export default { search_query, queue, @@ -67,12 +50,8 @@ export default { folder_list, current, prev, - filters, - magic_flag, loading, is_playing, album, settings, - current_tab, - tablist };