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._setPage(PageTypes.UserSettings);
//this.notifyNewScreen('settings'); //this.notifyNewScreen('settings');
break; break;
case 'view_old_user_settings':
this._setPage(PageTypes.UserSettings);
this.notifyNewScreen('settings');
break;
case 'close_settings': case 'close_settings':
this.setState({ this.setState({
leftDisabled: false, leftDisabled: false,

View File

@ -20,6 +20,23 @@ import {Tab, TabbedView} from "../../structures/TabbedView";
import {_t, _td} from "../../../languageHandler"; import {_t, _td} from "../../../languageHandler";
import AccessibleButton from "../elements/AccessibleButton"; import AccessibleButton from "../elements/AccessibleButton";
import GeneralSettingsTab from "../settings/tabs/GeneralSettingsTab"; 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 { export default class UserSettingsDialog extends React.Component {
static propTypes = { 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("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("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("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 React from 'react';
import PropTypes from 'prop-types';
import {_t} from "../../../../languageHandler"; import {_t} from "../../../../languageHandler";
export default class GeneralSettingsTab extends React.Component { export default class GeneralSettingsTab extends React.Component {
static propTypes = {
onFinished: PropTypes.func.isRequired,
};
render() { render() {
return ( return (
<div className="mx_SettingsTab"> <div className="mx_SettingsTab">
<div className="mx_SettingsTab_heading">{_t("General")}</div> <div className="mx_SettingsTab_heading">{_t("General")}</div>
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section"> <div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span> <span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
<input type="text" value="travis" /> <input type="text" value="travis"/>
<input type="text" value="TravisR" /> <input type="text" value="TravisR"/>
</div> </div>
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section"> <div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span> <span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
<input type="text" value="travis" /> <input type="text" value="travis"/>
<input type="text" value="TravisR" /> <input type="text" value="TravisR"/>
</div> </div>
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section"> <div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span> <span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
<input type="text" value="travis" /> <input type="text" value="travis"/>
<input type="text" value="TravisR" /> <input type="text" value="TravisR"/>
</div> </div>
<div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section"> <div className="mx_GeneralSettingsTab_profile mx_SettingsTab_section">
<span className="mx_SettingsTab_subheading">{_t("Profile")}</span> <span className="mx_SettingsTab_subheading">{_t("Profile")}</span>
<input type="text" value="travis" /> <input type="text" value="travis"/>
<input type="text" value="TravisR" /> <input type="text" value="TravisR"/>
</div> </div>
</div> </div>
); );

View File

@ -401,6 +401,8 @@
"Off": "Off", "Off": "Off",
"On": "On", "On": "On",
"Noisy": "Noisy", "Noisy": "Noisy",
"General": "General",
"Profile": "Profile",
"Cannot add any more widgets": "Cannot add any more widgets", "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.", "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", "Add a widget": "Add a widget",
@ -1043,11 +1045,11 @@
"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",
"General": "General",
"Preferences": "Preferences", "Preferences": "Preferences",
"Voice & Video": "Voice & Video", "Voice & Video": "Voice & Video",
"Security & Privacy": "Security & Privacy", "Security & Privacy": "Security & Privacy",
"Help & About": "Help & About", "Help & About": "Help & About",
"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",
"No backup found!": "No backup found!", "No backup found!": "No backup found!",
@ -1289,7 +1291,6 @@
"VoIP": "VoIP", "VoIP": "VoIP",
"Email": "Email", "Email": "Email",
"Add email address": "Add email address", "Add email address": "Add email address",
"Profile": "Profile",
"Display name": "Display name", "Display name": "Display name",
"Account": "Account", "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", "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",