Skip to content

Commit

Permalink
lint: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Villarreal committed Dec 22, 2018
1 parent 12e9f3d commit 832ebdd
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions client/src/components/NowPlayingBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
</v-list>
<v-list dense class="pa-0 progress-bar">
<v-list-tile>
<v-slider hide-details color="#b3b3b3" step="0" track-color="dark-grey" v-model="trackPosition">
<v-slider hide-details color="#b3b3b3" step="0" track-color="dark-grey"
v-model="trackPosition">
<div class="caption grey--text text--lighten-1 progress-time" slot="prepend">
{{ trackElapsedTime }}
</div>
Expand Down Expand Up @@ -167,15 +168,15 @@ export default {
this.$store.commit('UPDATE_ZONE_GROUP', { groupId: this.activeZoneGroupId, update: { volume } });
groupsAPI.volume(this.activeZoneGroupId, volume);
}
},
},
},
trackElapsedTime() {
if (this.activeZoneGroup) {
return secondsToTimeString(this.activeZoneGroup.track.position);
}
return '';
},
trackDuration() {
trackDuration() {
if (this.activeZoneGroup) {
return secondsToTimeString(this.activeZoneGroup.track.duration);
}
Expand All @@ -184,17 +185,19 @@ export default {
trackPosition: {
get() {
if (this.activeZoneGroup) {
// eslint-disable-next-line max-len
return ((this.activeZoneGroup.track.position / this.activeZoneGroup.track.duration) * 100) || 0;
}
return 0;
},
set(position) {
if (this.activeZoneGroup) {
const positionPercentage = position * 0.01
const positionPercentage = position * 0.01;
const newPosition = Math.round(this.activeZoneGroup.track.duration * positionPercentage);
const track = {...this.activeZoneGroup.track, position: newPosition }
const track = { ...this.activeZoneGroup.track, position: newPosition };
this.$store.commit('UPDATE_ZONE_GROUP', { groupId: this.activeZoneGroupId, update: { track } });
}
}
},
},
mute() {
if (this.activeZoneGroup) {
Expand Down

0 comments on commit 832ebdd

Please sign in to comment.