Skip to content

Commit

Permalink
feat(preset): Highlight the currently playing preset card
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Sep 6, 2024
1 parent 735326d commit ae81028
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion frontend/src/components/Presets/PresetCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<template>
<v-btn
variant="flat"
:color="preset.new ? 'newPresetCardBackground' : 'cardBackground'"
:color="
preset.new
? 'newPresetCardBackground'
: player.currentName === preset.name
? 'accent'
: 'cardBackground'
"
size="x-large"
class="w-100 d-flex justify-space-between text-none font-weight-regular"
:aria-label="`Play ${preset.name}`"
Expand All @@ -25,6 +31,7 @@ import ShareButton from "./Buttons/ShareButton.vue";
import DeleteButton from "./Buttons/DeleteButton.vue";
import DebugButton from "./Buttons/DebugButton.vue";
import { usePresetsStore } from "../../plugins/store/presets";
import { usePlayerStore } from "../../plugins/store/player";
import { Preset } from "../../util/Preset";
import { useToast } from "vue-toastification";
Expand All @@ -38,6 +45,7 @@ const props = defineProps({
const debugEnabled = import.meta.env.DEV;
const toast = useToast();
const presets = usePresetsStore();
const player = usePlayerStore();
const loading = ref(false);
const play = async () => {
Expand Down

0 comments on commit ae81028

Please sign in to comment.