From 96950e61e78484847fab13e006c9df66eccf851a Mon Sep 17 00:00:00 2001
From: FireMasterK <20838718+FireMasterK@users.noreply.github.com>
Date: Fri, 30 Jul 2021 14:33:16 +0530
Subject: [PATCH] Add option to minimize description by default.
Closes #328
---
src/components/Preferences.vue | 7 +++++++
src/components/WatchVideo.vue | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/components/Preferences.vue b/src/components/Preferences.vue
index 3fb2a477..65dae628 100644
--- a/src/components/Preferences.vue
+++ b/src/components/Preferences.vue
@@ -84,6 +84,10 @@
Show Comments
+
+ Minimize Description by default
+
+
Instances List
@@ -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();
}
diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue
index fb010677..0a25232c 100644
--- a/src/components/WatchVideo.vue
+++ b/src/components/WatchVideo.vue
@@ -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();