diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss
index 9c78cd901..a1e3ec412 100644
--- a/src/components/settings_modal/settings_modal.scss
+++ b/src/components/settings_modal/settings_modal.scss
@@ -1,14 +1,26 @@
.settings-modal {
overflow: hidden;
- h3 {
- font-size: 1.4rem;
+ h2 {
+ font-size: 1.3rem;
+ font-weight: 500;
margin-top: 1em;
margin-bottom: 1em;
}
- h4 {
+ h3 {
font-size: 1.2rem;
+ font-weight: 500;
+ margin-top: 1em;
+ margin-bottom: 0.5em;
+ border-bottom: 1px solid var(--border);
+ padding-bottom: 0.25em;
+ box-sizing: border-box;
+ padding-left: 0.5em;
+ }
+
+ h4 {
+ font-size: 1.1rem;
margin-top: 1em;
margin-bottom: 0.5em;
}
@@ -16,19 +28,21 @@
h5 {
font-size: 1rem;
margin-bottom: 0.5em;
+ margin-top: 0;
}
.setting-list,
.option-list {
list-style-type: none;
padding-left: 2em;
+ margin: 0;
.btn:not(.dropdown-button) {
padding: 0 2em;
}
li {
- margin-bottom: 0.5em;
+ margin: 1em 0;
}
.suboptions {
@@ -55,7 +69,7 @@
transition: transform;
transition-timing-function: ease-in-out;
transition-duration: 300ms;
- width: 1000px;
+ width: 70em;
max-width: 90vw;
height: 90vh;
@@ -90,6 +104,12 @@
}
&.-mobile {
+ .tabs {
+ .menu-item {
+ font-size: 1.2em
+ }
+ }
+
.setting-list,
.option-list {
padding-left: 0.25em;
diff --git a/src/components/settings_modal/settings_modal_user_content.js b/src/components/settings_modal/settings_modal_user_content.js
index 9c6e3bba6..18e1148dc 100644
--- a/src/components/settings_modal/settings_modal_user_content.js
+++ b/src/components/settings_modal/settings_modal_user_content.js
@@ -82,9 +82,6 @@ const SettingsModalContent = {
},
expertLevel () {
return this.$store.state.config.expertLevel
- },
- isMobileLayout () {
- return useInterfaceStore().layoutType === 'mobile'
}
},
data () {
@@ -108,21 +105,6 @@ const SettingsModalContent = {
// Clear the state of target tab, so that next time settings is opened
// it doesn't force it.
useInterfaceStore().clearSettingsModalTargetTab()
- },
- nestedTooBig () {
- if (this.navCollapsed) {
- this.navCollapsed = false
- this.$refs.tabSwitcher.showNav()
- }
- },
- nestedTooSmall () {
- if (!this.navCollapsed) {
- this.navCollapsed = true
- this.$refs.tabSwitcher.hideNav()
- }
- },
- nestedNavSide (side) {
- this.navHideHeader = side === 'content'
}
},
mounted () {
diff --git a/src/components/settings_modal/settings_modal_user_content.scss b/src/components/settings_modal/settings_modal_user_content.scss
index 2884938b4..5deca7868 100644
--- a/src/components/settings_modal/settings_modal_user_content.scss
+++ b/src/components/settings_modal/settings_modal_user_content.scss
@@ -1,20 +1,6 @@
.settings_tab-switcher {
height: 100%;
- h1 {
- margin-bottom: 0.5em;
- margin-top: 0.5em;
- }
-
- h4 {
- margin-bottom: 0;
- margin-top: 0.25em;
- }
-
- h5 {
- margin-top: 0.25em;
- }
-
.setting-item {
border-bottom: 2px solid var(--border);
margin: 1em 1em 1.4em;
diff --git a/src/components/settings_modal/settings_modal_user_content.vue b/src/components/settings_modal/settings_modal_user_content.vue
index 58a0adbd9..4b3308869 100644
--- a/src/components/settings_modal/settings_modal_user_content.vue
+++ b/src/components/settings_modal/settings_modal_user_content.vue
@@ -8,7 +8,6 @@
:hide-header="navHideHeader"
>
-
-
-
-
-
-
@@ -99,6 +83,22 @@
>
+
+
+
+
+
+
-
{{ $t('settings.follow_import') }}
+
{{ $t('settings.follow_import') }}
{{ $t('settings.import_followers_from_a_csv_file') }}
-
{{ $t('settings.follow_export') }}
+ {{ $t('settings.follow_export') }}
-
{{ $t('settings.block_import') }}
+
{{ $t('settings.block_import') }}
{{ $t('settings.import_blocks_from_a_csv_file') }}
-
{{ $t('settings.block_export') }}
+ {{ $t('settings.block_export') }}
-
{{ $t('settings.mute_import') }}
+
{{ $t('settings.mute_import') }}
{{ $t('settings.import_mutes_from_a_csv_file') }}
-
{{ $t('settings.mute_export') }}
+ {{ $t('settings.mute_export') }}
-
{{ $t('settings.account_backup') }}
+
{{ $t('settings.account_backup') }}
{{ $t('settings.account_backup_description') }}
@@ -128,4 +129,4 @@
-
+
diff --git a/src/components/settings_modal/tabs/developer_tab.js b/src/components/settings_modal/tabs/developer_tab.js
index 20a671735..e9978884e 100644
--- a/src/components/settings_modal/tabs/developer_tab.js
+++ b/src/components/settings_modal/tabs/developer_tab.js
@@ -1,3 +1,9 @@
+import BooleanSetting from '../helpers/boolean_setting.vue'
+
+import SharedComputedObject from '../helpers/shared_computed_object.js'
+
+import { clearCache, cacheKey, emojiCacheKey } from 'src/services/sw/sw.js'
+
const pleromaFeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma-fe/commit/'
const VersionTab = {
@@ -9,10 +15,14 @@ const VersionTab = {
frontendVersion: instance.frontendVersion
}
},
+ components: {
+ BooleanSetting
+ },
computed: {
frontendVersionLink () {
return pleromaFeCommitUrl + this.frontendVersion
- }
+ },
+ ...SharedComputedObject(),
}
}
diff --git a/src/components/settings_modal/tabs/developer_tab.scss b/src/components/settings_modal/tabs/developer_tab.scss
new file mode 100644
index 000000000..944cf052f
--- /dev/null
+++ b/src/components/settings_modal/tabs/developer_tab.scss
@@ -0,0 +1,10 @@
+.developer-tab {
+ dt {
+ font-weight: 900;
+ }
+
+ dd {
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ }
+}
diff --git a/src/components/settings_modal/tabs/developer_tab.vue b/src/components/settings_modal/tabs/developer_tab.vue
index 8c9c9efc1..6b4480db7 100644
--- a/src/components/settings_modal/tabs/developer_tab.vue
+++ b/src/components/settings_modal/tabs/developer_tab.vue
@@ -1,32 +1,31 @@
-
-
+
+
diff --git a/src/components/settings_modal/tabs/posts_tab.vue b/src/components/settings_modal/tabs/posts_tab.vue
index 70bc6ea23..ac5c286e1 100644
--- a/src/components/settings_modal/tabs/posts_tab.vue
+++ b/src/components/settings_modal/tabs/posts_tab.vue
@@ -233,9 +233,11 @@
{{ $t('settings.use_contain_fit') }}
-
- {{ $t('settings.fun') }}
-
+
+
+ {{ $t('settings.fun') }}
+
+
-
-
{{ $t('settings.account_profile_edit') }}
+ {{ $t('settings.account_profile_edit') }}
-
{{ $t('settings.account_privacy') }}
+
{{ $t('settings.account_privacy') }}
-
diff --git a/src/components/tab_switcher/vertical_tab_switcher.jsx b/src/components/tab_switcher/vertical_tab_switcher.jsx
index ee0e995a0..054e199b3 100644
--- a/src/components/tab_switcher/vertical_tab_switcher.jsx
+++ b/src/components/tab_switcher/vertical_tab_switcher.jsx
@@ -37,19 +37,13 @@ export default {
required: false,
type: Boolean,
default: null
- },
- hideHeader: {
- required: false,
- type: Boolean,
- default: null
}
},
data () {
return {
active: findFirstUsable(this.slots()),
resizeHandler: null,
- navMode: false,
- navSide: 'content'
+ navSide: 'tabs'
}
},
computed: {
@@ -71,16 +65,6 @@ export default {
mobileLayout: store => store.layoutType === 'mobile'
}),
},
- created () {
- this.resizeHandler = throttle(this.onResize, 200)
- window.addEventListener('resize', this.resizeHandler)
- },
- mounted () {
- this.resizeHandler()
- },
- unmounted () {
- window.removeEventListener('resize', this.resizeHandler)
- },
beforeUpdate () {
const currentSlot = this.slots()[this.active]
if (!currentSlot.props) {
@@ -92,7 +76,6 @@ export default {
return (e) => {
e.preventDefault()
this.setTab(index)
- this.onResize()
}
},
setTab (index) {
@@ -105,30 +88,6 @@ export default {
changeNavSide (side) {
if (this.navSide !== side) {
this.navSide = side
- this.onResize()
- }
- },
- getNavMode () {
- return this.navMode
- },
- onResize () {
- // All other tabs are hidden and their width is most likely 0
- const activeTab = this.$refs.root.querySelector('.tab-content-wrapper.-active')
- const tabContent = activeTab.querySelector('.tab-content')
- const tabContentWidth = tabContent.clientWidth
-
- const rootWidth = this.$refs.root.clientWidth
- const navWidth = this.$refs.nav.clientWidth
- const contentsWidth = rootWidth - navWidth
-
- // if contents takes more space than its container
- if (contentsWidth < tabContentWidth) {
- this.hideNav()
- // If we (theoretically) have enough space to fit it in
- } else if (contentsWidth - navWidth >= tabContentWidth){
- // First expand the inner layer, then outer
- // if use same logic as above order will be reversed
- this.showNav()
}
},
// DO NOT put it to computed, it doesn't work (caching?)
@@ -145,7 +104,7 @@ export default {
const props = slot.props
if (!props) return
const classesTab = ['vertical-tab', 'menu-item']
- if (this.activeIndex === index) {
+ if (this.activeIndex === index && useInterfaceStore().layoutType !== 'mobile') {
classesTab.push('-active')
}
return (
@@ -183,14 +142,21 @@ export default {
: ''
const headerClasses = ['tab-content-label']
- if (this.hideHeader === true) {
- headerClasses.push('-hidden')
- }
const header = (
-
+
)
return (
@@ -204,13 +170,14 @@ export default {
})
const rootClasses = ['vertical-tab-switcher']
- if (this.navMode) {
- rootClasses.push('-nav-mode')
- if (this.navSide === 'content') {
- rootClasses.push('-nav-content')
- } else {
- rootClasses.push('-nav-tabs')
- }
+ if (useInterfaceStore().layoutType === 'mobile') {
+ rootClasses.push('-mobile')
+ }
+
+ if (this.navSide === 'tabs') {
+ rootClasses.push('-nav-tabs')
+ } else {
+ rootClasses.push('-nav-contents')
}
return (
diff --git a/src/components/tab_switcher/vertical_tab_switcher.scss b/src/components/tab_switcher/vertical_tab_switcher.scss
index 2a6e1cc6a..3652c0228 100644
--- a/src/components/tab_switcher/vertical_tab_switcher.scss
+++ b/src/components/tab_switcher/vertical_tab_switcher.scss
@@ -1,16 +1,19 @@
.vertical-tab-switcher {
display: flex;
flex-direction: row;
+ container-type: inline-size;
> .tabs {
- flex: 0 0 auto;
+ flex: 0 0 15em;
flex-direction: column;
overflow: hidden auto;
white-space: nowrap;
text-overflow: ellipsis;
width: 15em;
+ min-width: 15em;
border-right: 1px solid;
border-right-color: var(--border);
+ box-sizing: border-box;
> .menu-item {
padding: 0.5em 1em;
@@ -23,18 +26,13 @@
}
> .contents {
- flex: 1 1 auto;
- overflow-x: hidden;
-
- .tab-content-label {
- display: none
- }
+ flex: 1 0 35em;
.tab-content {
align-self: center;
&:not(.-full-width) {
- width: 30em;
+ max-width: 40em;
}
&.-full-width {
@@ -42,16 +40,23 @@
}
}
+ .tab-content-label {
+ box-sizing: border-box;
+ margin: 0;
+ border-bottom: 1px solid var(--border);
+ display: none;
+
+ button {
+ box-sizing: border-box;
+ padding: 0.5em;
+ }
+ }
+
.tab-content-wrapper {
display: flex;
flex-direction: column;
-
- .tab-content-label {
- font-size: 1.5em;
- padding: 0.5em 1em;
- margin: 0;
- border-bottom: 1px solid var(--border);
- }
+ overflow-y: auto;
+ height: 100%;
&.-hidden {
display: none;
@@ -69,38 +74,104 @@
}
}
- &.-nav-mode {
- &.-nav-tabs {
- > .tabs {
- width: 100%;
- }
-
- > .nav-content {
- width: 0%;
+ &.-mobile {
+ > .contents {
+ .tab-content-label {
+ display: block
}
}
- &.-nav-content {
+ &.-nav-contents {
> .contents {
- > .tab-content-wrapper {
- > .tab-content-label {
- display: block;
+ display: block;
+ flex-grow: 1;
+ }
- &.-hidden {
- display: none;
- }
+ > .tabs {
+ display: none;
+ flex-grow: 0;
+ flex-shrink: 1;
+ }
+ }
+
+ &.-nav-tabs {
+ > .tabs {
+ display: block;
+ flex-grow: 1;
+ }
+
+ > .contents {
+ display: none;
+ flex-grow: 0;
+ flex-shrink: 1;
+ }
+ }
+ }
+
+ @supports (container-type: inline-size) {
+ &,
+ &.-mobile {
+ &.-nav-contents,
+ &.-nav-tabs {
+ /* I THINK it's a false positive and eslint doesn't understand the @-rule */
+ /* stylelint-disable no-descending-specificity */
+ > .contents {
+ display: block;
+ flex-grow: 1;
+ }
+
+ > .tabs {
+ display: block;
+ flex-grow: 0;
+ }
+ /* stylelint-enable no-descending-specificity */
+ }
+ }
+
+ @container (width < 50em) {
+ > .contents {
+ .tab-content-label {
+ display: block
+ }
+ }
+
+ &.-mobile {
+ > .contents {
+ .tab-content-label {
+ display: block
}
}
}
- > .tabs {
- position: absolute;
- pointer-events: none;
- opacity: 0;
- }
+ &,
+ &.-mobile {
+ &.-nav-contents {
+ > .contents {
+ display: block;
+ flex-grow: 1;
+ }
- > .nav-content {
- width: 100%;
+ > .tabs {
+ display: none;
+ flex-grow: 0;
+ flex-shrink: 1;
+ }
+ }
+
+ &.-nav-tabs {
+ /* stylelint-disable no-descending-specificity */
+ > .tabs {
+ display: block;
+ flex-grow: 1;
+ }
+
+ > .contents {
+ display: none;
+ flex-grow: 0;
+ flex-shrink: 1;
+ }
+ /* stylelint-enable no-descending-specificity */
+ }
}
}
}
diff --git a/src/i18n/en.json b/src/i18n/en.json
index fac033c76..e5f37b392 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -405,6 +405,7 @@
"post_look_feel": "Posts Look & Feel",
"posts": "Posts",
"developer": "Developer",
+ "debug": "Debug",
"mention_links": "Mention links",
"appearance": "Appearance",
"confirm_new_setting": "Confirm new setting?",
@@ -418,7 +419,7 @@
"navbar_size": "Top bar size",
"panel_header_size": "Panel header size",
"visual_tweaks": "Minor visual tweaks",
- "theme_debug": "Show what background theme engine assumes when dealing with transparancy (DEBUG)",
+ "theme_debug": "Show what background theme engine assumes when dealing with transparancy",
"scale_and_layout": "Interface scale and layout",
"timelines": "Timelines",
"format_and_language": "Format and Language",
@@ -753,7 +754,7 @@
"subject_line_email": "Like email: \"re: subject\"",
"subject_line_mastodon": "Like mastodon: copy as is",
"subject_line_noop": "Do not copy",
- "force_theme_recompilation_debug": "Disable theme cahe, force recompile on each boot (DEBUG)",
+ "force_theme_recompilation_debug": "Disable theme cahe, force recompile on each boot",
"conversation_display": "Conversation display style",
"conversation_display_tree": "Tree-style",
"conversation_display_tree_quick": "Tree view",