mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
style: Enhanced chat details design
This commit is contained in:
parent
59d3793060
commit
72767f0716
@ -100,42 +100,47 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: room.canSendEvent('m.room.topic')
|
onTap: room.canSendEvent(EventTypes.RoomTopic)
|
||||||
? CircleAvatar(
|
? controller.setTopicAction
|
||||||
backgroundColor: Theme.of(context)
|
: null,
|
||||||
.scaffoldBackgroundColor,
|
trailing: room.canSendEvent(EventTypes.RoomTopic)
|
||||||
foregroundColor: iconColor,
|
? Icon(
|
||||||
radius: Avatar.defaultSize / 2,
|
Icons.edit_outlined,
|
||||||
child: const Icon(Icons.edit_outlined),
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onBackground,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
'${L10n.of(context)!.groupDescription}:',
|
L10n.of(context)!.groupDescription,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.secondary,
|
||||||
.secondary,
|
fontWeight: FontWeight.bold,
|
||||||
fontWeight: FontWeight.bold)),
|
|
||||||
subtitle: LinkText(
|
|
||||||
text: room.topic.isEmpty
|
|
||||||
? L10n.of(context)!.addGroupDescription
|
|
||||||
: room.topic,
|
|
||||||
linkStyle:
|
|
||||||
const TextStyle(color: Colors.blueAccent),
|
|
||||||
textStyle: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.bodyMedium!
|
|
||||||
.color,
|
|
||||||
),
|
),
|
||||||
onLinkTap: (url) =>
|
|
||||||
UrlLauncher(context, url).launchUrl(),
|
|
||||||
),
|
),
|
||||||
onTap: room.canSendEvent('m.room.topic')
|
|
||||||
? controller.setTopicAction
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
|
if (room.topic.isNotEmpty)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.0),
|
||||||
|
child: LinkText(
|
||||||
|
text: room.topic.isEmpty
|
||||||
|
? L10n.of(context)!.addGroupDescription
|
||||||
|
: room.topic,
|
||||||
|
linkStyle:
|
||||||
|
const TextStyle(color: Colors.blueAccent),
|
||||||
|
textStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyMedium!
|
||||||
|
.color,
|
||||||
|
),
|
||||||
|
onLinkTap: (url) =>
|
||||||
|
UrlLauncher(context, url).launchUrl(),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
@ -39,17 +39,27 @@ class ParticipantListItem extends StatelessWidget {
|
|||||||
title: Row(
|
title: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(user.calcDisplayname()),
|
Text(user.calcDisplayname()),
|
||||||
permissionBatch.isEmpty
|
if (permissionBatch.isNotEmpty)
|
||||||
? Container()
|
Container(
|
||||||
: Container(
|
padding: const EdgeInsets.symmetric(
|
||||||
padding: const EdgeInsets.all(4),
|
horizontal: 4,
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 8),
|
vertical: 2,
|
||||||
decoration: BoxDecoration(
|
),
|
||||||
color: Theme.of(context).secondaryHeaderColor,
|
margin: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
borderRadius: BorderRadius.circular(8),
|
decoration: BoxDecoration(
|
||||||
),
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
child: Center(child: Text(permissionBatch)),
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
)),
|
||||||
|
child: Text(
|
||||||
|
permissionBatch,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
membershipBatch[user.membership]!.isEmpty
|
membershipBatch[user.membership]!.isEmpty
|
||||||
? Container()
|
? Container()
|
||||||
: Container(
|
: Container(
|
||||||
|
Loading…
Reference in New Issue
Block a user