minor tou revisions (#184)

This commit is contained in:
Michael Quigley 2023-01-31 14:04:42 -05:00
parent 02cb398734
commit 75af1eb879
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
4 changed files with 19 additions and 9 deletions

View File

@ -11,14 +11,17 @@
# #
v: 2 v: 2
# The `admin/secrets` array contains a list of strings that represent valid `ZROK_ADMIN_TOKEN` values to be used for admin:
# The `secrets` array contains a list of strings that represent valid `ZROK_ADMIN_TOKEN` values to be used for
# administration of the `zrok` controller. # administration of the `zrok` controller.
# #
# Change this for your installation. # Change this for your installation.
# #
admin:
secrets: secrets:
- 77623cad-1847-4d6d-8ffe-37defc33c909 - 77623cad-1847-4d6d-8ffe-37defc33c909
# if `tou_link` is present, the frontend will display the "Terms of Use" link on the login and registration forms
#
tou_link: '<a href="https://google.com" target="_">Terms and Conditions</a>'
# The `endpoint` section determines where the HTTP listener that serves the API and web console will be bound. # The `endpoint` section determines where the HTTP listener that serves the API and web console will be bound.
# #

View File

@ -17,7 +17,7 @@ const Login = (props) => {
console.log(resp) console.log(resp)
if(!resp.error) { if(!resp.error) {
if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") { if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") {
setTou(<div>Please read the <a href={resp.data.touLink}>Terms of Use</a></div>) setTou(resp.data.touLink)
} }
} }
}).catch(err => { }).catch(err => {
@ -80,7 +80,7 @@ const Login = (props) => {
value={password} value={password}
/> />
</Form.Group> </Form.Group>
{tou}
<Button variant={"light"} type={"submit"}>Log In</Button> <Button variant={"light"} type={"submit"}>Log In</Button>
<div id={"zrok-reset-password"}> <div id={"zrok-reset-password"}>
@ -88,6 +88,7 @@ const Login = (props) => {
Forgot Password? Forgot Password?
</Link> </Link>
</div> </div>
<div id={"zrok-tou"} dangerouslySetInnerHTML={{__html: tou}}></div>
</Form> </Form>
</Row> </Row>
<Row> <Row>

View File

@ -117,3 +117,7 @@ code, pre {
#zrok-reset-password { #zrok-reset-password {
margin-top: 25px; margin-top: 25px;
} }
#zrok-tou {
margin-top: 15px;
}

View File

@ -21,7 +21,7 @@ const SetPasswordForm = (props) => {
console.log(resp) console.log(resp)
if(!resp.error) { if(!resp.error) {
if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") { if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") {
setTou(<div>Please read the <a href={resp.data.touLink}>Terms of Use</a></div>) setTou(resp.data.touLink)
} }
} }
}).catch(err => { }).catch(err => {
@ -89,13 +89,15 @@ const SetPasswordForm = (props) => {
value={confirm} value={confirm}
/> />
</Form.Group> </Form.Group>
{tou}
<Button variant={"light"} type={"submit"}>Register Account</Button> <Button variant={"light"} type={"submit"}>Register Account</Button>
</Form> </Form>
</Row> </Row>
<Row> <Row>
{message} {message}
</Row> </Row>
<Row>
<div id={"zrok-tou"} dangerouslySetInnerHTML={{__html: tou}}></div>
</Row>
</Container> </Container>
</Row> </Row>
</Container> </Container>