chore: show space permissions (#2787)
This commit is contained in:
parent
3543193b4f
commit
01fee1089b
5 changed files with 33 additions and 28 deletions
|
|
@ -4932,5 +4932,7 @@
|
|||
}
|
||||
},
|
||||
"joinSpaceOnboardingDesc": "Do you have an invite code or link to a learning community?",
|
||||
"skipForNow": "Skip for now"
|
||||
"skipForNow": "Skip for now",
|
||||
"permissions": "Permissions",
|
||||
"spaceChildPermission": "Who can add new chats and subspaces to this space"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ class ChatPermissionsSettingsView extends StatelessWidget {
|
|||
)..removeWhere(
|
||||
(k, v) =>
|
||||
v is! int ||
|
||||
k.equals("m.space.child") ||
|
||||
k.equals("pangea.usranalytics") ||
|
||||
k.equals(EventTypes.RoomPowerLevels),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@ class PermissionsListTile extends StatelessWidget {
|
|||
return L10n.of(context).enableEncryption;
|
||||
case 'm.room.server_acl':
|
||||
return L10n.of(context).editBlockedServers;
|
||||
// #Pangea
|
||||
case EventTypes.SpaceChild:
|
||||
return L10n.of(context).spaceChildPermission;
|
||||
// Pangea#
|
||||
}
|
||||
}
|
||||
return permissionKey;
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ class NewGroupController extends State<NewGroup> {
|
|||
stateKey: '',
|
||||
content: {
|
||||
'events': {
|
||||
EventTypes.SpaceChild: 0,
|
||||
EventTypes.SpaceChild: 50,
|
||||
},
|
||||
'users_default': 0,
|
||||
'users': {
|
||||
|
|
|
|||
|
|
@ -294,31 +294,6 @@ class PangeaChatDetailsView extends StatelessWidget {
|
|||
),
|
||||
if (room.canInvite && !room.isDirectChat)
|
||||
Divider(color: theme.dividerColor, height: 1),
|
||||
if (isGroupChat && room.isRoomAdmin)
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10n.of(context).editChatPermissions,
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.secondary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
L10n.of(context).whoCanPerformWhichAction,
|
||||
),
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: theme.scaffoldBackgroundColor,
|
||||
foregroundColor: iconColor,
|
||||
child: const Icon(
|
||||
Icons.manage_accounts_outlined,
|
||||
),
|
||||
),
|
||||
onTap: () => context.push(
|
||||
'/rooms/${room.id}/details/permissions',
|
||||
),
|
||||
),
|
||||
if (isGroupChat && room.isRoomAdmin)
|
||||
Divider(color: theme.dividerColor, height: 1),
|
||||
if (room.isRoomAdmin &&
|
||||
room.isSpace &&
|
||||
room.spaceParents.isEmpty)
|
||||
|
|
@ -332,6 +307,31 @@ class PangeaChatDetailsView extends StatelessWidget {
|
|||
room.isSpace &&
|
||||
room.spaceParents.isEmpty)
|
||||
Divider(color: theme.dividerColor, height: 1),
|
||||
if (room.isRoomAdmin)
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10n.of(context).permissions,
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.secondary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
L10n.of(context).whoCanPerformWhichAction,
|
||||
),
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: theme.scaffoldBackgroundColor,
|
||||
foregroundColor: iconColor,
|
||||
child: const Icon(
|
||||
Icons.edit_attributes_outlined,
|
||||
),
|
||||
),
|
||||
onTap: () => context.push(
|
||||
'/rooms/${room.id}/details/permissions',
|
||||
),
|
||||
),
|
||||
if (room.isRoomAdmin)
|
||||
Divider(color: theme.dividerColor, height: 1),
|
||||
if (!room.isSpace && !room.isDirectChat)
|
||||
RoomCapacityButton(
|
||||
room: room,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue