Add option to minimize description by default.

Closes #328
This commit is contained in:
FireMasterK 2021-07-30 14:33:16 +05:30
parent f40910a500
commit 96950e61e7
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
2 changed files with 8 additions and 0 deletions

View File

@ -84,6 +84,10 @@
<b>Show Comments</b>
<br />
<input class="uk-checkbox" v-model="showComments" @change="onChange($event)" type="checkbox" />
<br />
<b>Minimize Description by default</b>
<br />
<input class="uk-checkbox" v-model="minimizeDescription" @change="onChange($event)" type="checkbox" />
<h2>Instances List</h2>
<table class="uk-table">
<thead>
@ -142,6 +146,7 @@ export default {
country: "US",
defaultHomepage: "trending",
showComments: true,
minimizeDescription: false,
};
},
activated() {
@ -217,6 +222,7 @@ export default {
this.country = this.getPreferenceString("region", "US");
this.defaultHomepage = this.getPreferenceString("homepage", "trending");
this.showComments = this.getPreferenceBoolean("comments", true);
this.minimizeDescription = this.getPreferenceBoolean("minimizeDescription", false);
}
},
methods: {
@ -247,6 +253,7 @@ export default {
localStorage.setItem("region", this.country);
localStorage.setItem("homepage", this.defaultHomepage);
localStorage.setItem("comments", this.showComments);
localStorage.setItem("minimizeDescription", this.minimizeDescription);
if (shouldReload) window.location.reload();
}

View File

@ -133,6 +133,7 @@ export default {
activated() {
this.active = true;
this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
this.showDesc = !this.getPreferenceBoolean("minimizeDescription", false);
if (this.video.duration) {
document.title = this.video.title + " - Piped";
this.$refs.videoPlayer.loadVideo();