diff options
author | Jorik Schellekens <joriks@matrix.org> | 2019-08-12 15:53:32 +0100 |
---|---|---|
committer | Jorik Schellekens <joriks@matrix.org> | 2019-08-28 15:59:53 +0100 |
commit | 6744c080d79441b3b08df405077efcb7648210ca (patch) | |
tree | 8a475f5bed5182e02c2f6d4334d89a35cf19494d | |
parent | Start moving to accordion. (diff) | |
download | synapse-6744c080d79441b3b08df405077efcb7648210ca.tar.xz |
Changes in structure.
-rw-r--r-- | synapse_topology/view/webui/js/components/ServerName.jsx | 2 | ||||
-rw-r--r-- | synapse_topology/view/webui/js/components/StatsReporter.jsx | 24 |
2 files changed, 16 insertions, 10 deletions
diff --git a/synapse_topology/view/webui/js/components/ServerName.jsx b/synapse_topology/view/webui/js/components/ServerName.jsx index 958f7cf994..f3ee11dfe4 100644 --- a/synapse_topology/view/webui/js/components/ServerName.jsx +++ b/synapse_topology/view/webui/js/components/ServerName.jsx @@ -27,7 +27,7 @@ export default ({ onClick }) => { </p> <input type="text" onChange={onChange} autoFocus placeholder="Enter server name"></input> <div> - <button disabled={servername ? undefined : true} onClick={() => onClick(servername)}>Continue</button> + <button disabled={servername ? undefined : true} onClick={() => onClick(servername)}>Next</button> </div> </Card.Body> </Accordion.Collapse> diff --git a/synapse_topology/view/webui/js/components/StatsReporter.jsx b/synapse_topology/view/webui/js/components/StatsReporter.jsx index 47ce55b521..d5f03d8d89 100644 --- a/synapse_topology/view/webui/js/components/StatsReporter.jsx +++ b/synapse_topology/view/webui/js/components/StatsReporter.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import React, { useState } from 'react'; import style from '../../less/main.less'; -import ButtonDisplay from './ButtonDisplay'; import Accordion from 'react-bootstrap/Accordion'; import Card from 'react-bootstrap/Card'; import { STATS_REPORT_UI } from '../reducers/ui_constants'; -export default ({ onClick }) => - <Card> +export default ({ onClick }) => { + const [consent, setConsent] = useState(true); + + return <Card> <Accordion.Toggle as={Card.Header} eventKey={STATS_REPORT_UI}> Anonymous Statistics </Accordion.Toggle> @@ -20,10 +21,15 @@ export default ({ onClick }) => Your server will send anonymised, aggregated statistics to matrix.org on user usage so we can measure the health of the Matrix ecosystem. </p> - <ButtonDisplay> - <button onClick={() => onClick(true)}>YES</button> - <button onClick={() => onClick(false)} className={style.redButton}>NO</button> - </ButtonDisplay> + <label> + <input + type="checkbox" + onChange={event => setConsent(event.target.checked)} + /> + Yes, send anonymous statistics + </label> + <button onClick={() => onClick(consent)}>Next</button> </Card.Body> </Accordion.Collapse> - </Card > \ No newline at end of file + </Card > +} \ No newline at end of file |