From d5970f58c6fb1e27344e3080941d2a1772ddb97c Mon Sep 17 00:00:00 2001 From: tayloraviets Date: Mon, 5 Oct 2020 20:27:32 -0600 Subject: [PATCH] PR ready distraction free feature (#596) * PR ready distraction free feature Signed-off-by: Taylor * presumably fixed linter issues Signed-off-by: Taylor * addressed PR issues and hopefully made the linter happy Signed-off-by: Taylor * fixed more linter issues Signed-off-by: Taylor * fixed more linter issues again Signed-off-by: Taylor * fixed more linter issues again. Signed-off-by: Taylor * moved bad quote Signed-off-by: Taylor --- .../distraction-settings.js | 56 +++++++ .../distraction-settings.sass | 1 + .../distraction-settings.vue | 85 ++++++++++ .../ft-list-channel/ft-list-channel.js | 15 +- .../ft-list-channel/ft-list-channel.vue | 5 +- .../components/ft-list-video/ft-list-video.js | 7 +- .../ft-list-video/ft-list-video.vue | 2 +- src/renderer/components/side-nav/side-nav.js | 6 + src/renderer/components/side-nav/side-nav.vue | 2 + .../watch-video-comments.js | 18 ++- .../watch-video-info/watch-video-info.js | 15 ++ .../watch-video-live-chat.js | 3 + .../watch-video-live-chat.vue | 5 +- .../watch-video-recommendations.js | 3 + .../watch-video-recommendations.vue | 5 +- src/renderer/store/modules/settings.js | 153 +++++++++++++++++- src/renderer/views/Channel/Channel.js | 18 ++- src/renderer/views/Channel/Channel.vue | 1 + src/renderer/views/Settings/Settings.js | 4 +- src/renderer/views/Settings/Settings.vue | 1 + src/renderer/views/Watch/Watch.js | 34 +++- static/locales/en-US.yaml | 10 ++ 22 files changed, 428 insertions(+), 21 deletions(-) create mode 100644 src/renderer/components/distraction-settings/distraction-settings.js create mode 100644 src/renderer/components/distraction-settings/distraction-settings.sass create mode 100644 src/renderer/components/distraction-settings/distraction-settings.vue diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js new file mode 100644 index 00000000..104c1edc --- /dev/null +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -0,0 +1,56 @@ +import Vue from 'vue' +import { mapActions } from 'vuex' +import FtCard from '../ft-card/ft-card.vue' +import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' +import FtButton from '../ft-button/ft-button.vue' +import FtSelect from '../ft-select/ft-select.vue' +import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' + +export default Vue.extend({ + name: 'PlayerSettings', + components: { + 'ft-card': FtCard, + 'ft-toggle-switch': FtToggleSwitch, + 'ft-button': FtButton, + 'ft-select': FtSelect, + 'ft-flex-box': FtFlexBox + }, + computed: { + hideVideoViews: function () { + return this.$store.getters.getHideVideoViews + }, + hideVideoLikesAndDislikes: function () { + return this.$store.getters.getHideVideoLikesAndDislikes + }, + hideChannelSubscriptions: function () { + return this.$store.getters.getHideChannelSubscriptions + }, + hideCommentLikes: function () { + return this.$store.getters.getHideCommentLikes + }, + hideRecommendedVideos: function () { + return this.$store.getters.getHideRecommendedVideos + }, + hideTrendingVideos: function () { + return this.$store.getters.getHideTrendingVideos + }, + hidePopularVideos: function () { + return this.$store.getters.getHidePopularVideos + }, + hideLiveChat: function () { + return this.$store.getters.getHideLiveChat + } + }, + methods: { + ...mapActions([ + 'updateHideVideoViews', + 'updateHideVideoLikesAndDislikes', + 'updateHideChannelSubscriptions', + 'updateHideCommentLikes', + 'updateHideRecommendedVideos', + 'updateHideTrendingVideos', + 'updateHidePopularVideos', + 'updateHideLiveChat' + ]) + } +}) diff --git a/src/renderer/components/distraction-settings/distraction-settings.sass b/src/renderer/components/distraction-settings/distraction-settings.sass new file mode 100644 index 00000000..05cb0dfb --- /dev/null +++ b/src/renderer/components/distraction-settings/distraction-settings.sass @@ -0,0 +1 @@ +@use "../../sass-partials/settings" diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue new file mode 100644 index 00000000..0f9dfede --- /dev/null +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -0,0 +1,85 @@ + + +