mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
add feature flag for grid view
This commit is contained in:
parent
8fa7ec0fac
commit
c2f6fc381c
@ -21,6 +21,7 @@ import dis from '../../../dispatcher';
|
||||
import TagOrderActions from '../../../actions/TagOrderActions';
|
||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||
import sdk from '../../../index';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
|
||||
export default class TagTileContextMenu extends React.Component {
|
||||
static propTypes = {
|
||||
@ -64,6 +65,18 @@ export default class TagTileContextMenu extends React.Component {
|
||||
|
||||
render() {
|
||||
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||
let gridViewOption;
|
||||
if (SettingsStore.isFeatureEnabled("feature_gridview")) {
|
||||
gridViewOption = (<div className="mx_TagTileContextMenu_item" onClick={this._onViewAsGridClick} >
|
||||
<TintableSvg
|
||||
className="mx_TagTileContextMenu_item_icon"
|
||||
src="img/icons-gridview.svg"
|
||||
width="15"
|
||||
height="15"
|
||||
/>
|
||||
{ _t('View as grid') }
|
||||
</div>);
|
||||
}
|
||||
return <div>
|
||||
<div className="mx_TagTileContextMenu_item" onClick={this._onViewCommunityClick} >
|
||||
<TintableSvg
|
||||
@ -74,15 +87,7 @@ export default class TagTileContextMenu extends React.Component {
|
||||
/>
|
||||
{ _t('View Community') }
|
||||
</div>
|
||||
<div className="mx_TagTileContextMenu_item" onClick={this._onViewAsGridClick} >
|
||||
<TintableSvg
|
||||
className="mx_TagTileContextMenu_item_icon"
|
||||
src="img/icons-gridview.svg"
|
||||
width="15"
|
||||
height="15"
|
||||
/>
|
||||
{ _t('View as grid') }
|
||||
</div>
|
||||
{ gridViewOption }
|
||||
<hr className="mx_TagTileContextMenu_separator" />
|
||||
<div className="mx_TagTileContextMenu_item" onClick={this._onRemoveClick} >
|
||||
<img className="mx_TagTileContextMenu_item_icon" src="img/icon_context_delete.svg" width="15" height="15" />
|
||||
|
@ -1405,5 +1405,6 @@
|
||||
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
||||
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
||||
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
|
||||
"View as grid": "View as grid"
|
||||
"View as grid": "View as grid",
|
||||
"Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu": "Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu"
|
||||
}
|
||||
|
@ -102,6 +102,12 @@ export const SETTINGS = {
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_gridview": {
|
||||
isFeature: true,
|
||||
displayName: _td("Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"MessageComposerInput.dontSuggestEmoji": {
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
displayName: _td('Disable Emoji suggestions while typing'),
|
||||
|
Loading…
Reference in New Issue
Block a user