Skip to content

Commit

Permalink
Performance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascensionist committed Aug 15, 2024
1 parent 2476176 commit 57e2925
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/client/src/components/TrackTile.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<template>
<v-list-item two-line @click='$emit("click")' :ripple='ripple' @contextmenu.prevent="menu = true">
<v-list-item-avatar>
<v-list-item-avatar v-if='!$root.settings.perfmode'>
<v-img :src='track.albumArt.thumb'></v-img>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title
:class='{"primary--text": track.id == ($root.track ? $root.track : {id: null}).id}'
>{{track.title}}<span v-if='track.explicit' class='red--text text-overline pl-2'>E</span></v-list-item-title>
>{{track.title}}<span v-if='track.explicit && !$root.settings.perfmode' class='red--text text-overline pl-2'>E</span></v-list-item-title>
<v-list-item-subtitle>{{track.artistString}}</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-list-item-action v-if='!$root.settings.perfmode'>
<!-- Duration -->
<div class='text-caption mx-2'>
{{$duration(track.duration)}}
</div>
</v-list-item-action>
<v-list-item-action>
<v-list-item-action v-if='!$root.settings.perfmode'>
<!-- Quick add/remoev to library -->
<v-btn @click.stop='addLibrary' icon v-if='!isLibrary'>
<v-icon>mdi-heart</v-icon>
Expand All @@ -24,7 +24,7 @@
<v-icon>mdi-heart-remove</v-icon>
</v-btn>
</v-list-item-action>
<v-list-item-action>
<v-list-item-action v-if='!$root.settings.perfmode'>
<!-- Quick add to playlist -->
<v-btn @click.stop='popup = true' icon v-if='!removeQueue'>
<v-icon>mdi-playlist-plus</v-icon>
Expand All @@ -34,7 +34,7 @@
<v-icon>mdi-close</v-icon>
</v-btn>
</v-list-item-action>
<v-list-item-action>
<v-list-item-action v-if='!$root.settings.perfmode'>
<!-- Context menu -->
<v-menu v-model='menu' offset-y offset-x absolue>
<template v-slot:activator="{on, attrs}">
Expand Down
11 changes: 11 additions & 0 deletions app/client/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@
<v-list-item-subtitle>{{$t("Requires restart of Freezer!")}}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<!-- Performance mode -->
<v-list-item>
<v-list-item-action>
<v-checkbox v-model='$root.settings.perfmode' class='pl-2'></v-checkbox>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{$t("Performance Mode")}}</v-list-item-title>
<v-list-item-subtitle>{{$t("Only display essential track info. Incompatible with Clubs.")}}</v-list-item-subtitle>
<v-list-item-subtitle>{{$t("Greatly improves general load time")}}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<!-- Background image -->
<v-text-field
class='px-4 my-2'
Expand Down
1 change: 1 addition & 0 deletions app/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Settings {
this.contentCountry = 'US';
this.sidebarOpen = false;
this.nativeTopBar = false;
this.perfmode = false;

this.lastfmkey = '';
this.lastfmsecret = '';
Expand Down

0 comments on commit 57e2925

Please sign in to comment.