From b0e0686c7f1084e7074feee509ad189c6010431b Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 28 Aug 2018 21:21:29 +0300 Subject: Added ability to hide certain types of notifications --- src/components/settings/settings.js | 13 +++++++ src/components/settings/settings.vue | 67 ++++++++++++++++++++++++++++++------ 2 files changed, 70 insertions(+), 10 deletions(-) (limited to 'src/components/settings') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 333633c9..de12894b 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -10,6 +10,7 @@ const settings = { hideAttachmentsLocal: this.$store.state.config.hideAttachments, hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, hideNsfwLocal: this.$store.state.config.hideNsfw, + notificationVisibilityLocal: this.$store.state.config.notificationVisibility, replyVisibilityLocal: this.$store.state.config.replyVisibility, loopVideoLocal: this.$store.state.config.loopVideo, loopVideoSilentOnlyLocal: this.$store.state.config.loopVideoSilentOnly, @@ -49,6 +50,18 @@ const settings = { hideNsfwLocal (value) { this.$store.dispatch('setOption', { name: 'hideNsfw', value }) }, + 'notificationVisibilityLocal.likes' (value) { + this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility }) + }, + 'notificationVisibilityLocal.follows' (value) { + this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility }) + }, + 'notificationVisibilityLocal.repeats' (value) { + this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility }) + }, + 'notificationVisibilityLocal.mentions' (value) { + this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility }) + }, replyVisibilityLocal (value) { this.$store.dispatch('setOption', { name: 'replyVisibility', value }) }, diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index c92602b7..dbc85f1f 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -81,15 +81,47 @@
- {{$t('settings.replies_in_timeline')}} - +
+ {{$t('settings.notification_visibility')}} +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
+
+ {{$t('settings.replies_in_timeline')}} + +

{{$t('settings.filtering_explanation')}}

@@ -113,6 +145,13 @@ margin: 1em 1em 1.4em; padding-bottom: 1.4em; + div { + margin-bottom: .5em; + &:last-child { + margin-bottom: 0; + } + } + &:last-child { border-bottom: none; padding-bottom: 0; @@ -159,7 +198,15 @@ width: 10em; } } -.setting-list { +.select-multiple { + display: flex; + .option-list { + margin: 0; + padding-left: .5em; + } +} +.setting-list, +.option-list{ list-style-type: none; padding-left: 2em; li { -- cgit v1.2.3-70-g09d2