From b08d2d4f78e143189c0dc3470a8dc186bf441419 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 23 Dec 2020 19:55:23 +0100 Subject: Fix media modal buttons not showing up on mobile (#15417) Fixes #15374 When the pop-out player was introduced, it had tweaks for the mobile view, but it's now disabled in mobile mode and the styling was reused for modals, causing the footer to be hidden on mobile without a good reason. Co-authored-by: Claire --- app/javascript/styles/mastodon/components.scss | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 2163d74fc..c248f681e 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -7194,21 +7194,6 @@ noscript { .audio-player { border-radius: 0; } - - @media screen and (max-width: 415px) { - width: 210px; - bottom: 10px; - right: 10px; - - &__footer { - display: none; - } - - .video-player, - .audio-player { - border-radius: 0 0 4px 4px; - } - } } .picture-in-picture-placeholder { -- cgit From ba748a83f2050dff27758bce67c05d37a8b7d8f3 Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Sun, 27 Dec 2020 07:50:34 +0900 Subject: Fix logo button style (#15428) * Fix bell button rtl style * Remove size and style props from button component * Fix logo button style * Update jest snapshot --- .../__tests__/__snapshots__/button-test.js.snap | 49 ---------------------- app/javascript/mastodon/components/button.js | 14 ------- .../mastodon/features/account/components/header.js | 12 +++--- app/javascript/styles/mastodon/components.scss | 5 +++ app/javascript/styles/mastodon/containers.scss | 5 +++ app/javascript/styles/mastodon/rtl.scss | 5 +++ app/javascript/styles/mastodon/statuses.scss | 9 +++- 7 files changed, 28 insertions(+), 71 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap index 5c04e0979..86fbba917 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap @@ -4,13 +4,6 @@ exports[` @@ -95,13 +53,6 @@ exports[` diff --git a/app/javascript/mastodon/components/button.js b/app/javascript/mastodon/components/button.js index eb8dd7dc8..85b2d78ca 100644 --- a/app/javascript/mastodon/components/button.js +++ b/app/javascript/mastodon/components/button.js @@ -10,17 +10,11 @@ export default class Button extends React.PureComponent { disabled: PropTypes.bool, block: PropTypes.bool, secondary: PropTypes.bool, - size: PropTypes.number, className: PropTypes.string, title: PropTypes.string, - style: PropTypes.object, children: PropTypes.node, }; - static defaultProps = { - size: 36, - }; - handleClick = (e) => { if (!this.props.disabled) { this.props.onClick(e); @@ -36,13 +30,6 @@ export default class Button extends React.PureComponent { } render () { - const style = { - padding: `0 ${this.props.size / 2.25}px`, - height: `${this.props.size}px`, - lineHeight: `${this.props.size}px`, - ...this.props.style, - }; - const className = classNames('button', this.props.className, { 'button-secondary': this.props.secondary, 'button--block': this.props.block, @@ -54,7 +41,6 @@ export default class Button extends React.PureComponent { disabled={this.props.disabled} onClick={this.handleClick} ref={this.setRef} - style={style} title={this.props.title} > {this.props.text || this.props.children} diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index c8fd85e1d..b47ebed62 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -164,13 +164,17 @@ class Header extends ImmutablePureComponent { info.push(); } + if (account.getIn(['relationship', 'requested']) || account.getIn(['relationship', 'following'])) { + bellBtn = ; + } + if (me !== account.get('id')) { if (!account.get('relationship')) { // Wait until the relationship is loaded actionBtn = ''; } else if (account.getIn(['relationship', 'requested'])) { - actionBtn =