|
|
|
@ -1,13 +1,6 @@
|
|
|
|
import 'dart:async';
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:collection/collection.dart';
|
|
|
|
import 'package:collection/collection.dart';
|
|
|
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_linkify/flutter_linkify.dart';
|
|
|
|
|
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
|
|
|
|
import 'package:matrix/matrix.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:fluffychat/config/themes.dart';
|
|
|
|
import 'package:fluffychat/config/themes.dart';
|
|
|
|
import 'package:fluffychat/pages/chat_details/chat_details.dart';
|
|
|
|
import 'package:fluffychat/pages/chat_details/chat_details.dart';
|
|
|
|
import 'package:fluffychat/pages/chat_details/participant_list_item.dart';
|
|
|
|
import 'package:fluffychat/pages/chat_details/participant_list_item.dart';
|
|
|
|
@ -33,6 +26,11 @@ import 'package:fluffychat/widgets/hover_builder.dart';
|
|
|
|
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
|
|
|
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
|
|
|
import 'package:fluffychat/widgets/matrix.dart';
|
|
|
|
import 'package:fluffychat/widgets/matrix.dart';
|
|
|
|
import 'package:fluffychat/widgets/member_actions_popup_menu_button.dart';
|
|
|
|
import 'package:fluffychat/widgets/member_actions_popup_menu_button.dart';
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_linkify/flutter_linkify.dart';
|
|
|
|
|
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
|
|
|
|
import 'package:matrix/matrix.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class PangeaChatDetailsView extends StatelessWidget {
|
|
|
|
class PangeaChatDetailsView extends StatelessWidget {
|
|
|
|
final ChatDetailsController controller;
|
|
|
|
final ChatDetailsController controller;
|
|
|
|
@ -596,43 +594,46 @@ class RoomDetailsButton extends StatelessWidget {
|
|
|
|
return const SizedBox();
|
|
|
|
return const SizedBox();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return AbsorbPointer(
|
|
|
|
return Tooltip(
|
|
|
|
absorbing: !buttonDetails.enabled,
|
|
|
|
message: buttonDetails.title,
|
|
|
|
child: MouseRegion(
|
|
|
|
child: AbsorbPointer(
|
|
|
|
cursor: SystemMouseCursors.click,
|
|
|
|
absorbing: !buttonDetails.enabled,
|
|
|
|
child: HoverBuilder(
|
|
|
|
child: MouseRegion(
|
|
|
|
builder: (context, hovered) {
|
|
|
|
cursor: SystemMouseCursors.click,
|
|
|
|
return GestureDetector(
|
|
|
|
child: HoverBuilder(
|
|
|
|
onTap: buttonDetails.onPressed,
|
|
|
|
builder: (context, hovered) {
|
|
|
|
child: Opacity(
|
|
|
|
return GestureDetector(
|
|
|
|
opacity: buttonDetails.enabled ? 1.0 : 0.5,
|
|
|
|
onTap: buttonDetails.onPressed,
|
|
|
|
child: Container(
|
|
|
|
child: Opacity(
|
|
|
|
width: width,
|
|
|
|
opacity: buttonDetails.enabled ? 1.0 : 0.5,
|
|
|
|
height: height,
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
width: width,
|
|
|
|
color: hovered
|
|
|
|
height: height,
|
|
|
|
? Theme.of(context).colorScheme.primary.withAlpha(50)
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
: Colors.transparent,
|
|
|
|
color: hovered
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
? Theme.of(context).colorScheme.primary.withAlpha(50)
|
|
|
|
|
|
|
|
: Colors.transparent,
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
child: mini
|
|
|
|
|
|
|
|
? buttonDetails.icon
|
|
|
|
|
|
|
|
: Column(
|
|
|
|
|
|
|
|
spacing: 8.0,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
buttonDetails.icon,
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
buttonDetails.title,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
child: mini
|
|
|
|
|
|
|
|
? buttonDetails.icon
|
|
|
|
|
|
|
|
: Column(
|
|
|
|
|
|
|
|
spacing: 8.0,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
buttonDetails.icon,
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
buttonDetails.title,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|