move master flag into component

This commit is contained in:
geoffrey45
2022-12-24 14:38:08 +03:00
committed by Mungai Njoroge
parent c7cc687286
commit 58d4317ab8
10 changed files with 4115 additions and 2397 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
<div class="creator t-center">
Designed and developed by
<span class="name"
><a href="https://github.com/geoffrey45">Geoffrey Mungai</a>
><a href="https://github.com/geoffrey45">Mungai Njoroge</a>
</span>
</div>
</div>
+4
View File
@@ -4,6 +4,7 @@
:class="{
hide_play: header_shown,
}"
v-if="album.info.albumhash"
>
<div class="first grid">
<PlayBtn :source="things.source" :store="things.store" />
@@ -30,6 +31,9 @@ defineProps<{
header_shown: boolean;
}>();
const album = useAlbumStore();
const playlist = usePStore();
const things = computed(() => {
const route = useRoute();
let thing = {
+15
View File
@@ -0,0 +1,15 @@
<template>
<span class="master-flag" title="Master audio file">M</span>
</template>
<style lang="scss">
.master-flag {
font-size: 10px;
margin-left: $smaller;
background-color: rgba(184, 108, 21, 0.281);
color: rgb(255, 153, 0);
padding: 2px 5px;
border-radius: 5px;
opacity: 0.75;
}
</style>
+3 -11
View File
@@ -32,7 +32,7 @@
<span class="title ellip" ref="artisttitle">
{{ track.title }}
</span>
<span v-if="track.bitrate > 1024" class="master-flag"><b>M</b> </span>
<MasterFlag v-if="track.bitrate > 1024" />
</div>
<div class="isSmallArtists" style="display: none">
<ArtistName
@@ -86,6 +86,8 @@ import useQueueStore from "@/stores/queue";
import { addFavorite, removeFavorite } from "@/composables/fetch/favorite";
import { favType } from "@/composables/enums";
import MasterFlag from "./MasterFlag.vue";
const imguri = paths.images.thumb.small;
const context_menu_showing = ref(false);
const queue = useQueueStore();
@@ -156,16 +158,6 @@ async function addToFav(trackhash: string) {
align-items: center;
}
.master-flag {
font-size: 10px;
margin-left: $smaller;
background-color: rgba(184, 108, 21, 0.281);
color: rgb(255, 153, 0);
padding: 2px 5px;
border-radius: 5px;
opacity: 0.75;
}
cursor: pointer;
.title {