mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 11:45:35 +00:00
minor refactoring
This commit is contained in:
parent
4b02855dca
commit
25e6c5ce0c
@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<RightSideBar />
|
<RightSideBar />
|
||||||
<div class="bottom-bar">
|
<div class="bottom-bar">
|
||||||
<BottomBar />
|
<BottomBar :collapsed="collapsed"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="b-bar border card-dark">
|
<div class="b-bar border card-dark">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<SongCard/>
|
<SongCard :collapsed="props.collapsed" />
|
||||||
<div class="controlsx border rounded">
|
<div class="controlsx border rounded">
|
||||||
<div class="controls controls-bottom">
|
<div class="controls controls-bottom">
|
||||||
<HotKeys />
|
<HotKeys />
|
||||||
</div>
|
</div>
|
||||||
<div class="progress progress-bottom">
|
<div class="progress progress-bottom">
|
||||||
<span class="durationx">{{formatSeconds(current_pos)}}</span>
|
<span class="durationx">{{ formatSeconds(current_pos) }}</span>
|
||||||
<Progress />
|
<Progress />
|
||||||
<span class="durationx">{{ formatSeconds(state.current.value.length) }}</span>
|
<span class="durationx">{{
|
||||||
|
formatSeconds(state.current.value.length)
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="r-group">
|
<div class="r-group">
|
||||||
<div class="heart image"></div>
|
<div class="heart image"></div>
|
||||||
@ -24,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from "vue";
|
||||||
import "../../assets/css/BottomBar/BottomBar.scss";
|
import "../../assets/css/BottomBar/BottomBar.scss";
|
||||||
import SongCard from "./SongCard.vue";
|
import SongCard from "./SongCard.vue";
|
||||||
import Progress from "../shared/Progress.vue";
|
import Progress from "../shared/Progress.vue";
|
||||||
@ -33,6 +35,13 @@ import state from "../../composables/state";
|
|||||||
import perks from "../../composables/perks";
|
import perks from "../../composables/perks";
|
||||||
import playAudio from "../../composables/playAudio";
|
import playAudio from "../../composables/playAudio";
|
||||||
|
|
||||||
const current_pos = ref(playAudio.current_time);
|
const current_pos = playAudio.current_time
|
||||||
const formatSeconds = perks.formatSeconds;
|
const formatSeconds = perks.formatSeconds;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
collapsed: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div
|
<div
|
||||||
|
v-if="props.collapsed"
|
||||||
class="image art"
|
class="image art"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundImage: `url("${track.image}")`,
|
backgroundImage: `url("${track.image}")`,
|
||||||
@ -24,11 +25,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
|
||||||
import perks from "../../composables/perks";
|
import perks from "../../composables/perks";
|
||||||
import state from "../../composables/state";
|
import state from "../../composables/state";
|
||||||
|
|
||||||
const track = ref(state.current);
|
const track = state.current;
|
||||||
|
const props = defineProps({
|
||||||
|
collapsed: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
const putCommas = perks.putCommas;
|
const putCommas = perks.putCommas;
|
||||||
</script>
|
</script>
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "@vue/reactivity";
|
|
||||||
import { onMounted } from "@vue/runtime-core";
|
import { onMounted } from "@vue/runtime-core";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
@ -46,13 +45,13 @@ import state from "@/composables/state.js";
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
songs: {
|
songs: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
let route;
|
let route;
|
||||||
|
|
||||||
const search_query = ref(state.search_query);
|
const search_query = state.search_query;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
route = useRoute().name;
|
route = useRoute().name;
|
||||||
@ -86,13 +85,6 @@ function loadAlbum(title, albumartist) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
||||||
// .icon {
|
|
||||||
// height: 10rem;
|
|
||||||
// width: 15rem;
|
|
||||||
// border: solid;
|
|
||||||
// background-image: url("../../assets/images/sokka.webp");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
@ -159,4 +151,4 @@ table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="side-nav-container" :class="{ collapsed: collapsed }">
|
<div class="side-nav-container" :class="{ collapsed: props.collapsed }">
|
||||||
<router-link v-for="menu in menus" :key="menu.name" :to="{ name: menu.route_name, params: {path: 'home'} }" >
|
<router-link
|
||||||
|
v-for="menu in menus"
|
||||||
|
:key="menu.name"
|
||||||
|
:to="{ name: menu.route_name, params: { path: 'home' } }"
|
||||||
|
>
|
||||||
<div class="nav-button" id="home-button">
|
<div class="nav-button" id="home-button">
|
||||||
<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>
|
||||||
@ -42,7 +46,12 @@ const menus = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const collapsed = ref(false);
|
const props = defineProps({
|
||||||
|
collapsed: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -32,7 +32,6 @@ export default {
|
|||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
width: 9rem;
|
width: 9rem;
|
||||||
// border: solid 1px red !important;
|
|
||||||
|
|
||||||
.album-art {
|
.album-art {
|
||||||
height: 7rem;
|
height: 7rem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user