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

