2019-01-18 23:09:17 +03:00
|
|
|
/*
|
|
|
|
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';
|
2019-01-18 23:43:17 +03:00
|
|
|
import {Tab, TabbedView} from "../../structures/TabbedView";
|
2019-01-19 05:40:21 +03:00
|
|
|
import {_t, _td} from "../../../languageHandler";
|
2019-01-19 06:09:23 +03:00
|
|
|
import AccessibleButton from "../elements/AccessibleButton";
|
2019-01-18 23:09:17 +03:00
|
|
|
|
2019-01-18 23:43:17 +03:00
|
|
|
export default class UserSettingsDialog extends React.Component {
|
|
|
|
static propTypes = {
|
2019-01-18 23:09:17 +03:00
|
|
|
onFinished: PropTypes.func.isRequired,
|
2019-01-18 23:43:17 +03:00
|
|
|
};
|
2019-01-18 23:09:17 +03:00
|
|
|
|
2019-01-18 23:43:17 +03:00
|
|
|
_getTabs() {
|
|
|
|
return [
|
2019-01-19 05:40:21 +03:00
|
|
|
new Tab(_td("General"), <span className="mx_UserSettingsDialog_settingsIcon mx_TabbedView_maskedIcon" />, <div>General Test</div>),
|
|
|
|
new Tab(_td("Notifications"), <span className="mx_UserSettingsDialog_bellIcon mx_TabbedView_maskedIcon" />, <div>Notifications Test</div>),
|
|
|
|
new Tab(_td("Preferences"), <span className="mx_UserSettingsDialog_preferencesIcon mx_TabbedView_maskedIcon" />, <div>Preferences 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("Help & About"), <span className="mx_UserSettingsDialog_helpIcon mx_TabbedView_maskedIcon" />, <div>Help Test</div>),
|
2019-01-18 23:43:17 +03:00
|
|
|
];
|
|
|
|
}
|
2019-01-18 23:09:17 +03:00
|
|
|
|
2019-01-18 23:43:17 +03:00
|
|
|
render() {
|
2019-01-18 23:09:17 +03:00
|
|
|
return (
|
2019-01-19 05:40:21 +03:00
|
|
|
<div className="mx_UserSettingsDialog">
|
2019-01-19 06:09:23 +03:00
|
|
|
<div className="mx_UserSettingsDialog_header">
|
2019-01-19 05:40:21 +03:00
|
|
|
{_t("Settings")}
|
2019-01-19 06:09:23 +03:00
|
|
|
<span className="mx_UserSettingsDialog_close">
|
|
|
|
<AccessibleButton className="mx_UserSettingsDialog_closeIcon" onClick={this.props.onFinished} />
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-01-19 05:40:21 +03:00
|
|
|
<TabbedView tabs={this._getTabs()} />
|
|
|
|
</div>
|
2019-01-18 23:43:17 +03:00
|
|
|
// <UserSettings
|
|
|
|
// onClose={this.props.onFinished}
|
|
|
|
// brand={SdkConfig.get().brand}
|
|
|
|
// referralBaseUrl={SdkConfig.get().referralBaseUrl}
|
|
|
|
// teamToken={SdkConfig.get().teamToken}
|
|
|
|
// />
|
2019-01-18 23:09:17 +03:00
|
|
|
);
|
2019-01-18 23:43:17 +03:00
|
|
|
}
|
|
|
|
}
|