From e2a5a85c4eb8e2444cd3f7dc61ee5e8c246ee01c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 4 May 2021 14:51:16 -0400 Subject: [PATCH] Add a link to joinlemmy on lemmy.ml signup. Fixes #235 --- src/shared/components/login.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/shared/components/login.tsx b/src/shared/components/login.tsx index 7a305f5..c8ce80f 100644 --- a/src/shared/components/login.tsx +++ b/src/shared/components/login.tsx @@ -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; @@ -83,6 +85,10 @@ export class Login extends Component { return `${i18n.t("login")} - ${this.state.site_view.site.name}`; } + get isLemmyMl(): boolean { + return isBrowser() && window.location.hostname == "lemmy.ml"; + } + render() { return (
@@ -296,6 +302,13 @@ export class Login extends Component {
)} + {this.isLemmyMl && ( + + )}