From: Dessalines Date: Tue, 4 May 2021 18:51:16 +0000 (-0400) Subject: Add a link to joinlemmy on lemmy.ml signup. Fixes #235 X-Git-Url: http://these/git/%7B%60%24%7Bdocument.location.origin%7D/feeds/readmes/README.ru.md?a=commitdiff_plain;h=e2a5a85c4eb8e2444cd3f7dc61ee5e8c246ee01c;p=lemmy-ui.git Add a link to joinlemmy on lemmy.ml signup. Fixes #235 --- 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 && ( + + )}