From 0604b1d5b7b19db41096876d0d911ea95c3c778f Mon Sep 17 00:00:00 2001
From: Mark Felder <feld@FreeBSD.org>
Date: Mon, 3 Aug 2020 18:44:35 -0500
Subject: Rename legacy PleromaFE Chat functionality to "Shout"

---
 src/App.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 1a166778..6c582c03 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -49,10 +49,10 @@
       </div>
       <media-modal />
     </div>
-    <chat-panel
-      v-if="currentUser && chat"
+    <shout-panel
+      v-if="currentUser && shout"
       :floating="true"
-      class="floating-chat mobile-hidden"
+      class="floating-shout mobile-hidden"
     />
     <MobilePostStatusButton />
     <UserReportingModal />
-- 
cgit v1.2.3-70-g09d2


From adfe56a3a31b3c4a8c2c206c06bebf9c4af675d1 Mon Sep 17 00:00:00 2001
From: Eris <femmediscord@gmail.com>
Date: Mon, 14 Jun 2021 17:54:40 +0000
Subject: New option: Always show floating New Post button

---
 .gitignore                                                       | 2 ++
 CHANGELOG.md                                                     | 2 +-
 CONTRIBUTORS.md                                                  | 1 +
 src/App.js                                                       | 3 +++
 src/App.vue                                                      | 1 +
 .../mobile_post_status_button/mobile_post_status_button.js       | 3 +++
 .../mobile_post_status_button/mobile_post_status_button.vue      | 4 ++--
 src/components/settings_modal/tabs/general_tab.vue               | 5 +++++
 src/components/shout_panel/shout_panel.vue                       | 9 ++++++++-
 src/i18n/en.json                                                 | 1 +
 src/modules/config.js                                            | 1 +
 11 files changed, 28 insertions(+), 4 deletions(-)

(limited to 'src/App.vue')

diff --git a/.gitignore b/.gitignore
index 479d57c4..8b23774f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ test/e2e/reports
 selenium-debug.log
 .idea/
 config/local.json
+.gitignore
+config/local.example.json
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 905d9f65..4651c01d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 - Added option to mark posts as sensitive by default
 - Added quick filters for notifications
 - Implemented user option to change sidebar position to the right side
-
+- Implemented user option to always show floating New Post button (normally mobile-only)
 
 ## [2.3.0] - 2021-03-01
 ### Fixed
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index d7c217ce..f666a4ef 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -3,6 +3,7 @@ Contributors of this project.
 - Constance Variable (lambadalambda@social.heldscal.la): Code
 - Coco Snuss (cocosnuss@social.heldscal.la): Code
 - wakarimasen (wakarimasen@shitposter.club): NSFW hiding image
+- eris (eris@disqordia.space): Code
 - dtluna (dtluna@social.heldscal.la): Code
 - sonyam (sonyam@social.heldscal.la): Background images
 - hakui (hakui@freezepeach.xyz): CSS and styling
diff --git a/src/App.js b/src/App.js
index fe4c30cb..e7ea3851 100644
--- a/src/App.js
+++ b/src/App.js
@@ -73,6 +73,9 @@ export default {
         this.$store.state.instance.instanceSpecificPanelContent
     },
     showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
+    shoutboxPosition () {
+      return this.$store.getters.mergedConfig.showNewPostButton || false
+    },
     isMobileLayout () { return this.$store.state.interface.mobileLayout },
     privateMode () { return this.$store.state.instance.private },
     sidebarAlign () {
diff --git a/src/App.vue b/src/App.vue
index 6c582c03..6b867498 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -53,6 +53,7 @@
       v-if="currentUser && shout"
       :floating="true"
       class="floating-shout mobile-hidden"
+      :class="{ 'left': shoutboxPosition }"
     />
     <MobilePostStatusButton />
     <UserReportingModal />
diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.js b/src/components/mobile_post_status_button/mobile_post_status_button.js
index 366ea89c..d27fb3b8 100644
--- a/src/components/mobile_post_status_button/mobile_post_status_button.js
+++ b/src/components/mobile_post_status_button/mobile_post_status_button.js
@@ -44,6 +44,9 @@ const MobilePostStatusButton = {
 
       return this.autohideFloatingPostButton && (this.hidden || this.inputActive)
     },
+    isPersistent () {
+      return !!this.$store.getters.mergedConfig.showNewPostButton
+    },
     autohideFloatingPostButton () {
       return !!this.$store.getters.mergedConfig.autohideFloatingPostButton
     }
diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.vue b/src/components/mobile_post_status_button/mobile_post_status_button.vue
index 767f8244..37becf4c 100644
--- a/src/components/mobile_post_status_button/mobile_post_status_button.vue
+++ b/src/components/mobile_post_status_button/mobile_post_status_button.vue
@@ -2,7 +2,7 @@
   <div v-if="isLoggedIn">
     <button
       class="button-default new-status-button"
-      :class="{ 'hidden': isHidden }"
+      :class="{ 'hidden': isHidden, 'always-show': isPersistent }"
       @click="openPostForm"
     >
       <FAIcon icon="pen" />
@@ -47,7 +47,7 @@
 }
 
 @media all and (min-width: 801px) {
-  .new-status-button {
+  .new-status-button:not(.always-show) {
     display: none;
   }
 }
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index bdb29edf..4c09d047 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -117,6 +117,11 @@
             {{ $t('settings.sensitive_by_default') }}
           </BooleanSetting>
         </li>
+        <li>
+          <BooleanSetting path="showNewPostButton">
+            {{ $t('settings.showPostButton') }}
+          </BooleanSetting>
+        </li>
         <li>
           <BooleanSetting path="autohideFloatingPostButton">
             {{ $t('settings.autohide_floating_post_button') }}
diff --git a/src/components/shout_panel/shout_panel.vue b/src/components/shout_panel/shout_panel.vue
index f90baf80..c88797d1 100644
--- a/src/components/shout_panel/shout_panel.vue
+++ b/src/components/shout_panel/shout_panel.vue
@@ -79,12 +79,19 @@
 
 .floating-shout {
   position: fixed;
-  right: 0px;
   bottom: 0px;
   z-index: 1000;
   max-width: 25em;
 }
 
+.floating-shout.left {
+  left: 0px;
+}
+
+.floating-shout:not(.left) {
+  right: 0px;
+}
+
 .shout-panel {
   .shout-heading {
     cursor: pointer;
diff --git a/src/i18n/en.json b/src/i18n/en.json
index aa440ac1..26f51cea 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -349,6 +349,7 @@
     "max_thumbnails": "Maximum amount of thumbnails per post",
     "hide_isp": "Hide instance-specific panel",
     "right_sidebar": "Show sidebar on the right side",
+    "showPostButton": "Always show floating New Post button",
     "hide_wallpaper": "Hide instance wallpaper",
     "preload_images": "Preload images",
     "use_one_click_nsfw": "Open NSFW attachments with just one click",
diff --git a/src/modules/config.js b/src/modules/config.js
index 0f596750..30c77a7b 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -34,6 +34,7 @@ export const defaultState = {
   loopVideoSilentOnly: true,
   streaming: false,
   emojiReactionsOnTimeline: true,
+  showNewPostButton: false,
   autohideFloatingPostButton: false,
   pauseOnUnfocused: true,
   stopGifs: false,
-- 
cgit v1.2.3-70-g09d2


From 0c1014524232907925bf5fa59079dd06d0ef0472 Mon Sep 17 00:00:00 2001
From: Eris <femmediscord@gmail.com>
Date: Mon, 14 Jun 2021 19:42:56 +0000
Subject: New option: Hide shoutbox

---
 src/App.js                                         | 3 +++
 src/App.vue                                        | 2 +-
 src/components/settings_modal/tabs/general_tab.js  | 1 +
 src/components/settings_modal/tabs/general_tab.vue | 5 +++++
 src/i18n/en.json                                   | 1 +
 src/modules/config.js                              | 1 +
 6 files changed, 12 insertions(+), 1 deletion(-)

(limited to 'src/App.vue')

diff --git a/src/App.js b/src/App.js
index fe4c30cb..8d9ec8c7 100644
--- a/src/App.js
+++ b/src/App.js
@@ -73,6 +73,9 @@ export default {
         this.$store.state.instance.instanceSpecificPanelContent
     },
     showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
+    hideSB () {
+      return this.$store.getters.mergedConfig.hideShoutbox
+    },
     isMobileLayout () { return this.$store.state.interface.mobileLayout },
     privateMode () { return this.$store.state.instance.private },
     sidebarAlign () {
diff --git a/src/App.vue b/src/App.vue
index 6c582c03..39decde9 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -50,7 +50,7 @@
       <media-modal />
     </div>
     <shout-panel
-      v-if="currentUser && shout"
+      v-if="currentUser && shout && !hideSB"
       :floating="true"
       class="floating-shout mobile-hidden"
     />
diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js
index 07fccf57..0e838e59 100644
--- a/src/components/settings_modal/tabs/general_tab.js
+++ b/src/components/settings_modal/tabs/general_tab.js
@@ -50,6 +50,7 @@ const GeneralTab = {
       return this.$store.state.instance.background &&
         !this.$store.state.users.currentUser.background_image
     },
+    shout () { return this.$store.state.shout.channel.state === 'joined' }, 
     ...SharedComputedObject()
   }
 }
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index bdb29edf..3a9af1ea 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -21,6 +21,11 @@
             {{ $t('settings.hide_wallpaper') }}
           </BooleanSetting>
         </li>
+        <li v-if="shout">
+          <BooleanSetting path="hideShoutbox">
+            {{ $t('settings.hide_shoutbox') }} {{ $t('shoutbox.title') }}
+          </BooleanSetting>
+        </li>
       </ul>
     </div>
     <div class="setting-item">
diff --git a/src/i18n/en.json b/src/i18n/en.json
index aa440ac1..79dcb919 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -349,6 +349,7 @@
     "max_thumbnails": "Maximum amount of thumbnails per post",
     "hide_isp": "Hide instance-specific panel",
     "right_sidebar": "Show sidebar on the right side",
+    "hide_shoutbox": "Hide ",
     "hide_wallpaper": "Hide instance wallpaper",
     "preload_images": "Preload images",
     "use_one_click_nsfw": "Open NSFW attachments with just one click",
diff --git a/src/modules/config.js b/src/modules/config.js
index 0f596750..bdab3f4d 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -21,6 +21,7 @@ export const defaultState = {
   customThemeSource: undefined,
   hideISP: false,
   hideInstanceWallpaper: false,
+  hideShoutbox: false,
   // bad name: actually hides posts of muted USERS
   hideMutedPosts: undefined, // instance default
   collapseMessageWithSubject: undefined, // instance default
-- 
cgit v1.2.3-70-g09d2


From cbccea054698916a083b7906898b50039cdd411c Mon Sep 17 00:00:00 2001
From: Eris <femmediscord@gmail.com>
Date: Mon, 14 Jun 2021 20:33:51 +0000
Subject: Don't shorten shoutbox to SB

---
 src/App.js  | 2 +-
 src/App.vue | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/App.vue')

diff --git a/src/App.js b/src/App.js
index 8d9ec8c7..362ac19d 100644
--- a/src/App.js
+++ b/src/App.js
@@ -73,7 +73,7 @@ export default {
         this.$store.state.instance.instanceSpecificPanelContent
     },
     showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
-    hideSB () {
+    hideShoutbox () {
       return this.$store.getters.mergedConfig.hideShoutbox
     },
     isMobileLayout () { return this.$store.state.interface.mobileLayout },
diff --git a/src/App.vue b/src/App.vue
index 39decde9..c30f5e98 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -50,7 +50,7 @@
       <media-modal />
     </div>
     <shout-panel
-      v-if="currentUser && shout && !hideSB"
+      v-if="currentUser && shout && !hideShoutbox"
       :floating="true"
       class="floating-shout mobile-hidden"
     />
-- 
cgit v1.2.3-70-g09d2

