summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTrevor Wolf <teeerevor@gmail.com>2023-07-11 20:26:09 +1000
committerGitHub <noreply@github.com>2023-07-11 12:26:09 +0200
commitea10febd257b5b729a50aeb3218389763f5f4b97 (patch)
treee19b13cf558f132663bb5d71c358dd7b4be0fac2 /app
parent99be47f8b9a051fe409690ba157789958a587d12 (diff)
fix buttons showing inconsistent styles (#25903)
Diffstat (limited to 'app')
-rw-r--r--app/helpers/accounts_helper.rb2
-rw-r--r--app/javascript/mastodon/features/account/components/header.jsx8
-rw-r--r--app/javascript/mastodon/features/directory/components/account_card.jsx10
-rw-r--r--app/javascript/styles/mastodon-light/diff.scss8
-rw-r--r--app/javascript/styles/mastodon/components.scss4
-rw-r--r--app/javascript/styles/mastodon/statuses.scss60
6 files changed, 10 insertions, 82 deletions
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb
index 6301919a9e1..c82dc492dca 100644
--- a/app/helpers/accounts_helper.rb
+++ b/app/helpers/accounts_helper.rb
@@ -22,7 +22,7 @@ module AccountsHelper
def account_action_button(account)
return if account.memorial? || account.moved?
- link_to ActivityPub::TagManager.instance.url_for(account), class: 'button logo-button', target: '_new' do
+ link_to ActivityPub::TagManager.instance.url_for(account), class: 'button', target: '_new' do
safe_join([logo_as_symbol, t('accounts.follow')])
end
end
diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx
index d95184cdbd9..ececb86c083 100644
--- a/app/javascript/mastodon/features/account/components/header.jsx
+++ b/app/javascript/mastodon/features/account/components/header.jsx
@@ -264,14 +264,14 @@ class Header extends ImmutablePureComponent {
if (signedIn && !account.get('relationship')) { // Wait until the relationship is loaded
actionBtn = '';
} else if (account.getIn(['relationship', 'requested'])) {
- actionBtn = <Button className={classNames('logo-button', { 'button--with-bell': bellBtn !== '' })} text={intl.formatMessage(messages.cancel_follow_request)} title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />;
+ actionBtn = <Button className={classNames({ 'button--with-bell': bellBtn !== '' })} text={intl.formatMessage(messages.cancel_follow_request)} title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />;
} else if (!account.getIn(['relationship', 'blocking'])) {
- actionBtn = <Button disabled={account.getIn(['relationship', 'blocked_by'])} className={classNames('logo-button', { 'button--destructive': account.getIn(['relationship', 'following']), 'button--with-bell': bellBtn !== '' })} text={intl.formatMessage(account.getIn(['relationship', 'following']) ? messages.unfollow : messages.follow)} onClick={signedIn ? this.props.onFollow : this.props.onInteractionModal} />;
+ actionBtn = <Button disabled={account.getIn(['relationship', 'blocked_by'])} className={classNames({ 'button--destructive': account.getIn(['relationship', 'following']), 'button--with-bell': bellBtn !== '' })} text={intl.formatMessage(account.getIn(['relationship', 'following']) ? messages.unfollow : messages.follow)} onClick={signedIn ? this.props.onFollow : this.props.onInteractionModal} />;
} else if (account.getIn(['relationship', 'blocking'])) {
- actionBtn = <Button className='logo-button' text={intl.formatMessage(messages.unblock, { name: account.get('username') })} onClick={this.props.onBlock} />;
+ actionBtn = <Button text={intl.formatMessage(messages.unblock, { name: account.get('username') })} onClick={this.props.onBlock} />;
}
} else {
- actionBtn = <Button className='logo-button' text={intl.formatMessage(messages.edit_profile)} onClick={this.openEditProfile} />;
+ actionBtn = <Button text={intl.formatMessage(messages.edit_profile)} onClick={this.openEditProfile} />;
}
if (account.get('moved') && !account.getIn(['relationship', 'following'])) {
diff --git a/app/javascript/mastodon/features/directory/components/account_card.jsx b/app/javascript/mastodon/features/directory/components/account_card.jsx
index 79597953030..0306b63d322 100644
--- a/app/javascript/mastodon/features/directory/components/account_card.jsx
+++ b/app/javascript/mastodon/features/directory/components/account_card.jsx
@@ -160,16 +160,16 @@ class AccountCard extends ImmutablePureComponent {
if (!account.get('relationship')) { // Wait until the relationship is loaded
actionBtn = '';
} else if (account.getIn(['relationship', 'requested'])) {
- actionBtn = <Button className={classNames('logo-button')} text={intl.formatMessage(messages.cancel_follow_request)} title={intl.formatMessage(messages.requested)} onClick={this.handleFollow} />;
+ actionBtn = <Button text={intl.formatMessage(messages.cancel_follow_request)} title={intl.formatMessage(messages.requested)} onClick={this.handleFollow} />;
} else if (account.getIn(['relationship', 'muting'])) {
- actionBtn = <Button className='logo-button' text={intl.formatMessage(messages.unmute)} onClick={this.handleMute} />;
+ actionBtn = <Button text={intl.formatMessage(messages.unmute)} onClick={this.handleMute} />;
} else if (!account.getIn(['relationship', 'blocking'])) {
- actionBtn = <Button disabled={account.getIn(['relationship', 'blocked_by'])} className={classNames('logo-button', { 'button--destructive': account.getIn(['relationship', 'following']) })} text={intl.formatMessage(account.getIn(['relationship', 'following']) ? messages.unfollow : messages.follow)} onClick={this.handleFollow} />;
+ actionBtn = <Button disabled={account.getIn(['relationship', 'blocked_by'])} className={classNames({ 'button--destructive': account.getIn(['relationship', 'following']) })} text={intl.formatMessage(account.getIn(['relationship', 'following']) ? messages.unfollow : messages.follow)} onClick={this.handleFollow} />;
} else if (account.getIn(['relationship', 'blocking'])) {
- actionBtn = <Button className='logo-button' text={intl.formatMessage(messages.unblock)} onClick={this.handleBlock} />;
+ actionBtn = <Button text={intl.formatMessage(messages.unblock)} onClick={this.handleBlock} />;
}
} else {
- actionBtn = <Button className='logo-button' text={intl.formatMessage(messages.edit_profile)} onClick={this.handleEditProfile} />;
+ actionBtn = <Button text={intl.formatMessage(messages.edit_profile)} onClick={this.handleEditProfile} />;
}
return (
diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss
index 9f33a5c9cc4..f7835ac2f49 100644
--- a/app/javascript/styles/mastodon-light/diff.scss
+++ b/app/javascript/styles/mastodon-light/diff.scss
@@ -627,14 +627,6 @@ html {
}
}
-.button.logo-button {
- color: $white;
-
- svg {
- fill: $white;
- }
-}
-
.notification__filter-bar button.active::after,
.account__section-headline a.active::after {
border-color: transparent transparent $white;
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index c1249fe7184..488fb167029 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -1670,10 +1670,6 @@ a.account__display-name {
color: inherit;
}
-.detailed-status .button.logo-button {
- margin-bottom: 15px;
-}
-
.detailed-status__display-name {
color: $darker-text-color;
display: flex;
diff --git a/app/javascript/styles/mastodon/statuses.scss b/app/javascript/styles/mastodon/statuses.scss
index 590d03fb8db..e093bdf97b6 100644
--- a/app/javascript/styles/mastodon/statuses.scss
+++ b/app/javascript/styles/mastodon/statuses.scss
@@ -77,66 +77,6 @@
}
}
-.button.logo-button {
- flex: 0 auto;
- font-size: 14px;
- background: darken($ui-highlight-color, 2%);
- color: $primary-text-color;
- text-transform: none;
- line-height: 1.2;
- height: auto;
- min-height: 36px;
- min-width: 88px;
- white-space: normal;
- overflow-wrap: break-word;
- hyphens: auto;
- padding: 0 15px;
- border: 0;
-
- svg {
- width: 20px;
- height: auto;
- vertical-align: middle;
- margin-inline-end: 5px;
- fill: $primary-text-color;
- }
-
- &:active,
- &:focus,
- &:hover {
- background: $ui-highlight-color;
- }
-
- &:disabled,
- &.disabled {
- &:active,
- &:focus,
- &:hover {
- background: $ui-primary-color;
- }
- }
-
- &.button--destructive {
- &:active,
- &:focus,
- &:hover {
- background: $error-red;
- }
- }
-
- @media screen and (max-width: $no-gap-breakpoint) {
- svg {
- display: none;
- }
- }
-}
-
-a.button.logo-button {
- display: inline-flex;
- align-items: center;
- justify-content: center;
-}
-
.embed {
.status__content[data-spoiler='folded'] {
.e-content {