Skip to content

Commit

Permalink
Hide lyrics view on instrumental track
Browse files Browse the repository at this point in the history
  • Loading branch information
tranxuanthang committed May 24, 2024
1 parent 0ec1296 commit 134fa8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lrcget"
version = "0.3.0"
version = "0.3.1"
description = "A Tauri App"
authors = ["you"]
license = ""
Expand Down
12 changes: 10 additions & 2 deletions src/components/NowPlaying.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<LyricsViewer v-if="lyrics" :lyrics="lyrics" :duration="duration" :progress="progress" />
<PlainLyricsViewer v-else-if="plainLyrics" :lyrics="plainLyrics" />
<LyricsViewer v-if="lyrics && !instrumental" :lyrics="lyrics" :duration="duration" :progress="progress" />
<PlainLyricsViewer v-else-if="plainLyrics && !instrumental" :lyrics="plainLyrics" />
<div class="bg-brave-95 backdrop-blur px-4 py-3 flex-none flex flex-col justify-center items-center gap-3">
<div class="w-full flex gap-1 justify-center items-center">
<div class="flex-none w-12 text-xs text-brave-30">{{ humanDuration(progress) }}</div>
Expand Down Expand Up @@ -43,6 +43,14 @@ const { isHotkey } = useGlobalState()
const { playingTrack, status, duration, progress, playTrack, pause, resume, seek } = usePlayer()
const keydownEvent = ref(null)
const instrumental = computed(() => {
if (!playingTrack.value) {
return null
}
return playingTrack.value.instrumental
})
const lyrics = computed(() => {
if (!playingTrack.value) {
return null
Expand Down

0 comments on commit 134fa8d

Please sign in to comment.