From 4a068483ed9b1334780402cbe64dfa3f4a0e8a3a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 5 Apr 2022 18:38:05 +0300 Subject: wide mode initial implementation + cleanup --- src/modules/interface.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/interface.js b/src/modules/interface.js index 17277331..9df72b88 100644 --- a/src/modules/interface.js +++ b/src/modules/interface.js @@ -13,7 +13,7 @@ const defaultState = { window.CSS.supports('-webkit-filter', 'drop-shadow(0 0)') ) }, - mobileLayout: false, + layoutType: 'normal', globalNotices: [], layoutHeight: 0, lastTimeline: null @@ -36,8 +36,8 @@ const interfaceMod = { setNotificationPermission (state, permission) { state.notificationPermission = permission }, - setMobileLayout (state, value) { - state.mobileLayout = value + setLayoutType (state, value) { + state.layoutType = value }, closeSettingsModal (state) { state.settingsModalState = 'hidden' @@ -86,8 +86,8 @@ const interfaceMod = { setNotificationPermission ({ commit }, permission) { commit('setNotificationPermission', permission) }, - setMobileLayout ({ commit }, value) { - commit('setMobileLayout', value) + setLayoutType ({ commit }, value) { + commit('setLayoutType', value) }, closeSettingsModal ({ commit }) { commit('closeSettingsModal') -- cgit v1.2.3-70-g09d2 From b5ded67c0608724fe23be15e346dd6842819635f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 7 Apr 2022 15:11:23 +0300 Subject: options to enable scrollbars and disable sticky headers --- src/App.js | 2 ++ src/App.scss | 27 ++++++++++++++++++---- src/App.vue | 6 ++--- src/components/settings_modal/tabs/general_tab.vue | 10 ++++++++ src/components/timeline/timeline.js | 2 +- src/modules/config.js | 2 ++ src/panel.scss | 3 +-- 7 files changed, 42 insertions(+), 10 deletions(-) (limited to 'src/modules') diff --git a/src/App.js b/src/App.js index 26a188f4..75fa3a3c 100644 --- a/src/App.js +++ b/src/App.js @@ -82,6 +82,8 @@ export default { layoutType () { return this.$store.state.interface.layoutType }, privateMode () { return this.$store.state.instance.private }, reverseLayout () { return this.$store.getters.mergedConfig.sidebarRight }, + noSticky () { return this.$store.getters.mergedConfig.disableStickyHeaders }, + showScrollbars () { return this.$store.getters.mergedConfig.showScrollbars }, ...mapGetters(['mergedConfig']) }, methods: { diff --git a/src/App.scss b/src/App.scss index 1867a54d..ac6cf3f4 100644 --- a/src/App.scss +++ b/src/App.scss @@ -59,6 +59,7 @@ nav { #content { overscroll-behavior-y: none; overflow-y: auto; + overflow-x: hidden; position: sticky; } @@ -136,6 +137,19 @@ nav { max-height: calc(100vh - var(--navbar-height)); overflow-y: auto; overflow-x: hidden; + margin-left: -2em; + padding-left: 2.5em; + + &:not(.-show-scrollbar) { + scrollbar-width: none; + margin-right: -2em; + padding-right: 2.5em; + + &::-webkit-scrollbar { + display: block; + width: 0; + } + } .panel-heading.-sticky { top: -10px; @@ -143,6 +157,15 @@ nav { } } + &.-no-sticky-headers { + .column { + .panel-heading.-sticky { + position: relative; + top: 0; + } + } + } + .column-inner { display: grid; grid-template-columns: 100%; @@ -186,10 +209,6 @@ nav { #content, .column.-scrollable { - &::-webkit-scrollbar { - display: block; - width: 0; - } } .text-center { diff --git a/src/App.vue b/src/App.vue index 70084538..243a3314 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,10 +13,10 @@
-