Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: buttons on security page dont work #81

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions js/src/forum/components/LinkStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import app from 'flarum/forum/app';
import Component, { ComponentAttrs } from 'flarum/common/Component';
import icon from 'flarum/common/helpers/icon';
import Button from 'flarum/common/components/Button';
import Link from 'flarum/common/components/Link';
import type Mithril from 'mithril';
import LinkedAccount from '../models/LinkedAccount';
import User from 'flarum/common/models/User';
Expand Down Expand Up @@ -73,16 +74,17 @@ export default class LinkStatus extends Component<IAttrs> {
} else if (!provider.orphaned() && (user.id() === app.session.user?.id() || !app.forum.attribute<boolean>('fofOauthModerate'))) {
return (
<div className="LinkedAccountsList-item-actions">
<Button
<Link
className={`Button FoFLogInButton LogInButton--${provider.name()}`}
icon={provider.icon()}
path={`/auth/${provider.name()}?linkTo=${user.id()}`}
href={`${app.forum.attribute('baseUrl')}/auth/${provider.name()}?linkTo=${user.id()}`}
loading={this.state.loading}
external={true}
>
{app.translator.trans(`fof-oauth.forum.log_in.with_${provider.name()}_button`, {
provider: app.translator.trans(`fof-oauth.forum.providers.${provider.name()}`),
})}
</Button>
</Link>
</div>
);
}
Expand Down
Loading