mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix fuzzy search: FuseTrackOptions
+ reduce width required to hide sidebar automatically + move ArtistAlbumsFetcher.vue to components folder + escape ALT button in keyboard shortcuts + use elem.dispatchEvent to toggle page search
This commit is contained in:
committed by
Mungai Njoroge
parent
580dce1da9
commit
26ab972a8d
@@ -22,11 +22,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from "@vue/reactivity";
|
||||
import {
|
||||
onBeforeRouteLeave,
|
||||
onBeforeRouteUpdate,
|
||||
RouteLocationNormalized,
|
||||
} from "vue-router";
|
||||
import { onBeforeRouteLeave, onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
import { Track } from "@/interfaces";
|
||||
import { createTrackProps } from "@/utils";
|
||||
@@ -74,7 +70,7 @@ class songItem {
|
||||
const genreBanner: ScrollerItem = {
|
||||
id: "genre-banner",
|
||||
component: GenreBanner,
|
||||
size: 64,
|
||||
size: 80,
|
||||
};
|
||||
|
||||
function getSongItems() {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<template><div style="height: 1px;"></div></template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from "vue";
|
||||
import useArtistPageStore from "@/stores/pages/artist";
|
||||
import { onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
const store = useArtistPageStore();
|
||||
|
||||
onMounted(async () => {
|
||||
await store.getArtistAlbums();
|
||||
});
|
||||
|
||||
onBeforeRouteUpdate(async (to) => {
|
||||
store.resetAlbums();
|
||||
await store.getArtistAlbums();
|
||||
});
|
||||
</script>
|
||||
@@ -36,9 +36,9 @@ import Header from "@/components/ArtistView/Header.vue";
|
||||
import TopTracks from "@/components/ArtistView/TopTracks.vue";
|
||||
import useArtistPageStore from "@/stores/pages/artist";
|
||||
import ArtistAlbums from "@/components/AlbumView/ArtistAlbums.vue";
|
||||
import ArtistAlbumsFetcher from "./ArtistAlbumsFetcher.vue";
|
||||
import ArtistAlbumsFetcher from "@/components/ArtistView/ArtistAlbumsFetcher.vue";
|
||||
import { computed } from "vue";
|
||||
import { onBeforeRouteUpdate } from "vue-router";
|
||||
import { onBeforeRouteLeave, onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
const store = useArtistPageStore();
|
||||
|
||||
@@ -86,9 +86,14 @@ const scrollerItems = computed(() => {
|
||||
});
|
||||
|
||||
onBeforeRouteUpdate(async (to) => {
|
||||
|
||||
await store.getData(to.params.hash as string);
|
||||
});
|
||||
|
||||
onBeforeRouteLeave(async () => {
|
||||
setTimeout(() => {
|
||||
store.resetAlbums();
|
||||
}, 400);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user