Skip to content

Commit

Permalink
add clear queue tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
tamland committed Oct 25, 2024
1 parent d3d1984 commit 696c9b7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/player/Queue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
Playing
</h1>
<div>
<b-button variant="link" class="mr-2" @click="shuffle">
<b-button variant="link" class="mr-2" :disabled="!tracks?.length" @click="shuffle">
<Icon icon="shuffle" /> Shuffle
</b-button>
<b-button variant="link" @click="clear">
<b-button class="clear-btn" variant="link" :disabled="!tracks?.length" @click="clear">
<Icon icon="x" /> Clear
<div v-if="tracks?.length === 1 " class="tooltip bs-tooltip-bottom">
<div class="tooltip-inner">
Click again to clear current track
</div>
</div>
</b-button>
</div>
</div>
Expand Down Expand Up @@ -107,3 +112,18 @@
}
})
</script>
<style scoped>
.clear-btn {
position: relative;
}
.tooltip-inner {
width: 300px;
}
.clear-btn:hover .tooltip {
display: block;
opacity: 1;
right: 0;
}
</style>
4 changes: 4 additions & 0 deletions src/style/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ $dropdown-divider-bg: $theme-elevation-2;
$popover-bg: $theme-elevation-1;
$popover-border-color: $theme-elevation-2;

// Tooltip
$tooltip-bg: $theme-elevation-1;
$tooltip-color: $theme-text;

// Form
$input-bg: $theme-elevation-2;
$input-border-color: $theme-elevation-2;
Expand Down

0 comments on commit 696c9b7

Please sign in to comment.