Skip to content

Commit

Permalink
feat(role-settings): remove conditional titles for role power level s…
Browse files Browse the repository at this point in the history
…ettings
  • Loading branch information
marc.sirisak committed Jun 25, 2024
1 parent e987767 commit 4ef6a8e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import React from "react";
import { EventType, RoomMember, RoomState, RoomStateEvent, Room, IContent } from "matrix-js-sdk/src/matrix";
import { EventType, RoomMember, RoomState, RoomStateEvent, Room, IContent, M_BEACON_INFO, M_BEACON } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { throttle, get } from "lodash";
import { KnownMembership, RoomPowerLevelsEventContent } from "matrix-js-sdk/src/types";
Expand Down Expand Up @@ -279,17 +279,28 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
"im.vector.modular.widgets": isSpaceRoom ? null : _td("room_settings|permissions|m.widget"),
[VoiceBroadcastInfoEventType]: _td("room_settings|permissions|io.element.voice_broadcast_info"),

// :TCHAP: roles-power-setting-titles
[M_BEACON_INFO.name]: _td("room_settings|permissions|beacon_info"),
[M_BEACON.name]: _td("room_settings|permissions|beacon")
// end :TCHAP:
};

if (SettingsStore.getValue("feature_pinning")) {
plEventsToLabels[EventType.RoomPinnedEvents] = _td("room_settings|permissions|m.room.pinned_events");
}
// :TCHAP: roles-power-setting-titles
// if (SettingsStore.getValue("feature_pinning")) {
// plEventsToLabels[EventType.RoomPinnedEvents] = _td("room_settings|permissions|m.room.pinned_events");
// }
// // MSC3401: Native Group VoIP signaling
// if (SettingsStore.getValue("feature_group_calls")) {
// plEventsToLabels[ElementCall.CALL_EVENT_TYPE.name] = _td("room_settings|permissions|m.call");
// plEventsToLabels[ElementCall.MEMBER_EVENT_TYPE.name] = _td("room_settings|permissions|m.call.member");
// }
plEventsToLabels[EventType.RoomPinnedEvents] = _td("room_settings|permissions|m.room.pinned_events");
// MSC3401: Native Group VoIP signaling
if (SettingsStore.getValue("feature_group_calls")) {
plEventsToLabels[ElementCall.CALL_EVENT_TYPE.name] = _td("room_settings|permissions|m.call");
plEventsToLabels[ElementCall.MEMBER_EVENT_TYPE.name] = _td("room_settings|permissions|m.call.member");
}
plEventsToLabels[ElementCall.CALL_EVENT_TYPE.name] = _td("room_settings|permissions|m.call");
plEventsToLabels[ElementCall.MEMBER_EVENT_TYPE.name] = _td("room_settings|permissions|m.call.member");

// end :TCHAP:
const powerLevelDescriptors: Record<string, IPowerLevelDescriptor> = {
"users_default": {
desc: _t("room_settings|permissions|users_default"),
Expand Down
8 changes: 8 additions & 0 deletions modules/tchap-translations/tchap_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -757,5 +757,13 @@
"lasuite_numerique": {
"en": "La suite numérique",
"fr": "La suite numérique"
},
"room_settings|permissions|beacon_info": {
"en": "Share your location description data",
"fr": "Partager la description du partage de localisation"
},
"room_settings|permissions|beacon": {
"en": "Share your geolocation data",
"fr": "Partager les informations de géolocalisation"
}
}
6 changes: 6 additions & 0 deletions patches/subtree-modifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,11 @@
"files": [
"src/components/views/dialogs/InviteDialog.tsx"
]
},
"roles-power-settings-rename-titles": {
"issue": "https://github.com/tchapgouv/tchap-web-v4/issues/1017",
"files": [
"src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx"
]
}
}

0 comments on commit 4ef6a8e

Please sign in to comment.