mirror of
https://github.com/glitch-soc/mastodon
synced 2025-04-24 16:34:50 +00:00
Add option to stretch columns to available width (#3040)
This commit is contained in:
parent
dd3b51c944
commit
0f2407b4c6
5 changed files with 22 additions and 0 deletions
|
@ -169,6 +169,15 @@ class LocalSettingsPage extends PureComponent {
|
|||
<FormattedMessage id='settings.wide_view' defaultMessage='Wide view (Desktop mode only)' />
|
||||
<span className='hint'><FormattedMessage id='settings.wide_view_hint' defaultMessage='Stretches columns to better fill the available space.' /></span>
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['fullwidth_columns']}
|
||||
id='mastodon-settings--fullwidth_columns'
|
||||
onChange={onChange}
|
||||
>
|
||||
<FormattedMessage id='settings.fullwidth_view' defaultMessage='Stretch columns to full width (Desktop mode only)' />
|
||||
<span className='hint'><FormattedMessage id='settings.fullwidth_view_hint' defaultMessage='Stretches columns to fill all the available space.' /></span>
|
||||
</LocalSettingsPageItem>
|
||||
</section>
|
||||
</div>
|
||||
),
|
||||
|
|
|
@ -95,6 +95,7 @@ const mapStateToProps = state => ({
|
|||
hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0,
|
||||
canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4,
|
||||
isWide: state.getIn(['local_settings', 'stretch']),
|
||||
fullWidthColumns: state.getIn(['local_settings', 'fullwidth_columns']),
|
||||
unreadNotifications: selectUnreadNotificationGroupsCount(state),
|
||||
showFaviconBadge: state.getIn(['local_settings', 'notifications', 'favicon_badge']),
|
||||
hicolorPrivacyIcons: state.getIn(['local_settings', 'hicolor_privacy_icons']),
|
||||
|
@ -284,6 +285,7 @@ class UI extends PureComponent {
|
|||
dispatch: PropTypes.func.isRequired,
|
||||
children: PropTypes.node,
|
||||
isWide: PropTypes.bool,
|
||||
fullWidthColumns: PropTypes.bool,
|
||||
systemFontUi: PropTypes.bool,
|
||||
isComposing: PropTypes.bool,
|
||||
hasComposingText: PropTypes.bool,
|
||||
|
@ -624,6 +626,7 @@ class UI extends PureComponent {
|
|||
|
||||
const className = classNames('ui', {
|
||||
'wide': isWide,
|
||||
'fullwidth-columns': this.props.fullWidthColumns,
|
||||
'system-font': this.props.systemFontUi,
|
||||
'hicolor-privacy-icons': this.props.hicolorPrivacyIcons,
|
||||
});
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
"settings.content_warnings_unfold_opts": "Auto-unfolding options",
|
||||
"settings.deprecated_setting": "This setting is now controlled from Mastodon's {settings_page_link}",
|
||||
"settings.enable_content_warnings_auto_unfold": "Automatically unfold content-warnings",
|
||||
"settings.fullwidth_view": "Stretch columns to full width (Desktop mode only)",
|
||||
"settings.fullwidth_view_hint": "Stretches columns to fill all the available space.",
|
||||
"settings.general": "General",
|
||||
"settings.hicolor_privacy_icons": "High color privacy icons",
|
||||
"settings.hicolor_privacy_icons.hint": "Display privacy icons in bright and easily distinguishable colors",
|
||||
|
|
|
@ -6,6 +6,7 @@ import { LOCAL_SETTING_CHANGE, LOCAL_SETTING_DELETE } from 'flavours/glitch/acti
|
|||
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
|
||||
|
||||
const initialState = ImmutableMap({
|
||||
fullwidth_columns: false,
|
||||
stretch : true,
|
||||
side_arm : 'none',
|
||||
side_arm_reply_mode : 'keep',
|
||||
|
|
|
@ -7028,6 +7028,13 @@ img.modal-warning {
|
|||
}
|
||||
}
|
||||
|
||||
.fullwidth-columns .columns-area:not(.columns-area--mobile) {
|
||||
.column {
|
||||
flex: auto;
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.media-gallery__actions {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
|
|
Loading…
Add table
Reference in a new issue