mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 02:59:26 +01:00
style: Redesign public room bottomsheets
This commit is contained in:
parent
1f71227221
commit
8632154832
@ -7,7 +7,7 @@ import 'package:matrix_link_text/link_text.dart';
|
||||
import 'package:vrouter/vrouter.dart';
|
||||
|
||||
import 'package:fluffychat/utils/url_launcher.dart';
|
||||
import 'package:fluffychat/widgets/content_banner.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import '../utils/localized_exception_extension.dart';
|
||||
|
||||
@ -71,12 +71,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||
final roomAlias = this.roomAlias;
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
titleSpacing: 0,
|
||||
backgroundColor:
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.5),
|
||||
title: Text(
|
||||
roomAlias ?? chunk!.name ?? chunk!.roomId,
|
||||
overflow: TextOverflow.fade,
|
||||
@ -87,11 +82,14 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||
tooltip: L10n.of(context)!.close,
|
||||
),
|
||||
actions: [
|
||||
TextButton.icon(
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () => _joinRoom(context),
|
||||
label: Text(L10n.of(context)!.joinRoom),
|
||||
icon: const Icon(Icons.login_outlined),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: FutureBuilder<PublicRoomsChunk>(
|
||||
@ -112,11 +110,16 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||
strokeWidth: 2),
|
||||
)
|
||||
else
|
||||
ContentBanner(
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Avatar(
|
||||
mxContent: profile.avatarUrl,
|
||||
height: 156,
|
||||
defaultIcon: Icons.group_outlined,
|
||||
client: Matrix.of(context).client,
|
||||
name: profile.name ?? roomAlias,
|
||||
size: Avatar.defaultSize * 3,
|
||||
fontSize: 36,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(profile?.name ??
|
||||
|
Loading…
Reference in New Issue
Block a user