design: New three column layout for wide screens
This commit is contained in:
parent
5e3c62110b
commit
d9c5cbea26
7 changed files with 287 additions and 251 deletions
|
|
@ -20,9 +20,11 @@ import 'package:scroll_to_index/scroll_to_index.dart';
|
|||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pages/chat/chat_view.dart';
|
||||
import 'package:fluffychat/pages/chat/event_info_dialog.dart';
|
||||
import 'package:fluffychat/pages/chat/recording_dialog.dart';
|
||||
import 'package:fluffychat/pages/chat_details/chat_details.dart';
|
||||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||
import 'package:fluffychat/utils/error_reporter.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/event_extension.dart';
|
||||
|
|
@ -61,10 +63,31 @@ class ChatPage extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
return ChatPageWithRoom(
|
||||
key: Key('chat_page_$roomId'),
|
||||
sideView: sideView,
|
||||
room: room,
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ChatPageWithRoom(
|
||||
key: Key('chat_page_$roomId'),
|
||||
sideView: sideView,
|
||||
room: room,
|
||||
),
|
||||
),
|
||||
if (FluffyThemes.isThreeColumnMode(context))
|
||||
Container(
|
||||
width: FluffyThemes.columnWidth,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
width: 1,
|
||||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: ChatDetails(roomId: roomId),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import 'package:fluffychat/pages/chat/chat.dart';
|
||||
import 'package:fluffychat/pages/user_bottom_sheet/user_bottom_sheet.dart';
|
||||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
|
||||
|
|
@ -19,25 +17,13 @@ class ChatAppBarTitle extends StatelessWidget {
|
|||
if (controller.selectedEvents.isNotEmpty) {
|
||||
return Text(controller.selectedEvents.length.toString());
|
||||
}
|
||||
final directChatMatrixID = room.directChatMatrixID;
|
||||
return InkWell(
|
||||
hoverColor: Colors.transparent,
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: directChatMatrixID != null
|
||||
? () => showAdaptiveBottomSheet(
|
||||
context: context,
|
||||
builder: (c) => UserBottomSheet(
|
||||
user: room
|
||||
.unsafeGetUserFromMemoryOrFallback(directChatMatrixID),
|
||||
outerContext: context,
|
||||
onMention: () => controller.sendController.text +=
|
||||
'${room.unsafeGetUserFromMemoryOrFallback(directChatMatrixID).mention} ',
|
||||
),
|
||||
)
|
||||
: controller.isArchived
|
||||
? null
|
||||
: () => context.go(['', 'rooms', room.id, 'details'].join('/')),
|
||||
onTap: controller.isArchived
|
||||
? null
|
||||
: () => context.go(['', 'rooms', room.id, 'details'].join('/')),
|
||||
child: Row(
|
||||
children: [
|
||||
Hero(
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class ChatView extends StatelessWidget {
|
|||
tooltip: L10n.of(context)!.placeCall,
|
||||
),
|
||||
EncryptionButton(controller.room),
|
||||
ChatSettingsPopupMenu(controller.room, !controller.room.isDirectChat),
|
||||
ChatSettingsPopupMenu(controller.room, true),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue