1
1
/*
2
- Copyright 2019 New Vector Ltd
2
+ Copyright 2019, 2021 The Matrix.org Foundation C.I.C.
3
3
4
4
Licensed under the Apache License, Version 2.0 (the "License");
5
5
you may not use this file except in compliance with the License.
@@ -22,32 +22,35 @@ import * as sdk from "../../../../..";
22
22
import AccessibleButton from "../../../elements/AccessibleButton" ;
23
23
import Modal from "../../../../../Modal" ;
24
24
import { replaceableComponent } from "../../../../../utils/replaceableComponent" ;
25
+ import { EventType } from "matrix-js-sdk/src/@types/event" ;
25
26
26
27
const plEventsToLabels = {
27
28
// 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" ) ,
36
38
37
39
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
38
40
"im.vector.modular.widgets" : _td ( "Modify widgets" ) ,
39
41
} ;
40
42
41
43
const plEventsToShow = {
42
44
// 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 } ,
51
54
52
55
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
53
56
"im.vector.modular.widgets" : { isState : true } ,
0 commit comments