mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
animate navigation list and logo
- move search main into right-sidebar > search -
This commit is contained in:
@@ -99,7 +99,7 @@ a {
|
|||||||
.l-sidebar {
|
.l-sidebar {
|
||||||
width: 17rem;
|
width: 17rem;
|
||||||
grid-area: l-sidebar;
|
grid-area: l-sidebar;
|
||||||
background-color: $black;
|
background-color: $gray;
|
||||||
margin: $small;
|
margin: $small;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function updateQueue(track: Track) {
|
|||||||
.table {
|
.table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: hidden;
|
||||||
|
|
||||||
.current {
|
.current {
|
||||||
a {
|
a {
|
||||||
@@ -141,6 +141,10 @@ function updateQueue(track: Track) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.songlist {
|
.songlist {
|
||||||
|
scrollbar-width: none;
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.context-on {
|
.context-on {
|
||||||
background-color: $gray4;
|
background-color: $gray4;
|
||||||
color: $white !important;
|
color: $white !important;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
type="range"
|
type="range"
|
||||||
:value="q.track.current_time"
|
:value="q.track.current_time"
|
||||||
min="0"
|
min="0"
|
||||||
:max="q.track.duration"
|
max="100"
|
||||||
step="0.1"
|
step="0.1"
|
||||||
@change="seek()"
|
@change="seek()"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -5,7 +5,12 @@
|
|||||||
:key="menu.name"
|
:key="menu.name"
|
||||||
:to="{ name: menu.route_name, params: menu.params }"
|
:to="{ name: menu.route_name, params: menu.params }"
|
||||||
>
|
>
|
||||||
<div class="nav-button" id="home-button">
|
<div
|
||||||
|
class="nav-button"
|
||||||
|
id="home-button"
|
||||||
|
v-motion-slide-from-left-100
|
||||||
|
|
||||||
|
>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<div class="nav-icon image" :id="`${menu.name}-icon`"></div>
|
<div class="nav-icon image" :id="`${menu.name}-icon`"></div>
|
||||||
<span>{{ menu.name }}</span>
|
<span>{{ menu.name }}</span>
|
||||||
@@ -46,11 +51,9 @@ const menus = [
|
|||||||
route_name: "SettingsView",
|
route_name: "SettingsView",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
.side-nav-container {
|
.side-nav-container {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="logo-container">
|
<div id="logo-container"
|
||||||
|
v-motion-slide-from-top
|
||||||
|
>
|
||||||
<router-link :to="{ name: 'Home' }">
|
<router-link :to="{ name: 'Home' }">
|
||||||
<div id="logo" class="rounded"></div
|
<div id="logo" class="rounded"></div
|
||||||
></router-link>
|
></router-link>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="p-header image"
|
class="p-header image"
|
||||||
|
|
||||||
:style="[
|
:style="[
|
||||||
{
|
{
|
||||||
backgroundImage: `url(${imguri + props.info.image})`,
|
backgroundImage: `url(${imguri + props.info.image})`,
|
||||||
@@ -12,7 +11,7 @@
|
|||||||
<div class="carddd">
|
<div class="carddd">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<PlayBtnRect :source="playSources.playlist" v-motion-slide-visible-once-bottom/>
|
<PlayBtnRect :source="playSources.playlist" />
|
||||||
<Option @showDropdown="showDropdown" :src="context.src" />
|
<Option @showDropdown="showDropdown" :src="context.src" />
|
||||||
</div>
|
</div>
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
@@ -26,10 +25,10 @@
|
|||||||
{{ props.info.description }}
|
{{ props.info.description }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title ellip">{{ props.info.name }}</div>
|
<div class="title ellip">{{ props.info.name }}</div>
|
||||||
<div class="type" >Playlist</div>
|
<div class="type">Playlist</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="last-updated">
|
<div class="last-updated" v-motion-slide-from-right>
|
||||||
<span class="status"
|
<span class="status"
|
||||||
>Last updated {{ props.info.lastUpdated }}  |  </span
|
>Last updated {{ props.info.lastUpdated }}  |  </span
|
||||||
>
|
>
|
||||||
@@ -47,8 +46,9 @@ import Option from "../shared/Option.vue";
|
|||||||
import pContext from "../../contexts/playlist";
|
import pContext from "../../contexts/playlist";
|
||||||
import useContextStore from "../../stores/context";
|
import useContextStore from "../../stores/context";
|
||||||
import { paths } from "../../config";
|
import { paths } from "../../config";
|
||||||
|
import { onBeforeUnmount } from "vue";
|
||||||
|
|
||||||
const imguri = paths.images.playlist
|
const imguri = paths.images.playlist;
|
||||||
const context = useContextStore();
|
const context = useContextStore();
|
||||||
const modal = useModalStore();
|
const modal = useModalStore();
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Search from "./Search.vue";
|
import Search from "./Search/Main.vue";
|
||||||
import UpNext from "./Queue.vue";
|
import UpNext from "./Queue.vue";
|
||||||
import Main from "./Home/Main.vue";
|
import Main from "./Home/Main.vue";
|
||||||
import useTabStore from "../../stores/tabs";
|
import useTabStore from "../../stores/tabs";
|
||||||
|
|||||||
+8
-4
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-search">
|
<div class="right-search">
|
||||||
<TabsWrapper>
|
<TabsWrapper>
|
||||||
<Tab name="tracks" v-motion-slide-visible-left>
|
<Tab name="tracks">
|
||||||
<TracksGrid />
|
<TracksGrid />
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab name="albums">
|
<Tab name="albums">
|
||||||
@@ -11,16 +11,20 @@
|
|||||||
<ArtistGrid />
|
<ArtistGrid />
|
||||||
</Tab>
|
</Tab>
|
||||||
</TabsWrapper>
|
</TabsWrapper>
|
||||||
|
<component :is="s.currentTab" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TabsWrapper from "./TabsWrapper.vue";
|
import TabsWrapper from "./TabsWrapper.vue";
|
||||||
import Tab from "./Tab.vue";
|
import Tab from "./Tab.vue";
|
||||||
import TracksGrid from "./Search/TracksGrid.vue";
|
import TracksGrid from "./TracksGrid.vue";
|
||||||
import AlbumGrid from "./Search/AlbumGrid.vue";
|
import AlbumGrid from "./AlbumGrid.vue";
|
||||||
|
import ArtistGrid from "./ArtistGrid.vue";
|
||||||
import "@/assets/css/Search/Search.scss";
|
import "@/assets/css/Search/Search.scss";
|
||||||
import ArtistGrid from "./Search/ArtistGrid.vue";
|
import useSearchStore from "@/stores/search";
|
||||||
|
const s = useSearchStore();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="name == s.currentTab">
|
<div v-show="name == s.currentTab" v-motion-slide-visible-top>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useSearchStore from "../../stores/search";
|
import useSearchStore from "@/stores/search";
|
||||||
const s = useSearchStore();
|
const s = useSearchStore();
|
||||||
defineProps<{
|
defineProps<{
|
||||||
name: string;
|
name: string;
|
||||||
+8
-1
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useSearchStore from "../../stores/search";
|
import useSearchStore from "@/stores/search";
|
||||||
|
|
||||||
const s = useSearchStore();
|
const s = useSearchStore();
|
||||||
</script>
|
</script>
|
||||||
@@ -40,16 +40,23 @@ const s = useSearchStore();
|
|||||||
padding: $small;
|
padding: $small;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
width: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activetab {
|
.activetab {
|
||||||
background-color: $accent;
|
background-color: $accent;
|
||||||
|
width: 6rem;
|
||||||
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab-content {
|
#tab-content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
background-color: $gray;
|
background-color: $gray;
|
||||||
// overflow: hidden;
|
// overflow: hidden;
|
||||||
@@ -6,12 +6,45 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="title" v-if="$route.name == 'Playlists'">Playlists</div>
|
<div
|
||||||
<div class="folder" v-else-if="$route.name == 'FolderView'" >
|
class="title"
|
||||||
|
v-show="$route.name == 'Playlists'"
|
||||||
|
v-motion
|
||||||
|
:initial="{
|
||||||
|
opacity: 0,
|
||||||
|
x: -20,
|
||||||
|
}"
|
||||||
|
:visible="{
|
||||||
|
opacity: 1,
|
||||||
|
x: 0,
|
||||||
|
transition: {
|
||||||
|
delay: 100,
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
Playlists
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="folder"
|
||||||
|
v-show="$route.name == 'FolderView'"
|
||||||
|
v-motion
|
||||||
|
:initial="{
|
||||||
|
opacity: 0,
|
||||||
|
x: -20,
|
||||||
|
}"
|
||||||
|
:visible="{
|
||||||
|
opacity: 1,
|
||||||
|
x: 0,
|
||||||
|
transition: {
|
||||||
|
delay: 100,
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
>
|
||||||
<div class="fname">
|
<div class="fname">
|
||||||
<div class="icon image"></div>
|
<div class="icon image"></div>
|
||||||
<div class="ellip">
|
<div class="ellip">
|
||||||
{{ $route.params.path.split("/").splice(-1)[0] }}
|
<!-- {{ $route.params.path.split("/").splice(-1)[0] }} -->
|
||||||
|
{{ $route.params.path }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import NavButtons from "./NavButtons.vue";
|
import NavButtons from "./NavButtons.vue";
|
||||||
import Loader from "../shared/Loader.vue";
|
import Loader from "../shared/Loader.vue";
|
||||||
import Search from "./Search.vue";
|
import Search from "./Search.vue";
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
:class="[{ current: props.isCurrent }, { 'context-on': context_on }]"
|
:class="[{ current: props.isCurrent }, { 'context-on': context_on }]"
|
||||||
@dblclick="emitUpdate(props.song)"
|
@dblclick="emitUpdate(props.song)"
|
||||||
@contextmenu="showContextMenu"
|
@contextmenu="showContextMenu"
|
||||||
v-motion-slide-visible-once-right
|
|
||||||
>
|
>
|
||||||
<div class="index">{{ props.index }}</div>
|
<div class="index">{{ props.index }}</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ function getElem(id: string, type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatSeconds(seconds: number) {
|
function formatSeconds(seconds: number, long?: boolean) {
|
||||||
// check if there are arguments
|
// check if there are arguments
|
||||||
|
|
||||||
const date = new Date(seconds * 1000);
|
const date = new Date(seconds * 1000);
|
||||||
@@ -48,7 +48,7 @@ function formatSeconds(seconds: number) {
|
|||||||
let _mm = mm < 10 ? `0${mm}` : mm;
|
let _mm = mm < 10 ? `0${mm}` : mm;
|
||||||
let _ss = ss < 10 ? `0${ss}` : ss;
|
let _ss = ss < 10 ? `0${ss}` : ss;
|
||||||
|
|
||||||
if (arguments[1]) {
|
if (long == true) {
|
||||||
if (hh === 1) {
|
if (hh === 1) {
|
||||||
_hh = hh + " Hour";
|
_hh = hh + " Hour";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+3
-5
@@ -53,7 +53,6 @@ export default defineStore("Queue", {
|
|||||||
duration: 0,
|
duration: 0,
|
||||||
},
|
},
|
||||||
current: <Track>{},
|
current: <Track>{},
|
||||||
length: 0,
|
|
||||||
next: <Track>{},
|
next: <Track>{},
|
||||||
prev: <Track>{},
|
prev: <Track>{},
|
||||||
playing: false,
|
playing: false,
|
||||||
@@ -72,17 +71,16 @@ export default defineStore("Queue", {
|
|||||||
this.audio.onerror = reject;
|
this.audio.onerror = reject;
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.length = this.audio.duration;
|
this.track.duration = this.audio.duration;
|
||||||
|
|
||||||
this.audio.play().then(() => {
|
this.audio.play().then(() => {
|
||||||
this.playing = true;
|
this.playing = true;
|
||||||
notif(track, this.playPause, this.playNext, this.playPrev);
|
notif(track, this.playPause, this.playNext, this.playPrev);
|
||||||
|
|
||||||
this.audio.ontimeupdate = () => {
|
this.audio.ontimeupdate = () => {
|
||||||
this.track.current_time = this.audio.currentTime;
|
this.track.current_time =
|
||||||
const current_time =
|
|
||||||
(this.audio.currentTime / this.audio.duration) * 100;
|
(this.audio.currentTime / this.audio.duration) * 100;
|
||||||
elem.style.backgroundSize = `${this.current_time}% 100%`;
|
elem.style.backgroundSize = `${this.track.current_time}% 100%`;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.audio.onended = () => {
|
this.audio.onended = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user