UI Feature Flag: Disable advanced options and tidy up some copy
This commit is contained in:
parent
f4f94e31d1
commit
7a448be1dc
5 changed files with 40 additions and 24 deletions
|
@ -29,6 +29,7 @@ import * as sdk from "../../../index";
|
||||||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
import {UIFeature} from "../../../settings/UIFeature";
|
||||||
|
|
||||||
export const ROOM_GENERAL_TAB = "ROOM_GENERAL_TAB";
|
export const ROOM_GENERAL_TAB = "ROOM_GENERAL_TAB";
|
||||||
export const ROOM_SECURITY_TAB = "ROOM_SECURITY_TAB";
|
export const ROOM_SECURITY_TAB = "ROOM_SECURITY_TAB";
|
||||||
|
@ -96,12 +97,14 @@ export default class RoomSettingsDialog extends React.Component {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SettingsStore.getValue(UIFeature.AdvancedSettings)) {
|
||||||
tabs.push(new Tab(
|
tabs.push(new Tab(
|
||||||
ROOM_ADVANCED_TAB,
|
ROOM_ADVANCED_TAB,
|
||||||
_td("Advanced"),
|
_td("Advanced"),
|
||||||
"mx_RoomSettingsDialog_warningIcon",
|
"mx_RoomSettingsDialog_warningIcon",
|
||||||
<AdvancedRoomSettingsTab roomId={this.props.roomId} closeSettingsFn={this.props.onFinished} />,
|
<AdvancedRoomSettingsTab roomId={this.props.roomId} closeSettingsFn={this.props.onFinished} />,
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,10 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
||||||
'showAvatarChanges',
|
'showAvatarChanges',
|
||||||
'showDisplaynameChanges',
|
'showDisplaynameChanges',
|
||||||
'showImages',
|
'showImages',
|
||||||
|
'Pill.shouldShowPillAvatar',
|
||||||
];
|
];
|
||||||
|
|
||||||
static ADVANCED_SETTINGS = [
|
static GENERAL_SETTINGS = [
|
||||||
'Pill.shouldShowPillAvatar',
|
|
||||||
'TagPanel.enableTagPanel',
|
'TagPanel.enableTagPanel',
|
||||||
'promptBeforeInviteUnknownUsers',
|
'promptBeforeInviteUnknownUsers',
|
||||||
// Start automatically after startup (electron-only)
|
// Start automatically after startup (electron-only)
|
||||||
|
@ -191,8 +191,8 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx_SettingsTab_section">
|
<div className="mx_SettingsTab_section">
|
||||||
<span className="mx_SettingsTab_subheading">{_t("Advanced")}</span>
|
<span className="mx_SettingsTab_subheading">{_t("General")}</span>
|
||||||
{this._renderGroup(PreferencesUserSettingsTab.ADVANCED_SETTINGS)}
|
{this._renderGroup(PreferencesUserSettingsTab.GENERAL_SETTINGS)}
|
||||||
{minimizeToTrayOption}
|
{minimizeToTrayOption}
|
||||||
{autoHideMenuOption}
|
{autoHideMenuOption}
|
||||||
{autoLaunchOption}
|
{autoLaunchOption}
|
||||||
|
|
|
@ -30,6 +30,8 @@ import dis from "../../../../../dispatcher/dispatcher";
|
||||||
import {privateShouldBeEncrypted} from "../../../../../createRoom";
|
import {privateShouldBeEncrypted} from "../../../../../createRoom";
|
||||||
import {SettingLevel} from "../../../../../settings/SettingLevel";
|
import {SettingLevel} from "../../../../../settings/SettingLevel";
|
||||||
import SecureBackupPanel from "../../SecureBackupPanel";
|
import SecureBackupPanel from "../../SecureBackupPanel";
|
||||||
|
import SettingsStore from "../../../../../settings/SettingsStore";
|
||||||
|
import {UIFeature} from "../../../../../settings/UIFeature";
|
||||||
|
|
||||||
export class IgnoredUser extends React.Component {
|
export class IgnoredUser extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -319,8 +321,6 @@ export default class SecurityUserSettingsTab extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const E2eAdvancedPanel = sdk.getComponent('views.settings.E2eAdvancedPanel');
|
|
||||||
|
|
||||||
let warning;
|
let warning;
|
||||||
if (!privateShouldBeEncrypted()) {
|
if (!privateShouldBeEncrypted()) {
|
||||||
warning = <div className="mx_SecurityUserSettingsTab_warning">
|
warning = <div className="mx_SecurityUserSettingsTab_warning">
|
||||||
|
@ -329,6 +329,19 @@ export default class SecurityUserSettingsTab extends React.Component {
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const E2eAdvancedPanel = sdk.getComponent('views.settings.E2eAdvancedPanel');
|
||||||
|
let advancedSection;
|
||||||
|
if (SettingsStore.getValue(UIFeature.AdvancedSettings)) {
|
||||||
|
advancedSection = <>
|
||||||
|
<div className="mx_SettingsTab_heading">{_t("Advanced")}</div>
|
||||||
|
<div className="mx_SettingsTab_section">
|
||||||
|
{this._renderIgnoredUsers()}
|
||||||
|
{this._renderManageInvites()}
|
||||||
|
<E2eAdvancedPanel />
|
||||||
|
</div>
|
||||||
|
</>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_SettingsTab mx_SecurityUserSettingsTab">
|
<div className="mx_SettingsTab mx_SecurityUserSettingsTab">
|
||||||
{warning}
|
{warning}
|
||||||
|
@ -375,12 +388,7 @@ export default class SecurityUserSettingsTab extends React.Component {
|
||||||
<SettingsFlag name='analyticsOptIn' level={SettingLevel.DEVICE}
|
<SettingsFlag name='analyticsOptIn' level={SettingLevel.DEVICE}
|
||||||
onChange={this._updateAnalytics} />
|
onChange={this._updateAnalytics} />
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_SettingsTab_heading">{_t("Advanced")}</div>
|
{ advancedSection }
|
||||||
<div className="mx_SettingsTab_section">
|
|
||||||
{this._renderIgnoredUsers()}
|
|
||||||
{this._renderManageInvites()}
|
|
||||||
<E2eAdvancedPanel />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -622,4 +622,8 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
supportedLevels: LEVELS_UI_FEATURE,
|
supportedLevels: LEVELS_UI_FEATURE,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
[UIFeature.AdvancedSettings]: {
|
||||||
|
supportedLevels: LEVELS_UI_FEATURE,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,4 +18,5 @@ limitations under the License.
|
||||||
export enum UIFeature {
|
export enum UIFeature {
|
||||||
URLPreviews = "UIFeature.urlPreviews",
|
URLPreviews = "UIFeature.urlPreviews",
|
||||||
Widgets = "UIFeature.widgets",
|
Widgets = "UIFeature.widgets",
|
||||||
|
AdvancedSettings = "UIFeature.advancedSettings",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue