You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Add a temporary tab for visiting the old settings
For debugging purposes
This commit is contained in:
@@ -616,6 +616,10 @@ export default React.createClass({
|
||||
//this._setPage(PageTypes.UserSettings);
|
||||
//this.notifyNewScreen('settings');
|
||||
break;
|
||||
case 'view_old_user_settings':
|
||||
this._setPage(PageTypes.UserSettings);
|
||||
this.notifyNewScreen('settings');
|
||||
break;
|
||||
case 'close_settings':
|
||||
this.setState({
|
||||
leftDisabled: false,
|
||||
|
||||
@@ -20,6 +20,23 @@ import {Tab, TabbedView} from "../../structures/TabbedView";
|
||||
import {_t, _td} from "../../../languageHandler";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import GeneralSettingsTab from "../settings/tabs/GeneralSettingsTab";
|
||||
import dis from '../../../dispatcher';
|
||||
|
||||
export class TempTab extends React.Component {
|
||||
// TODO: Ditch this
|
||||
static propTypes = {
|
||||
onClose: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
dis.dispatch({action: "view_old_user_settings"});
|
||||
this.props.onClose();
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div>Hello World</div>;
|
||||
}
|
||||
}
|
||||
|
||||
export default class UserSettingsDialog extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -34,6 +51,7 @@ export default class UserSettingsDialog extends React.Component {
|
||||
new Tab(_td("Voice & Video"), <span className="mx_UserSettingsDialog_voiceIcon mx_TabbedView_maskedIcon" />, <div>Voice Test</div>),
|
||||
new Tab(_td("Security & Privacy"), <span className="mx_UserSettingsDialog_securityIcon mx_TabbedView_maskedIcon" />, <div>Security Test</div>),
|
||||
new Tab(_td("Help & About"), <span className="mx_UserSettingsDialog_helpIcon mx_TabbedView_maskedIcon" />, <div>Help Test</div>),
|
||||
new Tab(_td("Visit old settings"), <span className="mx_UserSettingsDialog_helpIcon mx_TabbedView_maskedIcon" />, <TempTab onClose={this.props.onFinished}/>),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,37 +15,32 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {_t} from "../../../../languageHandler";
|
||||
|
||||
export default class GeneralSettingsTab extends React.Component {
|
||||
static propTypes = {
|
||||
onFinished: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="mx_SettingsTab">
|
||||
<div className="mx_SettingsTab_heading">{_t("General")}</div>
|
||||
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
|
||||
<input type="text" value="travis" />
|
||||
<input type="text" value="TravisR" />
|
||||
<input type="text" value="travis"/>
|
||||
<input type="text" value="TravisR"/>
|
||||
</div>
|
||||
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
|
||||
<input type="text" value="travis" />
|
||||
<input type="text" value="TravisR" />
|
||||
<input type="text" value="travis"/>
|
||||
<input type="text" value="TravisR"/>
|
||||
</div>
|
||||
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
|
||||
<input type="text" value="travis" />
|
||||
<input type="text" value="TravisR" />
|
||||
<input type="text" value="travis"/>
|
||||
<input type="text" value="TravisR"/>
|
||||
</div>
|
||||
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
|
||||
<input type="text" value="travis" />
|
||||
<input type="text" value="TravisR" />
|
||||
<input type="text" value="travis"/>
|
||||
<input type="text" value="TravisR"/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user