mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Merge branch 'experimental' into travis/usettings/tab/security
This commit is contained in:
commit
f7f23e4dea
11 changed files with 372 additions and 56 deletions
|
@ -56,6 +56,7 @@
|
||||||
@import "./views/dialogs/_SetEmailDialog.scss";
|
@import "./views/dialogs/_SetEmailDialog.scss";
|
||||||
@import "./views/dialogs/_SetMxIdDialog.scss";
|
@import "./views/dialogs/_SetMxIdDialog.scss";
|
||||||
@import "./views/dialogs/_SetPasswordDialog.scss";
|
@import "./views/dialogs/_SetPasswordDialog.scss";
|
||||||
|
@import "./views/dialogs/_SettingsDialog.scss";
|
||||||
@import "./views/dialogs/_ShareDialog.scss";
|
@import "./views/dialogs/_ShareDialog.scss";
|
||||||
@import "./views/dialogs/_UnknownDeviceDialog.scss";
|
@import "./views/dialogs/_UnknownDeviceDialog.scss";
|
||||||
@import "./views/dialogs/_UserSettingsDialog.scss";
|
@import "./views/dialogs/_UserSettingsDialog.scss";
|
||||||
|
@ -136,6 +137,7 @@
|
||||||
@import "./views/settings/_PhoneNumbers.scss";
|
@import "./views/settings/_PhoneNumbers.scss";
|
||||||
@import "./views/settings/_ProfileSettings.scss";
|
@import "./views/settings/_ProfileSettings.scss";
|
||||||
@import "./views/settings/tabs/_GeneralSettingsTab.scss";
|
@import "./views/settings/tabs/_GeneralSettingsTab.scss";
|
||||||
|
@import "./views/settings/tabs/_HelpSettingsTab.scss";
|
||||||
@import "./views/settings/tabs/_PreferencesSettingsTab.scss";
|
@import "./views/settings/tabs/_PreferencesSettingsTab.scss";
|
||||||
@import "./views/settings/tabs/_SecuritySettingsTab.scss";
|
@import "./views/settings/tabs/_SecuritySettingsTab.scss";
|
||||||
@import "./views/settings/tabs/_SettingsTab.scss";
|
@import "./views/settings/tabs/_SettingsTab.scss";
|
||||||
|
|
|
@ -25,6 +25,7 @@ limitations under the License.
|
||||||
|
|
||||||
.mx_TabbedView_tabLabels {
|
.mx_TabbedView_tabLabels {
|
||||||
width: 136px;
|
width: 136px;
|
||||||
|
max-width: 136px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
color: $tab-label-fg-color;
|
color: $tab-label-fg-color;
|
||||||
}
|
}
|
||||||
|
|
70
res/css/views/dialogs/_SettingsDialog.scss
Normal file
70
res/css/views/dialogs/_SettingsDialog.scss
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
Copyright 2019 New Vector Ltd.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.mx_SettingsDialog {
|
||||||
|
.mx_Dialog {
|
||||||
|
max-width: 784px; // 900px - 58px (left padding) - 58px (right padding)
|
||||||
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.mx_TabbedView_tabLabels {
|
||||||
|
// Force the sidebar to be always visible, letting the rest of the content scroll
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_TabbedView_tabPanel {
|
||||||
|
max-width: 485px;
|
||||||
|
margin-left: 206px; // 70px margin + 136px for the sidebar
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_SettingsDialog_header {
|
||||||
|
font-size: 24px;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
color: $dialog-title-fg-color;
|
||||||
|
margin-top: 16px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_SettingsDialog_close {
|
||||||
|
position: absolute;
|
||||||
|
top: 16px;
|
||||||
|
right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_SettingsDialog_closeIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_SettingsDialog_closeIcon:before {
|
||||||
|
mask: url('$(res)/img/feather-icons/cancel.svg');
|
||||||
|
background-color: $dialog-close-fg-color;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: 16px;
|
||||||
|
mask-position: center;
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,39 +1,18 @@
|
||||||
.mx_UserSettingsDialog_header {
|
/*
|
||||||
font-size: 24px;
|
Copyright 2019 New Vector Ltd.
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
color: $dialog-title-fg-color;
|
|
||||||
margin-top: 16px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_UserSettingsDialog_close {
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
position: absolute;
|
you may not use this file except in compliance with the License.
|
||||||
top: 16px;
|
You may obtain a copy of the License at
|
||||||
right: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_UserSettingsDialog_closeIcon {
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_UserSettingsDialog_closeIcon:before {
|
|
||||||
mask: url('$(res)/img/feather-icons/cancel.svg');
|
|
||||||
background-color: $dialog-close-fg-color;
|
|
||||||
mask-repeat: no-repeat;
|
|
||||||
mask-size: 16px;
|
|
||||||
mask-position: center;
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// ICONS
|
// ICONS
|
||||||
// ==========================================================
|
// ==========================================================
|
||||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO: Fancy transitions
|
|
||||||
|
|
||||||
.mx_ToggleSwitch {
|
.mx_ToggleSwitch {
|
||||||
|
transition: background-color 0.20s ease-out 0.1s;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
|
@ -33,6 +32,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ToggleSwitch_ball {
|
.mx_ToggleSwitch_ball {
|
||||||
|
transition: left 0.15s ease-out 0.1s;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -47,5 +47,5 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ToggleSwitch_on > .mx_ToggleSwitch_ball {
|
.mx_ToggleSwitch_on > .mx_ToggleSwitch_ball {
|
||||||
right: 2px;
|
left: 23px; // 48px switch - 20px ball - 5px padding = 23px
|
||||||
}
|
}
|
||||||
|
|
24
res/css/views/settings/tabs/_HelpSettingsTab.scss
Normal file
24
res/css/views/settings/tabs/_HelpSettingsTab.scss
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
Copyright 2019 New Vector Ltd
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.mx_HelpSettingsTab_debugButton {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_HelpSettingsTab span.mx_AccessibleButton {
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
|
@ -613,7 +613,7 @@ export default React.createClass({
|
||||||
case 'view_user_settings': {
|
case 'view_user_settings': {
|
||||||
if (SettingsStore.isFeatureEnabled("feature_tabbed_settings")) {
|
if (SettingsStore.isFeatureEnabled("feature_tabbed_settings")) {
|
||||||
const UserSettingsDialog = sdk.getComponent("dialogs.UserSettingsDialog");
|
const UserSettingsDialog = sdk.getComponent("dialogs.UserSettingsDialog");
|
||||||
Modal.createTrackedDialog('User settings', '', UserSettingsDialog, {});
|
Modal.createTrackedDialog('User settings', '', UserSettingsDialog, {}, 'mx_SettingsDialog');
|
||||||
} else {
|
} else {
|
||||||
this._setPage(PageTypes.UserSettings);
|
this._setPage(PageTypes.UserSettings);
|
||||||
this.notifyNewScreen('settings');
|
this.notifyNewScreen('settings');
|
||||||
|
|
|
@ -27,6 +27,7 @@ import SecuritySettingsTab from "../settings/tabs/SecuritySettingsTab";
|
||||||
import NotificationSettingsTab from "../settings/tabs/NotificationSettingsTab";
|
import NotificationSettingsTab from "../settings/tabs/NotificationSettingsTab";
|
||||||
import PreferencesSettingsTab from "../settings/tabs/PreferencesSettingsTab";
|
import PreferencesSettingsTab from "../settings/tabs/PreferencesSettingsTab";
|
||||||
import VoiceSettingsTab from "../settings/tabs/VoiceSettingsTab";
|
import VoiceSettingsTab from "../settings/tabs/VoiceSettingsTab";
|
||||||
|
import HelpSettingsTab from "../settings/tabs/HelpSettingsTab";
|
||||||
|
|
||||||
// TODO: Ditch this whole component
|
// TODO: Ditch this whole component
|
||||||
export class TempTab extends React.Component {
|
export class TempTab extends React.Component {
|
||||||
|
@ -87,7 +88,7 @@ export default class UserSettingsDialog extends React.Component {
|
||||||
tabs.push(new Tab(
|
tabs.push(new Tab(
|
||||||
_td("Help & About"),
|
_td("Help & About"),
|
||||||
"mx_UserSettingsDialog_helpIcon",
|
"mx_UserSettingsDialog_helpIcon",
|
||||||
<div>Help Test</div>,
|
<HelpSettingsTab closeSettingsFn={this.props.onFinished} />,
|
||||||
));
|
));
|
||||||
tabs.push(new Tab(
|
tabs.push(new Tab(
|
||||||
_td("Visit old settings"),
|
_td("Visit old settings"),
|
||||||
|
@ -101,10 +102,10 @@ export default class UserSettingsDialog extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="mx_UserSettingsDialog">
|
<div className="mx_UserSettingsDialog">
|
||||||
<div className="mx_UserSettingsDialog_header">
|
<div className="mx_SettingsDialog_header">
|
||||||
{_t("Settings")}
|
{_t("Settings")}
|
||||||
<span className="mx_UserSettingsDialog_close">
|
<span className="mx_SettingsDialog_close">
|
||||||
<AccessibleButton className="mx_UserSettingsDialog_closeIcon" onClick={this.props.onFinished} />
|
<AccessibleButton className="mx_SettingsDialog_closeIcon" onClick={this.props.onFinished} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<TabbedView tabs={this._getTabs()} />
|
<TabbedView tabs={this._getTabs()} />
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default class Field extends React.PureComponent {
|
||||||
type: PropTypes.string,
|
type: PropTypes.string,
|
||||||
// The field's label string.
|
// The field's label string.
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
// The field's placeholder string.
|
// The field's placeholder string. Defaults to the label.
|
||||||
placeholder: PropTypes.string,
|
placeholder: PropTypes.string,
|
||||||
// The type of field to create. Defaults to "input". Should be "input" or "select".
|
// The type of field to create. Defaults to "input". Should be "input" or "select".
|
||||||
// To define options for a select, use <Field><option ... /></Field>
|
// To define options for a select, use <Field><option ... /></Field>
|
||||||
|
@ -55,6 +55,7 @@ export default class Field extends React.PureComponent {
|
||||||
// Set some defaults for the element
|
// Set some defaults for the element
|
||||||
extraProps.type = extraProps.type || "text";
|
extraProps.type = extraProps.type || "text";
|
||||||
extraProps.ref = "fieldInput";
|
extraProps.ref = "fieldInput";
|
||||||
|
extraProps.placeholder = extraProps.placeholder || extraProps.label;
|
||||||
|
|
||||||
const element = this.props.element || "input";
|
const element = this.props.element || "input";
|
||||||
const fieldInput = React.createElement(element, extraProps, this.props.children);
|
const fieldInput = React.createElement(element, extraProps, this.props.children);
|
||||||
|
|
227
src/components/views/settings/tabs/HelpSettingsTab.js
Normal file
227
src/components/views/settings/tabs/HelpSettingsTab.js
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
/*
|
||||||
|
Copyright 2019 New Vector Ltd
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import {_t, getCurrentLanguage} from "../../../../languageHandler";
|
||||||
|
import MatrixClientPeg from "../../../../MatrixClientPeg";
|
||||||
|
import AccessibleButton from "../../elements/AccessibleButton";
|
||||||
|
import SdkConfig from "../../../../SdkConfig";
|
||||||
|
import createRoom from "../../../../createRoom";
|
||||||
|
const packageJson = require('../../../../../package.json');
|
||||||
|
const Modal = require("../../../../Modal");
|
||||||
|
const sdk = require("../../../../index");
|
||||||
|
const PlatformPeg = require("../../../../PlatformPeg");
|
||||||
|
|
||||||
|
// if this looks like a release, use the 'version' from package.json; else use
|
||||||
|
// the git sha. Prepend version with v, to look like riot-web version
|
||||||
|
const REACT_SDK_VERSION = 'dist' in packageJson ? packageJson.version : packageJson.gitHead || '<local>';
|
||||||
|
|
||||||
|
// Simple method to help prettify GH Release Tags and Commit Hashes.
|
||||||
|
const semVerRegex = /^v?(\d+\.\d+\.\d+(?:-rc.+)?)(?:-(?:\d+-g)?([0-9a-fA-F]+))?(?:-dirty)?$/i;
|
||||||
|
const ghVersionLabel = function(repo, token='') {
|
||||||
|
const match = token.match(semVerRegex);
|
||||||
|
let url;
|
||||||
|
if (match && match[1]) { // basic semVer string possibly with commit hash
|
||||||
|
url = (match.length > 1 && match[2])
|
||||||
|
? `https://github.com/${repo}/commit/${match[2]}`
|
||||||
|
: `https://github.com/${repo}/releases/tag/v${match[1]}`;
|
||||||
|
} else {
|
||||||
|
url = `https://github.com/${repo}/commit/${token.split('-')[0]}`;
|
||||||
|
}
|
||||||
|
return <a target="_blank" rel="noopener" href={url}>{ token }</a>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default class HelpSettingsTab extends React.Component {
|
||||||
|
static propTypes = {
|
||||||
|
closeSettingsFn: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
vectorVersion: null,
|
||||||
|
canUpdate: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount(): void {
|
||||||
|
PlatformPeg.get().getAppVersion().then((ver) => this.setState({vectorVersion: ver})).catch((e) => {
|
||||||
|
console.error("Error getting vector version: ", e);
|
||||||
|
});
|
||||||
|
PlatformPeg.get().canSelfUpdate().then((v) => this.setState({canUpdate: v})).catch((e) => {
|
||||||
|
console.error("Error getting self updatability: ", e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_onClearCacheAndReload = (e) => {
|
||||||
|
if (!PlatformPeg.get()) return;
|
||||||
|
|
||||||
|
MatrixClientPeg.get().stopClient();
|
||||||
|
MatrixClientPeg.get().store.deleteAllData().done(() => {
|
||||||
|
PlatformPeg.get().reload();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
_onBugReport = (e) => {
|
||||||
|
const BugReportDialog = sdk.getComponent("dialogs.BugReportDialog");
|
||||||
|
if (!BugReportDialog) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {});
|
||||||
|
};
|
||||||
|
|
||||||
|
_onStartBotChat = (e) => {
|
||||||
|
this.props.closeSettingsFn();
|
||||||
|
createRoom({
|
||||||
|
dmUserId: SdkConfig.get().welcomeUserId,
|
||||||
|
andView: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
_showSpoiler = (event) => {
|
||||||
|
const target = event.target;
|
||||||
|
target.innerHTML = target.getAttribute('data-spoiler');
|
||||||
|
|
||||||
|
const range = document.createRange();
|
||||||
|
range.selectNodeContents(target);
|
||||||
|
|
||||||
|
const selection = window.getSelection();
|
||||||
|
selection.removeAllRanges();
|
||||||
|
selection.addRange(range);
|
||||||
|
};
|
||||||
|
|
||||||
|
_renderLegal() {
|
||||||
|
const tocLinks = SdkConfig.get().terms_and_conditions_links;
|
||||||
|
if (!tocLinks) return null;
|
||||||
|
|
||||||
|
const legalLinks = [];
|
||||||
|
for (const tocEntry of SdkConfig.get().terms_and_conditions_links) {
|
||||||
|
legalLinks.push(<div key={tocEntry.url}>
|
||||||
|
<a href={tocEntry.url} rel="noopener" target="_blank">{tocEntry.text}</a>
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='mx_SettingsTab_section mx_HelpSettingsTab_versions'>
|
||||||
|
<span className='mx_SettingsTab_subheading'>{_t("Legal")}</span>
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
{legalLinks}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
let faqText = _t('For help with using Riot, click <a>here</a>.', {}, {
|
||||||
|
'a': (sub) => <a href="https://about.riot.im/need-help/" rel='noopener' target='_blank'>{sub}</a>,
|
||||||
|
});
|
||||||
|
if (SdkConfig.get().welcomeUserId && getCurrentLanguage().startsWith('en')) {
|
||||||
|
faqText = (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
_t('For help with using Riot, click <a>here</a> or start a chat with our ' +
|
||||||
|
'bot using the button below.', {}, {
|
||||||
|
'a': (sub) => <a href="https://about.riot.im/need-help/" rel='noopener'
|
||||||
|
target='_blank'>{sub}</a>,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
<AccessibleButton onClick={this._onStartBotChat} kind='primary'>
|
||||||
|
{_t("Start a chat with Riot Bot")}
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const reactSdkVersion = REACT_SDK_VERSION !== '<local>'
|
||||||
|
? ghVersionLabel('matrix-org/matrix-react-sdk', REACT_SDK_VERSION)
|
||||||
|
: REACT_SDK_VERSION;
|
||||||
|
const vectorVersion = this.state.vectorVersion
|
||||||
|
? ghVersionLabel('vector-im/riot-web', this.state.vectorVersion)
|
||||||
|
: 'unknown';
|
||||||
|
|
||||||
|
let olmVersion = MatrixClientPeg.get().olmVersion;
|
||||||
|
olmVersion = olmVersion ? `${olmVersion[0]}.${olmVersion[1]}.${olmVersion[2]}` : '<not-enabled>';
|
||||||
|
|
||||||
|
let updateButton = null;
|
||||||
|
if (this.state.canUpdate) {
|
||||||
|
const platform = PlatformPeg.get();
|
||||||
|
updateButton = (
|
||||||
|
<AccessibleButton onClick={platform.startUpdateCheck} kind='primary'>
|
||||||
|
{_t('Check for update')}
|
||||||
|
</AccessibleButton>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="mx_SettingsTab mx_HelpSettingsTab">
|
||||||
|
<div className="mx_SettingsTab_heading">{_t("Help & About")}</div>
|
||||||
|
<div className="mx_SettingsTab_section">
|
||||||
|
<span className='mx_SettingsTab_subheading'>{_t('Bug reporting')}</span>
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
{
|
||||||
|
_t( "If you've submitted a bug via GitHub, debug logs can help " +
|
||||||
|
"us track down the problem. Debug logs contain application " +
|
||||||
|
"usage data including your username, the IDs or aliases of " +
|
||||||
|
"the rooms or groups you have visited and the usernames of " +
|
||||||
|
"other users. They do not contain messages.",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
<div className='mx_HelpSettingsTab_debugButton'>
|
||||||
|
<AccessibleButton onClick={this._onBugReport} kind='primary'>
|
||||||
|
{_t("Submit debug logs")}
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
<div className='mx_HelpSettingsTab_debugButton'>
|
||||||
|
<AccessibleButton onClick={this._onClearCacheAndReload} kind='danger'>
|
||||||
|
{_t("Clear Cache and Reload")}
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='mx_SettingsTab_section'>
|
||||||
|
<span className='mx_SettingsTab_subheading'>{_t("FAQ")}</span>
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
{faqText}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='mx_SettingsTab_section mx_HelpSettingsTab_versions'>
|
||||||
|
<span className='mx_SettingsTab_subheading'>{_t("Versions")}</span>
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
{_t("matrix-react-sdk version:")} {reactSdkVersion}<br />
|
||||||
|
{_t("riot-web version:")} {vectorVersion}<br />
|
||||||
|
{_t("olm version:")} {olmVersion}<br />
|
||||||
|
{updateButton}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{this._renderLegal()}
|
||||||
|
<div className='mx_SettingsTab_section mx_HelpSettingsTab_versions'>
|
||||||
|
<span className='mx_SettingsTab_subheading'>{_t("Advanced")}</span>
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
{_t("Homeserver is")} {MatrixClientPeg.get().getHomeserverUrl()}<br />
|
||||||
|
{_t("Identity Server is")} {MatrixClientPeg.get().getIdentityServerUrl()}<br />
|
||||||
|
{_t("Access Token:") + ' '}
|
||||||
|
<AccessibleButton element="span" onClick={this._showSpoiler}
|
||||||
|
data-spoiler={MatrixClientPeg.get().getAccessToken()}>
|
||||||
|
<{ _t("click to reveal") }>
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -439,6 +439,26 @@
|
||||||
"Deactivating your account is a permanent action - be careful!": "Deactivating your account is a permanent action - be careful!",
|
"Deactivating your account is a permanent action - be careful!": "Deactivating your account is a permanent action - be careful!",
|
||||||
"Close Account": "Close Account",
|
"Close Account": "Close Account",
|
||||||
"General": "General",
|
"General": "General",
|
||||||
|
"Legal": "Legal",
|
||||||
|
"For help with using Riot, click <a>here</a>.": "For help with using Riot, click <a>here</a>.",
|
||||||
|
"For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.": "For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.",
|
||||||
|
"Start a chat with Riot Bot": "Start a chat with Riot Bot",
|
||||||
|
"Check for update": "Check for update",
|
||||||
|
"Help & About": "Help & About",
|
||||||
|
"Bug reporting": "Bug reporting",
|
||||||
|
"If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
|
||||||
|
"Submit debug logs": "Submit debug logs",
|
||||||
|
"Clear Cache and Reload": "Clear Cache and Reload",
|
||||||
|
"FAQ": "FAQ",
|
||||||
|
"Versions": "Versions",
|
||||||
|
"matrix-react-sdk version:": "matrix-react-sdk version:",
|
||||||
|
"riot-web version:": "riot-web version:",
|
||||||
|
"olm version:": "olm version:",
|
||||||
|
"Advanced": "Advanced",
|
||||||
|
"Homeserver is": "Homeserver is",
|
||||||
|
"Identity Server is": "Identity Server is",
|
||||||
|
"Access Token:": "Access Token:",
|
||||||
|
"click to reveal": "click to reveal",
|
||||||
"Lazy loading members not supported": "Lazy loading members not supported",
|
"Lazy loading members not supported": "Lazy loading members not supported",
|
||||||
"Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.",
|
"Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.",
|
||||||
"Labs": "Labs",
|
"Labs": "Labs",
|
||||||
|
@ -448,7 +468,6 @@
|
||||||
"Composer": "Composer",
|
"Composer": "Composer",
|
||||||
"Room list": "Room list",
|
"Room list": "Room list",
|
||||||
"Timeline": "Timeline",
|
"Timeline": "Timeline",
|
||||||
"Advanced": "Advanced",
|
|
||||||
"Autocomplete delay (ms)": "Autocomplete delay (ms)",
|
"Autocomplete delay (ms)": "Autocomplete delay (ms)",
|
||||||
"Unignore": "Unignore",
|
"Unignore": "Unignore",
|
||||||
"<not supported>": "<not supported>",
|
"<not supported>": "<not supported>",
|
||||||
|
@ -929,7 +948,6 @@
|
||||||
"Logs sent": "Logs sent",
|
"Logs sent": "Logs sent",
|
||||||
"Thank you!": "Thank you!",
|
"Thank you!": "Thank you!",
|
||||||
"Failed to send logs: ": "Failed to send logs: ",
|
"Failed to send logs: ": "Failed to send logs: ",
|
||||||
"Submit debug logs": "Submit debug logs",
|
|
||||||
"Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
|
"Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
|
||||||
"Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.": "Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.",
|
"Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.": "Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.",
|
||||||
"What GitHub issue are these logs for?": "What GitHub issue are these logs for?",
|
"What GitHub issue are these logs for?": "What GitHub issue are these logs for?",
|
||||||
|
@ -1069,7 +1087,7 @@
|
||||||
"Room contains unknown devices": "Room contains unknown devices",
|
"Room contains unknown devices": "Room contains unknown devices",
|
||||||
"\"%(RoomName)s\" contains devices that you haven't seen before.": "\"%(RoomName)s\" contains devices that you haven't seen before.",
|
"\"%(RoomName)s\" contains devices that you haven't seen before.": "\"%(RoomName)s\" contains devices that you haven't seen before.",
|
||||||
"Unknown devices": "Unknown devices",
|
"Unknown devices": "Unknown devices",
|
||||||
"Help & About": "Help & About",
|
"Security & Privacy": "Security & Privacy",
|
||||||
"Visit old settings": "Visit old settings",
|
"Visit old settings": "Visit old settings",
|
||||||
"Unable to load backup status": "Unable to load backup status",
|
"Unable to load backup status": "Unable to load backup status",
|
||||||
"Unable to restore backup": "Unable to restore backup",
|
"Unable to restore backup": "Unable to restore backup",
|
||||||
|
@ -1303,15 +1321,15 @@
|
||||||
"Key Backup": "Key Backup",
|
"Key Backup": "Key Backup",
|
||||||
"Ignored Users": "Ignored Users",
|
"Ignored Users": "Ignored Users",
|
||||||
"Submit Debug Logs": "Submit Debug Logs",
|
"Submit Debug Logs": "Submit Debug Logs",
|
||||||
"If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
|
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
||||||
|
"Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.": "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.",
|
||||||
|
"Learn more about how we use analytics.": "Learn more about how we use analytics.",
|
||||||
"These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
|
"These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
|
||||||
"Use with caution": "Use with caution",
|
"Use with caution": "Use with caution",
|
||||||
"Deactivate my account": "Deactivate my account",
|
"Deactivate my account": "Deactivate my account",
|
||||||
"Legal": "Legal",
|
|
||||||
"Clear Cache": "Clear Cache",
|
"Clear Cache": "Clear Cache",
|
||||||
"Clear Cache and Reload": "Clear Cache and Reload",
|
|
||||||
"Updates": "Updates",
|
"Updates": "Updates",
|
||||||
"Check for update": "Check for update",
|
"Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
|
||||||
"Bulk Options": "Bulk Options",
|
"Bulk Options": "Bulk Options",
|
||||||
"Desktop specific": "Desktop specific",
|
"Desktop specific": "Desktop specific",
|
||||||
"Missing Media Permissions, click here to request.": "Missing Media Permissions, click here to request.",
|
"Missing Media Permissions, click here to request.": "Missing Media Permissions, click here to request.",
|
||||||
|
@ -1321,13 +1339,6 @@
|
||||||
"Display name": "Display name",
|
"Display name": "Display name",
|
||||||
"To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
|
"To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
|
||||||
"Logged in as:": "Logged in as:",
|
"Logged in as:": "Logged in as:",
|
||||||
"Access Token:": "Access Token:",
|
|
||||||
"click to reveal": "click to reveal",
|
|
||||||
"Homeserver is": "Homeserver is",
|
|
||||||
"Identity Server is": "Identity Server is",
|
|
||||||
"matrix-react-sdk version:": "matrix-react-sdk version:",
|
|
||||||
"riot-web version:": "riot-web version:",
|
|
||||||
"olm version:": "olm version:",
|
|
||||||
"Failed to send email": "Failed to send email",
|
"Failed to send email": "Failed to send email",
|
||||||
"The email address linked to your account must be entered.": "The email address linked to your account must be entered.",
|
"The email address linked to your account must be entered.": "The email address linked to your account must be entered.",
|
||||||
"A new password must be entered.": "A new password must be entered.",
|
"A new password must be entered.": "A new password must be entered.",
|
||||||
|
|
Loading…
Reference in a new issue