From 7341b8a5516621985a76456e1eefc58cd23ff2e2 Mon Sep 17 00:00:00 2001 From: eris Date: Wed, 26 May 2021 22:22:55 +0000 Subject: [PATCH] Implement right sidebar option as user option --- CHANGELOG.md | 1 + src/App.js | 2 +- src/components/settings_modal/tabs/general_tab.vue | 5 +++++ src/i18n/en.json | 1 + src/modules/config.js | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cef6d401..905d9f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added a quick settings to timeline header for easier access - 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 ## [2.3.0] - 2021-03-01 diff --git a/src/App.js b/src/App.js index 1ca029b6..231c6ae1 100644 --- a/src/App.js +++ b/src/App.js @@ -77,7 +77,7 @@ export default { privateMode () { return this.$store.state.instance.private }, sidebarAlign () { return { - 'order': this.$store.state.instance.sidebarRight ? 99 : 0 + 'order': this.$store.getters.mergedConfig.sidebarRight ? 99 : 0 } }, ...mapGetters(['mergedConfig']) diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 9228c78e..7bae4a32 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -11,6 +11,11 @@ {{ $t('settings.hide_isp') }} +
  • + + {{ $t('settings.right_sidebar') }} + +
  • {{ $t('settings.hide_wallpaper') }} diff --git a/src/i18n/en.json b/src/i18n/en.json index d6138482..1b38e29a 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -345,6 +345,7 @@ "hide_all_muted_posts": "Hide muted posts", "max_thumbnails": "Maximum amount of thumbnails per post", "hide_isp": "Hide instance-specific panel", + "right_sidebar": "Show sidebar on the right side", "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 629588a8..0f596750 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -54,6 +54,7 @@ export const defaultState = { interfaceLanguage: browserLocale, hideScopeNotice: false, useStreamingApi: false, + sidebarRight: undefined, // instance default scopeCopy: undefined, // instance default subjectLineBehavior: undefined, // instance default alwaysShowSubjectInput: undefined, // instance default