Merge pull request 'Optional widened main column' (#402) from Riedler/akkoma-fe:wide-columns-for-upstream into develop

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma-fe/pulls/402
This commit is contained in:
floatingghost 2025-03-01 12:00:33 +00:00
commit 0bf9cb0660
9 changed files with 32 additions and 6 deletions

View file

@ -59,7 +59,8 @@ export default {
{ {
'-reverse': this.reverseLayout, '-reverse': this.reverseLayout,
'-no-sticky-headers': this.noSticky, '-no-sticky-headers': this.noSticky,
'-has-new-post-button': this.newPostButtonShown '-has-new-post-button': this.newPostButtonShown,
'-wide-timeline': this.widenTimeline
}, },
'-' + this.layoutType '-' + this.layoutType
] ]
@ -93,6 +94,9 @@ export default {
newPostButtonShown () { newPostButtonShown () {
return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile' return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile'
}, },
widenTimeline () {
return this.$store.getters.mergedConfig.widenTimeline
},
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
editingAvailable () { return this.$store.state.instance.editingAvailable }, editingAvailable () { return this.$store.state.instance.editingAvailable },
layoutType () { return this.$store.state.interface.layoutType }, layoutType () { return this.$store.state.interface.layoutType },

View file

@ -172,6 +172,10 @@ nav {
background-color: rgba(0, 0, 0, 0.15); background-color: rgba(0, 0, 0, 0.15);
background-color: var(--underlay, rgba(0, 0, 0, 0.15)); background-color: var(--underlay, rgba(0, 0, 0, 0.15));
z-index: -1000; z-index: -1000;
.-wide-timeline & {
margin:0 calc(var(--columnGap) / -2);
}
} }
.app-layout { .app-layout {
@ -187,12 +191,17 @@ nav {
grid-template-rows: 1fr; grid-template-rows: 1fr;
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto; margin: 0 auto;
padding: 0 calc(var(--columnGap) / 2);
align-content: flex-start; align-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
min-height: 100vh; min-height: 100vh;
overflow-x: clip; overflow-x: clip;
&.-wide-timeline {
--maxiColumn: minmax(var(--miniColumn), 1fr);
}
.column { .column {
--___columnMargin: var(--columnGap); --___columnMargin: var(--columnGap);

View file

@ -88,10 +88,8 @@ const Gallery = {
set(this.sizes, id, { width, height }) set(this.sizes, id, { width, height })
}, },
rowStyle (row) { rowStyle (row) {
if (row.audio) { if (!row.audio && !row.minimal && !row.grid) {
return { 'padding-bottom': '25%' } // fixed reduced height for audio return { 'aspect-ratio': `1/${(1 / (row.items.length + 0.6))}` }
} else if (!row.minimal && !row.grid) {
return { 'padding-bottom': `${(100 / (row.items.length + 0.6))}%` }
} }
}, },
itemStyle (id, row) { itemStyle (id, row) {

View file

@ -96,9 +96,15 @@
.gallery-row { .gallery-row {
position: relative; position: relative;
height: 0;
width: 100%; width: 100%;
flex-grow: 1; flex-grow: 1;
.Status & {
max-height: 10em;
}
&.-audio {
aspect-ratio: 4/1; // this is terrible, but it's how it was before so I'm not changing it >:(
}
&:not(:first-child) { &:not(:first-child) {
margin-top: 0.5em; margin-top: 0.5em;

View file

@ -279,6 +279,11 @@
{{ $t('settings.right_sidebar') }} {{ $t('settings.right_sidebar') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting path="widenTimeline">
{{ $t('settings.widen_timeline') }}
</BooleanSetting>
</li>
<li> <li>
<ChoiceSetting <ChoiceSetting
v-if="user" v-if="user"

View file

@ -936,6 +936,7 @@
"title": "Version" "title": "Version"
}, },
"virtual_scrolling": "Anzeige der Zeitleiste optimieren", "virtual_scrolling": "Anzeige der Zeitleiste optimieren",
"widen_timeline": "Zeitleiste verbreitern, um horizontalen Platz zu füllen",
"word_filter": "Wortfilter", "word_filter": "Wortfilter",
"wordfilter": "Wortfilter" "wordfilter": "Wortfilter"
}, },

View file

@ -950,6 +950,7 @@
}, },
"virtual_scrolling": "Optimize timeline rendering", "virtual_scrolling": "Optimize timeline rendering",
"use_blurhash": "Use blurhashes for NSFW thumbnails", "use_blurhash": "Use blurhashes for NSFW thumbnails",
"widen_timeline": "Widen the Timeline to fill horizontal space",
"word_filter": "Word filter", "word_filter": "Word filter",
"wordfilter": "Wordfilter" "wordfilter": "Wordfilter"
}, },

View file

@ -79,6 +79,7 @@ export const defaultState = {
hideScopeNotice: false, hideScopeNotice: false,
useStreamingApi: false, useStreamingApi: false,
sidebarRight: undefined, // instance default sidebarRight: undefined, // instance default
widenTimeline: undefined, // instance default
subjectLineBehavior: undefined, // instance default subjectLineBehavior: undefined, // instance default
alwaysShowSubjectInput: undefined, // instance default alwaysShowSubjectInput: undefined, // instance default
postContentType: undefined, // instance default postContentType: undefined, // instance default

View file

@ -61,6 +61,7 @@ const defaultState = {
showNavShortcuts: true, showNavShortcuts: true,
showWiderShortcuts: true, showWiderShortcuts: true,
sidebarRight: false, sidebarRight: false,
widenTimeline: false,
subjectLineBehavior: 'email', subjectLineBehavior: 'email',
theme: 'pleroma-dark', theme: 'pleroma-dark',
virtualScrolling: true, virtualScrolling: true,