mirror of https://github.com/Siphonay/mastodon
Remove leftovers from glitch-soc's layout option
This commit is contained in:
parent
189b70cd6a
commit
f6f62002c7
|
@ -70,7 +70,6 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
singleColumn: PropTypes.bool,
|
singleColumn: PropTypes.bool,
|
||||||
lang: PropTypes.string,
|
lang: PropTypes.string,
|
||||||
advancedOptions: ImmutablePropTypes.map,
|
advancedOptions: ImmutablePropTypes.map,
|
||||||
layout: PropTypes.string,
|
|
||||||
media: ImmutablePropTypes.list,
|
media: ImmutablePropTypes.list,
|
||||||
sideArm: PropTypes.string,
|
sideArm: PropTypes.string,
|
||||||
sensitive: PropTypes.bool,
|
sensitive: PropTypes.bool,
|
||||||
|
@ -259,7 +258,6 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
intl,
|
intl,
|
||||||
advancedOptions,
|
advancedOptions,
|
||||||
isSubmitting,
|
isSubmitting,
|
||||||
layout,
|
|
||||||
onChangeSpoilerness,
|
onChangeSpoilerness,
|
||||||
onPaste,
|
onPaste,
|
||||||
privacy,
|
privacy,
|
||||||
|
@ -313,7 +311,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
|
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
|
||||||
onSuggestionSelected={this.onSuggestionSelected}
|
onSuggestionSelected={this.onSuggestionSelected}
|
||||||
onPaste={onPaste}
|
onPaste={onPaste}
|
||||||
autoFocus={!showSearch && !isMobile(window.innerWidth, layout)}
|
autoFocus={!showSearch && !isMobile(window.innerWidth)}
|
||||||
lang={this.props.lang}
|
lang={this.props.lang}
|
||||||
>
|
>
|
||||||
<TextareaIcons advancedOptions={advancedOptions} />
|
<TextareaIcons advancedOptions={advancedOptions} />
|
||||||
|
|
|
@ -71,7 +71,6 @@ const mapStateToProps = state => ({
|
||||||
isInReply: state.getIn(['compose', 'in_reply_to']) !== null,
|
isInReply: state.getIn(['compose', 'in_reply_to']) !== null,
|
||||||
lang: state.getIn(['compose', 'language']),
|
lang: state.getIn(['compose', 'language']),
|
||||||
advancedOptions: state.getIn(['compose', 'advanced_options']),
|
advancedOptions: state.getIn(['compose', 'advanced_options']),
|
||||||
layout: state.getIn(['local_settings', 'layout']),
|
|
||||||
media: state.getIn(['compose', 'media_attachments']),
|
media: state.getIn(['compose', 'media_attachments']),
|
||||||
sideArm: sideArmPrivacy(state),
|
sideArm: sideArmPrivacy(state),
|
||||||
sensitive: state.getIn(['compose', 'sensitive']),
|
sensitive: state.getIn(['compose', 'sensitive']),
|
||||||
|
|
|
@ -602,18 +602,7 @@ class UI extends PureComponent {
|
||||||
const { draggingOver } = this.state;
|
const { draggingOver } = this.state;
|
||||||
const { children, isWide, location, dropdownMenuIsOpen, layout, moved } = this.props;
|
const { children, isWide, location, dropdownMenuIsOpen, layout, moved } = this.props;
|
||||||
|
|
||||||
const columnsClass = layout => {
|
const className = classNames('ui', {
|
||||||
switch (layout) {
|
|
||||||
case 'single':
|
|
||||||
return 'single-column';
|
|
||||||
case 'multiple':
|
|
||||||
return 'multi-columns';
|
|
||||||
default:
|
|
||||||
return 'auto-columns';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const className = classNames('ui', columnsClass(layout), {
|
|
||||||
'wide': isWide,
|
'wide': isWide,
|
||||||
'system-font': this.props.systemFontUi,
|
'system-font': this.props.systemFontUi,
|
||||||
'hicolor-privacy-icons': this.props.hicolorPrivacyIcons,
|
'hicolor-privacy-icons': this.props.hicolorPrivacyIcons,
|
||||||
|
|
|
@ -14,9 +14,7 @@ const initialState = ImmutableMap({
|
||||||
export default function meta(state = initialState, action) {
|
export default function meta(state = initialState, action) {
|
||||||
switch(action.type) {
|
switch(action.type) {
|
||||||
case STORE_HYDRATE:
|
case STORE_HYDRATE:
|
||||||
return state.merge(action.state.get('meta'))
|
return state.merge(action.state.get('meta')).set('permissions', action.state.getIn(['role', 'permissions']));
|
||||||
.set('permissions', action.state.getIn(['role', 'permissions']))
|
|
||||||
.set('layout', layoutFromWindow(action.state.getIn(['local_settings', 'layout'])));
|
|
||||||
case changeLayout.type:
|
case changeLayout.type:
|
||||||
return state.set('layout', action.payload.layout);
|
return state.set('layout', action.payload.layout);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -10,37 +10,6 @@
|
||||||
background-size: $size $size;
|
background-size: $size $size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin single-column($media, $parent: '&') {
|
|
||||||
.auto-columns #{$parent} {
|
|
||||||
@media #{$media} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.single-column #{$parent} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin limited-single-column($media, $parent: '&') {
|
|
||||||
.auto-columns #{$parent},
|
|
||||||
.single-column #{$parent} {
|
|
||||||
@media #{$media} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin multi-columns($media, $parent: '&') {
|
|
||||||
.auto-columns #{$parent} {
|
|
||||||
@media #{$media} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.multi-columns #{$parent} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin fullwidth-gallery {
|
@mixin fullwidth-gallery {
|
||||||
&.full-width {
|
&.full-width {
|
||||||
margin-left: -14px;
|
margin-left: -14px;
|
||||||
|
|
|
@ -496,7 +496,7 @@ body > [data-popper-placement] {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include single-column('screen and (max-width: 630px)') {
|
@media screen and (width <= 600px) {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@ body > [data-popper-placement] {
|
||||||
all: unset;
|
all: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include limited-single-column('screen and (max-width: 600px)') {
|
@media screen and (width <= 600px) {
|
||||||
height: 100px !important; // Prevent auto-resize textarea
|
height: 100px !important; // Prevent auto-resize textarea
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
@ -3040,10 +3040,6 @@ $ui-header-height: 55px;
|
||||||
border-bottom-color: $ui-highlight-color;
|
border-bottom-color: $ui-highlight-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include limited-single-column('screen and (max-width: 600px)') {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
color: $inverted-text-color;
|
color: $inverted-text-color;
|
||||||
border-bottom: 2px solid lighten($ui-base-color, 27%);
|
border-bottom: 2px solid lighten($ui-base-color, 27%);
|
||||||
|
@ -3054,6 +3050,10 @@ $ui-header-height: 55px;
|
||||||
border-bottom-color: $ui-highlight-color;
|
border-bottom-color: $ui-highlight-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (width <= 600px) {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-card {
|
.status-card {
|
||||||
|
@ -6827,11 +6827,11 @@ img.modal-warning {
|
||||||
padding-inline-end: 10px;
|
padding-inline-end: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include single-column('screen and (max-width: 630px)') {
|
@media screen and (width <= 630px) {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include limited-single-column('screen and (max-width: 630px)') {
|
@media screen and (width <= 630px) {
|
||||||
&,
|
&,
|
||||||
&:first-child,
|
&:first-child,
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
@ -6845,7 +6845,7 @@ img.modal-warning {
|
||||||
flex: 1 1 200px;
|
flex: 1 1 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include single-column('screen and (max-width: 630px)') {
|
@media screen and (width <= 630px) {
|
||||||
:root & {
|
:root & {
|
||||||
// Overrides `.wide` for single-column view
|
// Overrides `.wide` for single-column view
|
||||||
flex: auto;
|
flex: auto;
|
||||||
|
@ -6862,12 +6862,11 @@ img.modal-warning {
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
@include limited-single-column(
|
@media screen and (max-width: $no-gap-breakpoint) {
|
||||||
'screen and (max-width: #{$no-gap-breakpoint})'
|
|
||||||
) {
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@include single-column('screen and (max-width: 630px)') {
|
|
||||||
|
@media screen and (width <= 630px) {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue