Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: add missing legal notice to Sign in page (#396)

Guilherme Oenningc2ebd43aa401
diff --git a/public/components/common/Legal.tsx b/public/components/common/Legal.tsx
index 9d3ce3c68..f635c1135 100644
--- a/public/components/common/Legal.tsx
+++ b/public/components/common/Legal.tsx
@@ -18,13 +18,22 @@ interface LegalAgreementProps {
onChange: (agrred: boolean) => void;
}
+export const LegalNotice: React.StatelessComponent<{}> = () => {
+ if (page.systemSettings().hasLegal) {
+ return (
+ <p className="info">
+ By signing in, you agree to the {privacy} and {terms}.
+ </p>
+ );
+ }
+ return null;
+};
+
export const LegalFooter: React.StatelessComponent<{}> = () => {
if (page.systemSettings().hasLegal) {
return (
<Modal.Footer align="center">
- <p className="info">
- By signing in, you agree to the {privacy} and {terms}.
- </p>
+ <LegalNotice />
</Modal.Footer>
);
}
diff --git a/public/pages/SignIn/SignIn.page.scss b/public/pages/SignIn/SignIn.page.scss
index d44199cd0..3c89d6c98 100644
--- a/public/pages/SignIn/SignIn.page.scss
+++ b/public/pages/SignIn/SignIn.page.scss
@@ -3,10 +3,10 @@
#p-signin {
margin-top: 50px;
max-width: 500px !important;
+ text-align: center;
.message {
max-width: 300px;
- text-align: center;
margin: 0 auto;
margin-bottom: 20px;
img {
diff --git a/public/pages/SignIn/SignIn.page.tsx b/public/pages/SignIn/SignIn.page.tsx
index 70e471410..413241f6c 100644
--- a/public/pages/SignIn/SignIn.page.tsx
+++ b/public/pages/SignIn/SignIn.page.tsx
@@ -1,7 +1,7 @@
import "./SignIn.page.scss";
import * as React from "react";
-import { SignInControl, Logo } from "@fider/components/common";
+import { SignInControl, Logo, LegalNotice } from "@fider/components";
import { page, notify } from "@fider/services";
import { Tenant } from "@fider/models";
@@ -34,6 +34,7 @@ export class SignInPage extends React.Component<SignInPageProps, {}> {
<p>If you have an account or an invitation, you may use following options to sign in.</p>
</div>
<SignInControl onEmailSent={this.onEmailSent} useEmail={true} redirectTo={page.getBaseUrl()} />
+ <LegalNotice />
</div>
);
}