From 51a78e8b8a89065062d5b4c1b72d5bdd457d9663 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Thu, 25 Feb 2021 10:56:16 +0200
Subject: add a quick settings menu for timeline headers

---
 .../timeline/timeline_quick_settings.vue           | 105 +++++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 src/components/timeline/timeline_quick_settings.vue

(limited to 'src/components/timeline/timeline_quick_settings.vue')

diff --git a/src/components/timeline/timeline_quick_settings.vue b/src/components/timeline/timeline_quick_settings.vue
new file mode 100644
index 00000000..51edff71
--- /dev/null
+++ b/src/components/timeline/timeline_quick_settings.vue
@@ -0,0 +1,105 @@
+<template>
+  <Popover
+    trigger="click"
+    class="TimelineQuickSettings"
+    :bound-to="{ x: 'container' }"
+  >
+    <div
+      slot="content"
+      class="timeline-settings-menu dropdown-menu"
+    >
+      <button
+        class="button-default dropdown-item"
+        @click="replyVisibilityAll = true"
+      >
+        <span
+          class="menu-checkbox"
+          :class="{ 'menu-checkbox-radio': replyVisibilityAll }"
+        />{{ $t('settings.reply_visibility_all') }}
+      </button>
+      <button
+        class="button-default dropdown-item"
+        @click="replyVisibilityFollowing = true"
+      >
+        <span
+          class="menu-checkbox"
+          :class="{ 'menu-checkbox-radio': replyVisibilityFollowing }"
+        />{{ $t('settings.reply_visibility_following_short') }}
+      </button>
+      <button
+        class="button-default dropdown-item"
+        @click="replyVisibilitySelf = true"
+      >
+        <span
+          class="menu-checkbox"
+          :class="{ 'menu-checkbox-radio': replyVisibilitySelf }"
+        />{{ $t('settings.reply_visibility_self_short') }}
+      </button>
+      <div
+        role="separator"
+        class="dropdown-divider"
+      />
+      <button
+        class="button-default dropdown-item"
+        @click="hideMedia = !hideMedia"
+      >
+        <span
+          class="menu-checkbox"
+          :class="{ 'menu-checkbox-checked': hideMedia }"
+        />{{ $t('settings.hide_media_previews') }}
+      </button>
+      <button
+        class="button-default dropdown-item"
+        @click="hideMutedPosts = !hideMutedPosts"
+      >
+        <span
+          class="menu-checkbox"
+          :class="{ 'menu-checkbox-checked': hideMutedPosts }"
+        />{{ $t('settings.hide_all_muted_posts') }}
+      </button>
+      <button
+        class="button-default dropdown-item dropdown-item-icon"
+        @click="openTab('filtering')"
+      >
+        <FAIcon icon="filter" />{{ $t('settings.word_filter') }}
+      </button>
+      <button
+        class="button-default dropdown-item dropdown-item-icon"
+        @click="openTab('general')"
+      >
+        <FAIcon icon="wrench" />{{ $t('settings.more_settings') }}
+      </button>
+    </div>
+    <div slot="trigger">
+      <FAIcon icon="cog" />
+    </div>
+  </Popover>
+</template>
+
+<script src="./timeline_quick_settings.js"></script>
+
+<style lang="scss">
+
+.TimelineQuickSettings {
+  align-self: stretch;
+
+  > button {
+    font-size: 1.2em;
+    padding-left: 0.7em;
+    padding-right: 0.2em;
+    line-height: 100%;
+    height: 100%;
+  }
+
+  .dropdown-item {
+    margin: 0;
+  }
+
+  .timeline-settings-menu {
+    display: flex;
+    min-width: 12em;
+    flex-direction: column;
+  }
+}
+
+</style>
-- 
cgit v1.2.3-70-g09d2


From 93785634a72420338911d8a8a7fc7eef3eb478e4 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Thu, 25 Feb 2021 11:01:11 +0200
Subject: basic loggedin check for reply filtering

---
 src/components/timeline/timeline_quick_settings.js |  3 +
 .../timeline/timeline_quick_settings.vue           | 64 +++++++++++-----------
 2 files changed, 36 insertions(+), 31 deletions(-)

(limited to 'src/components/timeline/timeline_quick_settings.vue')

diff --git a/src/components/timeline/timeline_quick_settings.js b/src/components/timeline/timeline_quick_settings.js
index eb1eb8fb..ecac06e9 100644
--- a/src/components/timeline/timeline_quick_settings.js
+++ b/src/components/timeline/timeline_quick_settings.js
@@ -26,6 +26,9 @@ const TimelineQuickSettings = {
   },
   computed: {
     ...mapGetters(['mergedConfig']),
+    loggedIn () {
+      return !!this.$store.state.users.currentUser
+    },
     replyVisibilitySelf: {
       get () { return this.mergedConfig.replyVisibility === 'self' },
       set () { this.setReplyVisibility('self') }
diff --git a/src/components/timeline/timeline_quick_settings.vue b/src/components/timeline/timeline_quick_settings.vue
index 51edff71..67f6be53 100644
--- a/src/components/timeline/timeline_quick_settings.vue
+++ b/src/components/timeline/timeline_quick_settings.vue
@@ -8,37 +8,39 @@
       slot="content"
       class="timeline-settings-menu dropdown-menu"
     >
-      <button
-        class="button-default dropdown-item"
-        @click="replyVisibilityAll = true"
-      >
-        <span
-          class="menu-checkbox"
-          :class="{ 'menu-checkbox-radio': replyVisibilityAll }"
-        />{{ $t('settings.reply_visibility_all') }}
-      </button>
-      <button
-        class="button-default dropdown-item"
-        @click="replyVisibilityFollowing = true"
-      >
-        <span
-          class="menu-checkbox"
-          :class="{ 'menu-checkbox-radio': replyVisibilityFollowing }"
-        />{{ $t('settings.reply_visibility_following_short') }}
-      </button>
-      <button
-        class="button-default dropdown-item"
-        @click="replyVisibilitySelf = true"
-      >
-        <span
-          class="menu-checkbox"
-          :class="{ 'menu-checkbox-radio': replyVisibilitySelf }"
-        />{{ $t('settings.reply_visibility_self_short') }}
-      </button>
-      <div
-        role="separator"
-        class="dropdown-divider"
-      />
+      <div v-if="loggedIn">
+        <button
+          class="button-default dropdown-item"
+          @click="replyVisibilityAll = true"
+        >
+          <span
+            class="menu-checkbox"
+            :class="{ 'menu-checkbox-radio': replyVisibilityAll }"
+          />{{ $t('settings.reply_visibility_all') }}
+        </button>
+        <button
+          class="button-default dropdown-item"
+          @click="replyVisibilityFollowing = true"
+        >
+          <span
+            class="menu-checkbox"
+            :class="{ 'menu-checkbox-radio': replyVisibilityFollowing }"
+          />{{ $t('settings.reply_visibility_following_short') }}
+        </button>
+        <button
+          class="button-default dropdown-item"
+          @click="replyVisibilitySelf = true"
+        >
+          <span
+            class="menu-checkbox"
+            :class="{ 'menu-checkbox-radio': replyVisibilitySelf }"
+          />{{ $t('settings.reply_visibility_self_short') }}
+        </button>
+        <div
+          role="separator"
+          class="dropdown-divider"
+        />
+      </div>
       <button
         class="button-default dropdown-item"
         @click="hideMedia = !hideMedia"
-- 
cgit v1.2.3-70-g09d2


From fc5483f7641f3aa6866fbbd9beaca0139083ee86 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Mon, 1 Mar 2021 10:14:17 +0200
Subject: change icons around

---
 src/components/timeline/timeline_quick_settings.js  | 3 ++-
 src/components/timeline/timeline_quick_settings.vue | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/components/timeline/timeline_quick_settings.vue')

diff --git a/src/components/timeline/timeline_quick_settings.js b/src/components/timeline/timeline_quick_settings.js
index 2c1a3df8..9ec1a007 100644
--- a/src/components/timeline/timeline_quick_settings.js
+++ b/src/components/timeline/timeline_quick_settings.js
@@ -2,10 +2,11 @@ import Popover from '../popover/popover.vue'
 import BooleanSetting from '../settings_modal/helpers/boolean_setting.vue'
 import { mapGetters } from 'vuex'
 import { library } from '@fortawesome/fontawesome-svg-core'
-import { faFilter, faWrench } from '@fortawesome/free-solid-svg-icons'
+import { faFilter, faFont, faWrench } from '@fortawesome/free-solid-svg-icons'
 
 library.add(
   faFilter,
+  faFont,
   faWrench
 )
 
diff --git a/src/components/timeline/timeline_quick_settings.vue b/src/components/timeline/timeline_quick_settings.vue
index 67f6be53..4ad2842b 100644
--- a/src/components/timeline/timeline_quick_settings.vue
+++ b/src/components/timeline/timeline_quick_settings.vue
@@ -63,7 +63,7 @@
         class="button-default dropdown-item dropdown-item-icon"
         @click="openTab('filtering')"
       >
-        <FAIcon icon="filter" />{{ $t('settings.word_filter') }}
+        <FAIcon icon="font" />{{ $t('settings.word_filter') }}
       </button>
       <button
         class="button-default dropdown-item dropdown-item-icon"
@@ -73,7 +73,7 @@
       </button>
     </div>
     <div slot="trigger">
-      <FAIcon icon="cog" />
+      <FAIcon icon="filter" />
     </div>
   </Popover>
 </template>
-- 
cgit v1.2.3-70-g09d2

