Skip to content

Commit

Permalink
weh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jun 30, 2024
1 parent 120d17d commit 7361f58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/javascript/flavours/blobfox/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ class Status extends ImmutablePureComponent {
mediaIcons={contentMediaIcons}
expanded={isExpanded}
collapsed={isCollapsed}

collapseHeight={settings.getIn(['collapsed', 'auto', 'height'])}
onExpandedToggle={this.handleExpandedToggle}
onTranslate={this.handleTranslate}
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/flavours/blobfox/components/status_content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class StatusContent extends PureComponent {
statusContent: PropTypes.string,
expanded: PropTypes.bool,
collapsed: PropTypes.bool,
autoCollapsed: PropTypes.bool,
onExpandedToggle: PropTypes.func,
onTranslate: PropTypes.func,
media: PropTypes.node,
Expand Down Expand Up @@ -157,6 +158,7 @@ class StatusContent extends PureComponent {
state = {
hidden: true,
collapsed: false,
autoCollapsed: false,
};

_updateStatusLinks () {
Expand Down Expand Up @@ -345,8 +347,10 @@ class StatusContent extends PureComponent {
} = this.props;

let collapse = false
let autoCollapse = false

collapse = this.props.collapsed
autoCollapse = this.props.autoCollapsed

const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
const contentLocale = intl.locale.replace(/[_-].*/, '');
Expand Down Expand Up @@ -379,6 +383,10 @@ class StatusContent extends PureComponent {
collapsedHeight += 210;
}

if (!autoCollapse) (
collapsedHeight = 20
)

if (status.get('spoiler_text').length > 0) {
let mentionsPlaceholder = '';

Expand Down
5 changes: 2 additions & 3 deletions app/javascript/flavours/blobfox/styles/components/status.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@
height: 20px;
overflow: hidden;
text-overflow: ellipsis;
padding-top: 0;

&::after {
content: '';
Expand All @@ -342,8 +341,8 @@
inset-inline-start: 0;
inset-inline-end: 0;
background: linear-gradient(
rgba($ui-base-color, 0),
rgba($ui-base-color, 1)
rgba($ui-base-color, 0) 0.1em,
rgba($ui-base-color, 1) 4em
);
pointer-events: none;
}
Expand Down

0 comments on commit 7361f58

Please sign in to comment.