TOS and privacy link fixes
parent
7875b9a334
commit
f3e99a9c8c
|
@ -4,6 +4,7 @@ class DashboardController < ApplicationController
|
|||
LONG_REVISION = ENV["BUILT_AT"] || ENV["HEROKU_SLUG_COMMIT"] || "NONE"
|
||||
$FRONTEND_SHARED_DATA = { NODE_ENV: Rails.env || "development",
|
||||
TOS_URL: ENV.fetch("TOS_URL", ""),
|
||||
PRIV_URL: ENV.fetch("PRIV_URL", ""),
|
||||
LONG_REVISION: LONG_REVISION,
|
||||
SHORT_REVISION: LONG_REVISION.first(8) }.to_json
|
||||
def tos_update
|
||||
|
|
|
@ -103,6 +103,7 @@
|
|||
"globalConfig": {
|
||||
"NODE_ENV": "development",
|
||||
"TOS_URL": "https://farmbot.io/tos/",
|
||||
"PRIV_URL": "https://farmbot.io/privacy/",
|
||||
"LONG_REVISION": "------------",
|
||||
"SHORT_REVISION": "--------"
|
||||
}
|
||||
|
|
|
@ -35,6 +35,28 @@
|
|||
color: $blue;
|
||||
display: inline-block;
|
||||
}
|
||||
.tos {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
float: left;
|
||||
margin-right: 0.5rem;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
a:link {
|
||||
font-weight: 300;
|
||||
color: $dark_gray;
|
||||
}
|
||||
a:visited {
|
||||
color: $medium_gray;
|
||||
}
|
||||
a:hover {
|
||||
font-weight: 500;
|
||||
}
|
||||
a:active {
|
||||
color: $medium_gray;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-device-width: 320px) and (max-device-width: 736px) {
|
||||
|
|
|
@ -16,4 +16,12 @@ describe("<FrontPage />", () => {
|
|||
el.find("a.forgot-password").first().simulate("click");
|
||||
expect(el.text()).toContain("Reset Password");
|
||||
});
|
||||
|
||||
it("shows TOS and Privacy links", () => {
|
||||
const el = mount(<FrontPage />);
|
||||
["Privacy Policy", "Terms of Use"].map(string =>
|
||||
expect(el.text()).toContain(string));
|
||||
["https://farmbot.io/privacy/", "https://farmbot.io/tos/"]
|
||||
.map(string => expect(el.html()).toContain(string));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -143,7 +143,7 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
|
|||
const PRV_URL = globalConfig.PRIV_URL;
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<div className={"tos"}>
|
||||
<label>{t("I agree to the terms of use")}</label>
|
||||
<input type="checkbox"
|
||||
onChange={this.set("agreeToTerms")}
|
||||
|
|
Loading…
Reference in New Issue