Skip to content

Commit

Permalink
Add a link to joinlemmy on lemmy.ml signup. Fixes #235
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed May 4, 2021
1 parent d174b53 commit e2a5a85
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/shared/components/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ import {
wsUserOp,
wsClient,
authField,
joinLemmyUrl,
} from "../utils";
import { i18n } from "../i18next";
import { HtmlTags } from "./html-tags";
import { Icon, Spinner } from "./icon";
import { T } from "inferno-i18next";

interface State {
loginForm: LoginForm;
Expand Down Expand Up @@ -83,6 +85,10 @@ export class Login extends Component<any, State> {
return `${i18n.t("login")} - ${this.state.site_view.site.name}`;
}

get isLemmyMl(): boolean {
return isBrowser() && window.location.hostname == "lemmy.ml";
}

render() {
return (
<div class="container">
Expand Down Expand Up @@ -296,6 +302,13 @@ export class Login extends Component<any, State> {
</div>
</div>
)}
{this.isLemmyMl && (
<div class="mt-2 mb-0 alert alert-light" role="alert">
<T i18nKey="lemmy_ml_registration_message">
#<a href={joinLemmyUrl}>#</a>
</T>
</div>
)}
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-secondary">
Expand Down

0 comments on commit e2a5a85

Please sign in to comment.