Skip to content

Commit

Permalink
renderer: PlayerBar: hide favorite button for DjRadioProgram
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Jan 27, 2022
1 parent 96cf7ab commit 93b20fe
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/renderer/components/PlayerBar/PlayerBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
<span class="artist">{{playing.artistName}}</span>
</div>
<div class="shortcut">
<div title="喜欢">
<div v-if="isDjRadioProgram">
<!-- hide like button for now -->
<div class="icon-placeholder"></div>
</div>
<div v-else title="喜欢">
<mu-checkbox uncheck-icon="favorite_border"
checked-icon="favorite"
color="red"
Expand Down Expand Up @@ -331,6 +335,10 @@ export default {
songProgress() {
return 100 * this.timeCurrent / this.timeTotal || 0;
},
isDjRadioProgram() {
const { source = {} } = this.playing;
return (source && source.djradio);
},
isFavorite() {
if (!this.user.loginValid || !this.playing) {
return false;
Expand Down Expand Up @@ -561,6 +569,10 @@ export default {
display: flex;
justify-content: space-between;
font-size: 0;
.icon-placeholder {
width: 24px;
height: 24px;
}
}
}
.progress {
Expand Down

0 comments on commit 93b20fe

Please sign in to comment.