Skip to content

Commit

Permalink
refactor: use popover instead of tooltip for song messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AsyncFox committed Jan 8, 2024
1 parent 4ed36c0 commit 8d4f7a3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions components/MusicCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ function isMine() {
<UiBadge v-if="showGrade && 'submitterGrade' in song" variant="secondary" class="rounded-md ml-2 self-center h-6 min-w-[2.8rem]">
{{ gradeMap[song?.submitterGrade] }}
</UiBadge>
<UiTooltipProvider v-if="(typeof song.message) === 'string' && 'type' in song && song.type === 'withMsg'">
<UiTooltip>
<UiTooltipTrigger as-child>
<UiBadge class="ml-1 rounded-md">
留言
</UiBadge>
</UiTooltipTrigger>
<UiTooltipContent>
<p>{{ song?.message }}</p>
</UiTooltipContent>
</UiTooltip>
</UiTooltipProvider>
<UiPopover v-if="(typeof song.message) === 'string' && 'type' in song && song.type === 'withMsg'">
<UiPopoverTrigger as-child>
<UiBadge class="ml-1 rounded-md">
留言
</UiBadge>
</UiPopoverTrigger>
<UiPopoverContent class="flex">
<p class="text-md break-all">
{{ song?.message }}
</p>
</UiPopoverContent>
</UiPopover>
</UiCardTitle>
<UiCardDescription v-if="song?.creator">
<span class="break-all">
Expand Down

0 comments on commit 8d4f7a3

Please sign in to comment.