chore: move activity goal tooltip outside of chat input bar background color (#4703)
This commit is contained in:
parent
0d2175d677
commit
2a71560574
3 changed files with 147 additions and 78 deletions
|
|
@ -422,84 +422,76 @@ class ChatView extends StatelessWidget {
|
|||
// #Pangea
|
||||
// else if (controller.room.canSendDefaultMessages &&
|
||||
// controller.room.membership == Membership.join)
|
||||
// Container(
|
||||
// margin: EdgeInsets.all(bottomSheetPadding),
|
||||
// constraints: const BoxConstraints(
|
||||
// maxWidth: FluffyThemes.maxTimelineWidth,
|
||||
// ),
|
||||
// alignment: Alignment.center,
|
||||
// child: Material(
|
||||
// clipBehavior: Clip.hardEdge,
|
||||
// color: controller.selectedEvents.isNotEmpty
|
||||
// ? theme.colorScheme.tertiaryContainer
|
||||
// : theme.colorScheme.surfaceContainerHigh,
|
||||
// borderRadius: const BorderRadius.all(
|
||||
// Radius.circular(24),
|
||||
// ),
|
||||
// child: controller.room.isAbandonedDMRoom == true
|
||||
// ? Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceEvenly,
|
||||
// children: [
|
||||
// TextButton.icon(
|
||||
// style: TextButton.styleFrom(
|
||||
// padding: const EdgeInsets.all(
|
||||
// 16,
|
||||
// ),
|
||||
// foregroundColor:
|
||||
// theme.colorScheme.error,
|
||||
// ),
|
||||
// icon: const Icon(
|
||||
// Icons.archive_outlined,
|
||||
// ),
|
||||
// onPressed: controller.leaveChat,
|
||||
// label: Text(
|
||||
// L10n.of(context).leave,
|
||||
// ),
|
||||
// ),
|
||||
// TextButton.icon(
|
||||
// style: TextButton.styleFrom(
|
||||
// padding: const EdgeInsets.all(
|
||||
// 16,
|
||||
// ),
|
||||
// ),
|
||||
// icon: const Icon(
|
||||
// Icons.forum_outlined,
|
||||
// ),
|
||||
// onPressed: controller.recreateChat,
|
||||
// label: Text(
|
||||
// L10n.of(context).reopenChat,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// : Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// ReplyDisplay(controller),
|
||||
// ChatInputRow(controller),
|
||||
// ChatEmojiPicker(controller),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
else if (controller.room.canSendDefaultMessages &&
|
||||
controller.room.membership == Membership.join &&
|
||||
(controller.room.activityPlan == null ||
|
||||
!controller.room.showActivityChatUI ||
|
||||
controller.room.isActiveInActivity))
|
||||
// Pangea#
|
||||
Container(
|
||||
margin: EdgeInsets.all(bottomSheetPadding),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: FluffyThemes.maxTimelineWidth,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Material(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
// #Pangea
|
||||
// color: controller.selectedEvents.isNotEmpty
|
||||
// ? theme.colorScheme.tertiaryContainer
|
||||
// : theme.colorScheme.surfaceContainerHigh,
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
// Pangea#
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(24),
|
||||
),
|
||||
child: controller.room.isAbandonedDMRoom == true
|
||||
? Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton.icon(
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.all(
|
||||
16,
|
||||
),
|
||||
foregroundColor:
|
||||
theme.colorScheme.error,
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.archive_outlined,
|
||||
),
|
||||
onPressed: controller.leaveChat,
|
||||
label: Text(
|
||||
L10n.of(context).leave,
|
||||
),
|
||||
),
|
||||
TextButton.icon(
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.all(
|
||||
16,
|
||||
),
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.forum_outlined,
|
||||
),
|
||||
onPressed: controller.recreateChat,
|
||||
label: Text(
|
||||
L10n.of(context).reopenChat,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
// #Pangea
|
||||
// : Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// ReplyDisplay(controller),
|
||||
// ChatInputRow(controller),
|
||||
// ChatEmojiPicker(controller),
|
||||
// ],
|
||||
// ),
|
||||
: ChatInputBar(
|
||||
controller: controller,
|
||||
padding: bottomSheetPadding,
|
||||
),
|
||||
|
||||
// Pangea#
|
||||
),
|
||||
ChatInputBar(
|
||||
controller: controller,
|
||||
padding: bottomSheetPadding,
|
||||
)
|
||||
// #Pangea
|
||||
else if (controller.room.activityPlan != null &&
|
||||
controller.room.showActivityChatUI &&
|
||||
!controller.room.isActiveInActivity)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pangea/activity_sessions/activity_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/instructions/instructions_inline_tooltip.dart';
|
||||
|
||||
|
|
@ -30,7 +31,11 @@ class ActivityRoleTooltip extends StatelessWidget {
|
|||
onClose: () async {
|
||||
await room.dismissGoalTooltip();
|
||||
},
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: EdgeInsets.only(
|
||||
left: 16.0,
|
||||
right: 16.0,
|
||||
top: FluffyThemes.isColumnMode(context) ? 16.0 : 8.0,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/pages/chat/chat.dart';
|
||||
import 'package:fluffychat/pages/chat/chat_emoji_picker.dart';
|
||||
import 'package:fluffychat/pages/chat/reply_display.dart';
|
||||
|
|
@ -19,6 +21,7 @@ class ChatInputBar extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
|
@ -26,12 +29,81 @@ class ChatInputBar extends StatelessWidget {
|
|||
room: controller.room,
|
||||
hide: controller.choreographer.itController.open,
|
||||
),
|
||||
ITBar(choreographer: controller.choreographer),
|
||||
ReplyDisplay(controller),
|
||||
PangeaChatInputRow(
|
||||
controller: controller,
|
||||
Container(
|
||||
margin: EdgeInsets.all(
|
||||
FluffyThemes.isColumnMode(context) ? 16.0 : 8.0,
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: FluffyThemes.maxTimelineWidth,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Material(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(24),
|
||||
),
|
||||
child: controller.room.isAbandonedDMRoom == true
|
||||
? _AbandonedDMContent(controller: controller)
|
||||
: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ITBar(choreographer: controller.choreographer),
|
||||
ReplyDisplay(controller),
|
||||
PangeaChatInputRow(
|
||||
controller: controller,
|
||||
),
|
||||
ChatEmojiPicker(controller),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AbandonedDMContent extends StatelessWidget {
|
||||
final ChatController controller;
|
||||
|
||||
const _AbandonedDMContent({
|
||||
required this.controller,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton.icon(
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.all(
|
||||
16,
|
||||
),
|
||||
foregroundColor: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.archive_outlined,
|
||||
),
|
||||
onPressed: controller.leaveChat,
|
||||
label: Text(
|
||||
L10n.of(context).leave,
|
||||
),
|
||||
),
|
||||
TextButton.icon(
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.all(
|
||||
16,
|
||||
),
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.forum_outlined,
|
||||
),
|
||||
onPressed: controller.recreateChat,
|
||||
label: Text(
|
||||
L10n.of(context).reopenChat,
|
||||
),
|
||||
),
|
||||
ChatEmojiPicker(controller),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue