diff --git a/src/components/Notification.vue b/src/components/Notification.vue
index 1ca181e7..86a5494f 100644
--- a/src/components/Notification.vue
+++ b/src/components/Notification.vue
@@ -18,6 +18,7 @@ import ErrorSvg from "../assets/icons/toast/error.svg";
import InfoSvg from "../assets/icons/toast/info.svg";
import SuccessSvg from "../assets/icons/toast/ok.svg";
import WorkingSvg from "../assets/icons/toast/working.svg";
+import HeartSvg from "../assets/icons/heart.svg";
const notifStore = useNotifStore();
@@ -31,6 +32,8 @@ function getSvg(notif: NotifType) {
return SuccessSvg;
case NotifType.Working:
return WorkingSvg;
+ case NotifType.Favorite:
+ return HeartSvg;
}
}
@@ -70,7 +73,7 @@ function getSvg(notif: NotifType) {
background-image: linear-gradient(275deg, $bg, $bg1 74%);
}
-.new-notif.info {
+.new-notif.info, .new-notif.favorite {
$bg: rgb(28, 102, 238);
$bg1: rgba(31, 144, 236, 0.15);
background-image: linear-gradient(275deg, $bg, $bg1 74%);
@@ -78,7 +81,7 @@ function getSvg(notif: NotifType) {
.new-notif.success {
$bg: rgb(5, 167, 53);
- $bg1: rgba(5, 167, 54, .15);
+ $bg1: rgba(5, 167, 54, 0.15);
background-image: linear-gradient(275deg, $bg, $bg1 74%);
}
diff --git a/src/components/nav/Titles/ArtistDiscographyTitle.vue b/src/components/nav/Titles/ArtistDiscographyTitle.vue
index 78b03437..967a612c 100644
--- a/src/components/nav/Titles/ArtistDiscographyTitle.vue
+++ b/src/components/nav/Titles/ArtistDiscographyTitle.vue
@@ -1,6 +1,6 @@
-
Creedence Clearwater Revival
+
{{ store.artistname }}
-
@@ -69,7 +68,6 @@ onClickOutside(dropOptionsRef, (e) => {
.buttons {
display: flex;
- gap: $small;
}
.selected {
@@ -86,7 +84,7 @@ onClickOutside(dropOptionsRef, (e) => {
.select {
position: relative;
- width: 7rem;
+ width: 8rem;
display: flex;
align-items: center;
font-size: calc($medium + 2px);
@@ -103,7 +101,7 @@ onClickOutside(dropOptionsRef, (e) => {
.option {
padding: $small;
border-bottom: 1px solid $gray4;
- width: 6.5rem;
+ width: 7.5rem;
&:hover {
border-radius: $smaller;
diff --git a/src/components/shared/SongItem.vue b/src/components/shared/SongItem.vue
index 5ca42be9..6902705e 100644
--- a/src/components/shared/SongItem.vue
+++ b/src/components/shared/SongItem.vue
@@ -5,11 +5,18 @@
@dblclick.prevent="emitUpdate"
@contextmenu.prevent="showMenu"
>
-
{}">
-
+ {}"
+ >
+
{{ index }}
-
-
+
+
+
+
+
@@ -71,10 +78,13 @@ import { Track } from "@/interfaces";
import { formatSeconds } from "@/utils";
import HeartSvg from "@/assets/icons/heart.svg";
+import HeartFillSvg from "@/assets/icons/heart.fill.svg";
import OptionSvg from "@/assets/icons/more.svg";
import ArtistName from "./ArtistName.vue";
import useQueueStore from "@/stores/queue";
+import { addFavorite, removeFavorite } from "@/composables/fetch/favorite";
+import { favType } from "@/composables/enums";
const imguri = paths.images.thumb.small;
const context_menu_showing = ref(false);
@@ -107,6 +117,26 @@ function isCurrent() {
function isCurrentPlaying() {
return isCurrent() && queue.playing;
}
+
+const fav = ref(props.track.is_favorite);
+
+async function addToFav(trackhash: string) {
+ if (fav.value) {
+ const removed = await removeFavorite(favType.track, trackhash);
+
+ if (removed) {
+ fav.value = false;
+ }
+
+ return;
+ }
+
+ const added = await addFavorite(favType.track, trackhash);
+
+ if (added) {
+ fav.value = true;
+ }
+}