mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:55:12 +00:00
chore: Follow up chat settings
This commit is contained in:
parent
e14173688a
commit
f36d5f8a89
4 changed files with 22 additions and 14 deletions
|
@ -750,11 +750,7 @@
|
|||
"type": "text",
|
||||
"placeholders": {}
|
||||
},
|
||||
"editChatPermissions": "Edit chat permissions",
|
||||
"@editChatPermissions": {
|
||||
"type": "text",
|
||||
"placeholders": {}
|
||||
},
|
||||
"chatPermissions": "Chat permissions",
|
||||
"editDisplayname": "Edit displayname",
|
||||
"@editDisplayname": {
|
||||
"type": "text",
|
||||
|
|
|
@ -298,14 +298,18 @@ class ChatDetailsView extends StatelessWidget {
|
|||
title: Text(
|
||||
L10n.of(context)!.whoIsAllowedToJoinThisGroup,
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
trailing: room.canChangeJoinRules
|
||||
? const Icon(Icons.chevron_right_outlined)
|
||||
: null,
|
||||
subtitle: Text(
|
||||
room.joinRules?.getLocalizedString(
|
||||
MatrixLocals(L10n.of(context)!),
|
||||
) ??
|
||||
L10n.of(context)!.none,
|
||||
),
|
||||
onTap: controller.setJoinRules,
|
||||
onTap: room.canChangeJoinRules
|
||||
? controller.setJoinRules
|
||||
: null,
|
||||
),
|
||||
if (!room.isDirectChat)
|
||||
ListTile(
|
||||
|
@ -315,7 +319,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||
foregroundColor: iconColor,
|
||||
child: const Icon(Icons.visibility_outlined),
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
trailing: room.canChangeHistoryVisibility
|
||||
? const Icon(Icons.chevron_right_outlined)
|
||||
: null,
|
||||
title: Text(
|
||||
L10n.of(context)!.visibilityOfTheChatHistory,
|
||||
),
|
||||
|
@ -325,7 +331,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||
) ??
|
||||
L10n.of(context)!.none,
|
||||
),
|
||||
onTap: controller.setHistoryVisibility,
|
||||
onTap: room.canChangeHistoryVisibility
|
||||
? controller.setHistoryVisibility
|
||||
: null,
|
||||
),
|
||||
if (room.joinRules == JoinRules.public)
|
||||
ListTile(
|
||||
|
@ -337,7 +345,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||
Icons.person_add_alt_1_outlined,
|
||||
),
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
trailing: room.canChangeGuestAccess
|
||||
? const Icon(Icons.chevron_right_outlined)
|
||||
: null,
|
||||
title: Text(
|
||||
L10n.of(context)!.areGuestsAllowedToJoin,
|
||||
),
|
||||
|
@ -346,11 +356,13 @@ class ChatDetailsView extends StatelessWidget {
|
|||
MatrixLocals(L10n.of(context)!),
|
||||
),
|
||||
),
|
||||
onTap: controller.setGuestAccess,
|
||||
onTap: room.canChangeGuestAccess
|
||||
? controller.setGuestAccess
|
||||
: null,
|
||||
),
|
||||
if (!room.isDirectChat)
|
||||
ListTile(
|
||||
title: Text(L10n.of(context)!.editChatPermissions),
|
||||
title: Text(L10n.of(context)!.chatPermissions),
|
||||
subtitle: Text(
|
||||
L10n.of(context)!.whoCanPerformWhichAction,
|
||||
),
|
||||
|
|
|
@ -19,7 +19,7 @@ class ChatPermissionsSettingsView extends StatelessWidget {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: const Center(child: BackButton()),
|
||||
title: Text(L10n.of(context)!.editChatPermissions),
|
||||
title: Text(L10n.of(context)!.chatPermissions),
|
||||
),
|
||||
body: MaxWidthBody(
|
||||
child: StreamBuilder(
|
||||
|
|
|
@ -45,7 +45,7 @@ class PermissionsListTile extends StatelessWidget {
|
|||
case EventTypes.RoomName:
|
||||
return L10n.of(context)!.changeTheNameOfTheGroup;
|
||||
case EventTypes.RoomPowerLevels:
|
||||
return L10n.of(context)!.editChatPermissions;
|
||||
return L10n.of(context)!.chatPermissions;
|
||||
case EventTypes.HistoryVisibility:
|
||||
return L10n.of(context)!.visibilityOfTheChatHistory;
|
||||
case EventTypes.RoomCanonicalAlias:
|
||||
|
|
Loading…
Reference in a new issue