mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 10:45:51 +03:00
Add UIFeature.locationSharing to hide location sharing (#10727)
* Add UIFeature.locationSharing to hide location sharing * Iterate
This commit is contained in:
parent
d084c34ea2
commit
457c1d011a
3 changed files with 10 additions and 2 deletions
|
@ -60,6 +60,7 @@ import { setUpVoiceBroadcastPreRecording } from "../../../voice-broadcast/utils/
|
||||||
import { SdkContextClass } from "../../../contexts/SDKContext";
|
import { SdkContextClass } from "../../../contexts/SDKContext";
|
||||||
import { VoiceBroadcastInfoState } from "../../../voice-broadcast";
|
import { VoiceBroadcastInfoState } from "../../../voice-broadcast";
|
||||||
import { createCantStartVoiceMessageBroadcastDialog } from "../dialogs/CantStartVoiceMessageBroadcastDialog";
|
import { createCantStartVoiceMessageBroadcastDialog } from "../dialogs/CantStartVoiceMessageBroadcastDialog";
|
||||||
|
import { UIFeature } from "../../../settings/UIFeature";
|
||||||
|
|
||||||
let instanceCount = 0;
|
let instanceCount = 0;
|
||||||
|
|
||||||
|
@ -614,7 +615,9 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
||||||
relation={this.props.relation}
|
relation={this.props.relation}
|
||||||
onRecordStartEndClick={this.onRecordStartEndClick}
|
onRecordStartEndClick={this.onRecordStartEndClick}
|
||||||
setStickerPickerOpen={this.setStickerPickerOpen}
|
setStickerPickerOpen={this.setStickerPickerOpen}
|
||||||
showLocationButton={!window.electron}
|
showLocationButton={
|
||||||
|
!window.electron && SettingsStore.getValue(UIFeature.LocationSharing)
|
||||||
|
}
|
||||||
showPollsButton={this.state.showPollsButton}
|
showPollsButton={this.state.showPollsButton}
|
||||||
showStickersButton={this.showStickersButton}
|
showStickersButton={this.showStickersButton}
|
||||||
isRichTextEnabled={this.state.isRichTextEnabled}
|
isRichTextEnabled={this.state.isRichTextEnabled}
|
||||||
|
|
|
@ -1089,6 +1089,10 @@ export const SETTINGS: { [setting: string]: ISetting } = {
|
||||||
supportedLevels: LEVELS_UI_FEATURE,
|
supportedLevels: LEVELS_UI_FEATURE,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
[UIFeature.LocationSharing]: {
|
||||||
|
supportedLevels: LEVELS_UI_FEATURE,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
[UIFeature.Voip]: {
|
[UIFeature.Voip]: {
|
||||||
supportedLevels: LEVELS_UI_FEATURE,
|
supportedLevels: LEVELS_UI_FEATURE,
|
||||||
default: true,
|
default: true,
|
||||||
|
|
|
@ -15,10 +15,11 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// see settings.md for documentation on conventions
|
// see settings.md for documentation on conventions
|
||||||
export enum UIFeature {
|
export const enum UIFeature {
|
||||||
AdvancedEncryption = "UIFeature.advancedEncryption",
|
AdvancedEncryption = "UIFeature.advancedEncryption",
|
||||||
URLPreviews = "UIFeature.urlPreviews",
|
URLPreviews = "UIFeature.urlPreviews",
|
||||||
Widgets = "UIFeature.widgets",
|
Widgets = "UIFeature.widgets",
|
||||||
|
LocationSharing = "UIFeature.locationSharing",
|
||||||
Voip = "UIFeature.voip",
|
Voip = "UIFeature.voip",
|
||||||
Feedback = "UIFeature.feedback",
|
Feedback = "UIFeature.feedback",
|
||||||
Registration = "UIFeature.registration",
|
Registration = "UIFeature.registration",
|
||||||
|
|
Loading…
Reference in a new issue