Add a temporary tab for visiting the old settings

For debugging purposes
pull/21833/head
Travis Ralston 2019-01-18 20:36:02 -07:00
parent d907647e61
commit a8ec40a8b0
4 changed files with 33 additions and 15 deletions

View File

@ -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,

View File

@ -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}/>),
];
}

View File

@ -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>
);

View File

@ -401,6 +401,8 @@
"Off": "Off",
"On": "On",
"Noisy": "Noisy",
"General": "General",
"Profile": "Profile",
"Cannot add any more widgets": "Cannot add any more widgets",
"The maximum permitted number of widgets have already been added to this room.": "The maximum permitted number of widgets have already been added to this room.",
"Add a widget": "Add a widget",
@ -1043,11 +1045,11 @@
"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.",
"Unknown devices": "Unknown devices",
"General": "General",
"Preferences": "Preferences",
"Voice & Video": "Voice & Video",
"Security & Privacy": "Security & Privacy",
"Help & About": "Help & About",
"Visit old settings": "Visit old settings",
"Unable to load backup status": "Unable to load backup status",
"Unable to restore backup": "Unable to restore backup",
"No backup found!": "No backup found!",
@ -1289,7 +1291,6 @@
"VoIP": "VoIP",
"Email": "Email",
"Add email address": "Add email address",
"Profile": "Profile",
"Display name": "Display name",
"Account": "Account",
"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",