mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
remove folder banner
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
// colors
|
// colors
|
||||||
|
|
||||||
$body: #202124;
|
|
||||||
$separator: #ffffff2f;
|
$separator: #ffffff2f;
|
||||||
$highlight-blue: #006eff;
|
$highlight-blue: #006eff;
|
||||||
$darkestblue: #234ece;
|
$darkestblue: #234ece;
|
||||||
@@ -26,6 +25,7 @@ $gray2: rgb(99, 99, 102);
|
|||||||
$gray3: rgb(72, 72, 74);
|
$gray3: rgb(72, 72, 74);
|
||||||
$gray4: rgb(58, 58, 60);
|
$gray4: rgb(58, 58, 60);
|
||||||
$gray5: rgb(44, 44, 46);
|
$gray5: rgb(44, 44, 46);
|
||||||
|
$body: $gray;
|
||||||
|
|
||||||
$red: #ff453a;
|
$red: #ff453a;
|
||||||
$blue: #0a84ff;
|
$blue: #0a84ff;
|
||||||
@@ -44,7 +44,7 @@ $accent: $gray1;
|
|||||||
$secondary: $gray5;
|
$secondary: $gray5;
|
||||||
$danger: $red;
|
$danger: $red;
|
||||||
$track-hover: $gray4;
|
$track-hover: $gray4;
|
||||||
$context: $gray;
|
$context: black;
|
||||||
$playlist-card-bg: #46474C;
|
$playlist-card-bg: #46474C;
|
||||||
|
|
||||||
// SVG COLORS
|
// SVG COLORS
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ defineProps<{
|
|||||||
.info {
|
.info {
|
||||||
.f-item-count {
|
.f-item-count {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: rgba(219, 217, 217, 0.63);
|
color: rgb(219, 217, 217);
|
||||||
}
|
}
|
||||||
|
|
||||||
.f-item-text {
|
.f-item-text {
|
||||||
|
|||||||
@@ -15,12 +15,15 @@
|
|||||||
<button
|
<button
|
||||||
@click="tabs.switchToQueue"
|
@click="tabs.switchToQueue"
|
||||||
v-if="tabs.current !== tabs.tabs.queue"
|
v-if="tabs.current !== tabs.tabs.queue"
|
||||||
|
name="switch to queue tab"
|
||||||
>
|
>
|
||||||
<QueueSvg />
|
<QueueSvg />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@click="tabs.switchToSearch"
|
@click="tabs.switchToSearch"
|
||||||
v-if="tabs.current !== tabs.tabs.search"
|
v-if="tabs.current !== tabs.tabs.search"
|
||||||
|
name="switch to search tab"
|
||||||
|
|
||||||
>
|
>
|
||||||
<SearchSvg />
|
<SearchSvg />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
+6
-3
@@ -1,9 +1,12 @@
|
|||||||
|
const baseImgUrl = "http://0.0.0.0:1971"
|
||||||
|
|
||||||
const paths = {
|
const paths = {
|
||||||
api: "",
|
api: "",
|
||||||
images: {
|
images: {
|
||||||
thumb: "http://0.0.0.0:1971/t/",
|
thumb: `${baseImgUrl}/t/`,
|
||||||
artist: "http://0.0.0.0:1971/a/",
|
artist: `${baseImgUrl}/a/`,
|
||||||
playlist: "http://0.0.0.0:1971/p/"
|
playlist: `${baseImgUrl}/p/`,
|
||||||
|
raw: `${baseImgUrl}/raw/`
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export default defineStore("FolderDirs&Tracks", {
|
|||||||
const { tracks, folders } = await fetchThem(path);
|
const { tracks, folders } = await fetchThem(path);
|
||||||
|
|
||||||
[this.path, this.allDirs, this.allTracks] = [path, folders, tracks];
|
[this.path, this.allDirs, this.allTracks] = [path, folders, tracks];
|
||||||
|
|
||||||
},
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = "";
|
this.query = "";
|
||||||
|
|||||||
+10
-3
@@ -76,20 +76,27 @@ export default defineStore("Queue", {
|
|||||||
|
|
||||||
if (this.currentindex !== this.tracklist.length - 1) {
|
if (this.currentindex !== this.tracklist.length - 1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (!this.playing) return;
|
||||||
this.playNext();
|
this.playNext();
|
||||||
}, 1000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
playPause() {
|
playPause() {
|
||||||
if (audio.src === "") {
|
if (audio.src === "") {
|
||||||
this.play(this.currentindex);
|
this.play(this.currentindex);
|
||||||
} else if (audio.paused) {
|
}
|
||||||
|
|
||||||
|
if (audio.paused) {
|
||||||
audio.play();
|
audio.play();
|
||||||
this.playing = true;
|
|
||||||
} else {
|
} else {
|
||||||
audio.pause();
|
audio.pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.playing) {
|
||||||
this.playing = false;
|
this.playing = false;
|
||||||
|
} else {
|
||||||
|
this.playing = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
playNext() {
|
playNext() {
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
export function handlePlayPause(
|
|
||||||
currentIndex: number,
|
|
||||||
audio: HTMLAudioElement,
|
|
||||||
state: boolean,
|
|
||||||
play: (index: number) => void
|
|
||||||
) {
|
|
||||||
if (audio.src === "") {
|
|
||||||
play(currentIndex);
|
|
||||||
} else if (audio.paused) {
|
|
||||||
audio.play();
|
|
||||||
state = true;
|
|
||||||
} else {
|
|
||||||
audio.pause();
|
|
||||||
state = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="f-view-parent">
|
<div id="f-view-parent">
|
||||||
<div id="scrollable" ref="scrollable">
|
<div id="scrollable" ref="scrollable">
|
||||||
<div class="banner shadow-lg rounded">
|
|
||||||
<div class="text abs rounded pad-medium">
|
|
||||||
<h3><FolderSvg /> {{ getFolderName($route) }}</h3>
|
|
||||||
</div>
|
|
||||||
<img
|
|
||||||
src="@/assets/images/folderbg.webp"
|
|
||||||
alt=""
|
|
||||||
class="rounded"
|
|
||||||
loading="lazy"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<FolderList :folders="folder.dirs" v-if="folder.dirs.length" />
|
<FolderList :folders="folder.dirs" v-if="folder.dirs.length" />
|
||||||
<SongList
|
<SongList
|
||||||
:tracks="folder.tracks"
|
:tracks="folder.tracks"
|
||||||
@@ -27,17 +16,14 @@ import { ref } from "@vue/reactivity";
|
|||||||
import {
|
import {
|
||||||
onBeforeRouteLeave,
|
onBeforeRouteLeave,
|
||||||
onBeforeRouteUpdate,
|
onBeforeRouteUpdate,
|
||||||
RouteLocationNormalized,
|
|
||||||
} from "vue-router";
|
} from "vue-router";
|
||||||
|
|
||||||
import SongList from "@/components/FolderView/SongList.vue";
|
import SongList from "@/components/FolderView/SongList.vue";
|
||||||
import FolderList from "@/components/FolderView/FolderList.vue";
|
import FolderList from "@/components/FolderView/FolderList.vue";
|
||||||
import FolderSvg from "@/assets/icons/folder.svg";
|
|
||||||
|
|
||||||
import useFolderStore from "@/stores/pages/folder";
|
import useFolderStore from "@/stores/pages/folder";
|
||||||
import useQueueStore from "@/stores/queue";
|
import useQueueStore from "@/stores/queue";
|
||||||
import useLoaderStore from "@/stores/loader";
|
import useLoaderStore from "@/stores/loader";
|
||||||
import { isSameRoute } from "@/composables/perks";
|
|
||||||
|
|
||||||
const loader = useLoaderStore();
|
const loader = useLoaderStore();
|
||||||
const folder = useFolderStore();
|
const folder = useFolderStore();
|
||||||
@@ -45,11 +31,6 @@ const queue = useQueueStore();
|
|||||||
|
|
||||||
const scrollable = ref<any>(null);
|
const scrollable = ref<any>(null);
|
||||||
|
|
||||||
function getFolderName(route: RouteLocationNormalized) {
|
|
||||||
const path = route.params.path as string;
|
|
||||||
return path.split("/").pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function playFromPage(index: number) {
|
function playFromPage(index: number) {
|
||||||
queue.playFromFolder(folder.path, folder.allTracks);
|
queue.playFromFolder(folder.path, folder.allTracks);
|
||||||
queue.play(index);
|
queue.play(index);
|
||||||
@@ -78,64 +59,10 @@ onBeforeRouteLeave(() => {
|
|||||||
#f-view-parent {
|
#f-view-parent {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.h {
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#scrollable {
|
#scrollable {
|
||||||
scrollbar-color: grey transparent;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 1rem;
|
|
||||||
|
|
||||||
.banner {
|
|
||||||
position: relative;
|
|
||||||
height: max-content;
|
|
||||||
height: $banner-height;
|
|
||||||
pointer-events: none;
|
|
||||||
user-select: none;
|
|
||||||
width: 100%;
|
|
||||||
background-color: $accent;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
bottom: 1rem;
|
|
||||||
left: 1rem;
|
|
||||||
width: max-content;
|
|
||||||
max-width: calc(100% - 2rem);
|
|
||||||
background-color: $black;
|
|
||||||
|
|
||||||
@include for-desktop-down {
|
|
||||||
right: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
margin: $small;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: max-content 1fr;
|
gap: 1rem;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: $small;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: bottom right;
|
|
||||||
transition: all 0.25s ease;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include phone-only {
|
|
||||||
padding-right: 0;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user