11/*
2- Copyright 2019 New Vector Ltd
2+ Copyright 2019, 2021 The Matrix.org Foundation C.I.C.
33
44Licensed under the Apache License, Version 2.0 (the "License");
55you may not use this file except in compliance with the License.
@@ -22,32 +22,35 @@ import * as sdk from "../../../../..";
2222import AccessibleButton from "../../../elements/AccessibleButton" ;
2323import Modal from "../../../../../Modal" ;
2424import { replaceableComponent } from "../../../../../utils/replaceableComponent" ;
25+ import { EventType } from "matrix-js-sdk/src/@types/event" ;
2526
2627const plEventsToLabels = {
2728 // These will be translated for us later.
28- "m.room.avatar" : _td ( "Change room avatar" ) ,
29- "m.room.name" : _td ( "Change room name" ) ,
30- "m.room.canonical_alias" : _td ( "Change main address for the room" ) ,
31- "m.room.history_visibility" : _td ( "Change history visibility" ) ,
32- "m.room.power_levels" : _td ( "Change permissions" ) ,
33- "m.room.topic" : _td ( "Change topic" ) ,
34- "m.room.tombstone" : _td ( "Upgrade the room" ) ,
35- "m.room.encryption" : _td ( "Enable room encryption" ) ,
29+ [ EventType . RoomAvatar ] : _td ( "Change room avatar" ) ,
30+ [ EventType . RoomName ] : _td ( "Change room name" ) ,
31+ [ EventType . RoomCanonicalAlias ] : _td ( "Change main address for the room" ) ,
32+ [ EventType . RoomHistoryVisibility ] : _td ( "Change history visibility" ) ,
33+ [ EventType . RoomPowerLevels ] : _td ( "Change permissions" ) ,
34+ [ EventType . RoomTopic ] : _td ( "Change topic" ) ,
35+ [ EventType . RoomTombstone ] : _td ( "Upgrade the room" ) ,
36+ [ EventType . RoomEncryption ] : _td ( "Enable room encryption" ) ,
37+ [ EventType . RoomServerAcl ] : _td ( "Change server ACLs" ) ,
3638
3739 // TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
3840 "im.vector.modular.widgets" : _td ( "Modify widgets" ) ,
3941} ;
4042
4143const plEventsToShow = {
4244 // If an event is listed here, it will be shown in the PL settings. Defaults will be calculated.
43- "m.room.avatar" : { isState : true } ,
44- "m.room.name" : { isState : true } ,
45- "m.room.canonical_alias" : { isState : true } ,
46- "m.room.history_visibility" : { isState : true } ,
47- "m.room.power_levels" : { isState : true } ,
48- "m.room.topic" : { isState : true } ,
49- "m.room.tombstone" : { isState : true } ,
50- "m.room.encryption" : { isState : true } ,
45+ [ EventType . RoomAvatar ] : { isState : true } ,
46+ [ EventType . RoomName ] : { isState : true } ,
47+ [ EventType . RoomCanonicalAlias ] : { isState : true } ,
48+ [ EventType . RoomHistoryVisibility ] : { isState : true } ,
49+ [ EventType . RoomPowerLevels ] : { isState : true } ,
50+ [ EventType . RoomTopic ] : { isState : true } ,
51+ [ EventType . RoomTombstone ] : { isState : true } ,
52+ [ EventType . RoomEncryption ] : { isState : true } ,
53+ [ EventType . RoomServerAcl ] : { isState : true } ,
5154
5255 // TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
5356 "im.vector.modular.widgets" : { isState : true } ,
0 commit comments