Add policyLink configuration to piwik

Also:
 - Make CookieBar ES6 class
 - Alter phrasing on CookieBar
 - Conditionaly display longer "...(See our ++cookie and privacy
   policies++)." if policy link is configured.
This commit is contained in:
Luke Barnard 2018-05-16 15:49:23 +01:00
parent 4e6594d64b
commit d15051a635
3 changed files with 35 additions and 28 deletions

View file

@ -355,7 +355,8 @@ const LoggedInView = React.createClass({
let topBar;
const isGuest = this.props.matrixClient.isGuest();
if (this.props.showCookieBar) {
topBar = <CookieBar />;
const policyUrl = this.props.config.piwik ? (this.props.config.piwik.policyUrl || null) : null;
topBar = <CookieBar policyUrl={policyUrl} />;
} else if (this.props.hasNewVersion) {
topBar = <NewVersionBar version={this.props.version} newVersion={this.props.newVersion}
releaseNotes={this.props.newVersionReleaseNotes}