Add usage data link to cookie bar
this opens the analytics modal
This commit is contained in:
parent
6f77b8ae26
commit
aae89efa01
2 changed files with 14 additions and 2 deletions
|
@ -19,6 +19,7 @@ import PropTypes from 'prop-types';
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
|
import Analytics from '../../../Analytics';
|
||||||
|
|
||||||
export default class CookieBar extends React.Component {
|
export default class CookieBar extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -29,6 +30,10 @@ export default class CookieBar extends React.Component {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUsageDataClicked() {
|
||||||
|
Analytics.showDetailsModal();
|
||||||
|
}
|
||||||
|
|
||||||
onAccept() {
|
onAccept() {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'accept_cookies',
|
action: 'accept_cookies',
|
||||||
|
@ -49,11 +54,18 @@ export default class CookieBar extends React.Component {
|
||||||
<img className="mx_MatrixToolbar_warning" src="img/warning.svg" width="24" height="23" alt="Warning" />
|
<img className="mx_MatrixToolbar_warning" src="img/warning.svg" width="24" height="23" alt="Warning" />
|
||||||
<div className="mx_MatrixToolbar_content">
|
<div className="mx_MatrixToolbar_content">
|
||||||
{ this.props.policyUrl ? _t(
|
{ this.props.policyUrl ? _t(
|
||||||
"Help improve Riot by sending usage data? " +
|
"Help improve Riot by sending <UsageDataLink>usage data</UsageDataLink>? " +
|
||||||
"This will use a cookie. " +
|
"This will use a cookie. " +
|
||||||
"(See our <PolicyLink>cookie and privacy policies</PolicyLink>).",
|
"(See our <PolicyLink>cookie and privacy policies</PolicyLink>).",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
|
'UsageDataLink': (sub) => <a
|
||||||
|
className="mx_MatrixToolbar_link"
|
||||||
|
href="javascript:;"
|
||||||
|
onClick={this.onUsageDataClicked}
|
||||||
|
>
|
||||||
|
{ sub }
|
||||||
|
</a>,
|
||||||
// XXX: We need to link to the page that explains our cookies
|
// XXX: We need to link to the page that explains our cookies
|
||||||
'PolicyLink': (sub) => <a
|
'PolicyLink': (sub) => <a
|
||||||
className="mx_MatrixToolbar_link"
|
className="mx_MatrixToolbar_link"
|
||||||
|
|
|
@ -636,7 +636,7 @@
|
||||||
"Something went wrong when trying to get your communities.": "Something went wrong when trying to get your communities.",
|
"Something went wrong when trying to get your communities.": "Something went wrong when trying to get your communities.",
|
||||||
"Display your community flair in rooms configured to show it.": "Display your community flair in rooms configured to show it.",
|
"Display your community flair in rooms configured to show it.": "Display your community flair in rooms configured to show it.",
|
||||||
"You're not currently a member of any communities.": "You're not currently a member of any communities.",
|
"You're not currently a member of any communities.": "You're not currently a member of any communities.",
|
||||||
"Help improve Riot by sending usage data? This will use a cookie. (See our <PolicyLink>cookie and privacy policies</PolicyLink>).": "Help improve Riot by sending usage data? This will use a cookie. (See our <PolicyLink>cookie and privacy policies</PolicyLink>).",
|
"Help improve Riot by sending <UsageDataLink>usage data</UsageDataLink>? This will use a cookie. (See our <PolicyLink>cookie and privacy policies</PolicyLink>).": "Help improve Riot by sending <UsageDataLink>usage data</UsageDataLink>? This will use a cookie. (See our <PolicyLink>cookie and privacy policies</PolicyLink>).",
|
||||||
"Help improve Riot by sending usage data? This will use a cookie.": "Help improve Riot by sending usage data? This will use a cookie.",
|
"Help improve Riot by sending usage data? This will use a cookie.": "Help improve Riot by sending usage data? This will use a cookie.",
|
||||||
"Yes please": "Yes please",
|
"Yes please": "Yes please",
|
||||||
"You are not receiving desktop notifications": "You are not receiving desktop notifications",
|
"You are not receiving desktop notifications": "You are not receiving desktop notifications",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue