mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-23 20:49:26 +01:00
style: Minor adjustments for modal bottom sheets
This commit is contained in:
parent
3b6321383e
commit
f24b3ee09b
@ -326,7 +326,7 @@ class ChatView extends StatelessWidget {
|
|||||||
const EdgeInsets.all(16),
|
const EdgeInsets.all(16),
|
||||||
),
|
),
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.chat_outlined,
|
Icons.forum_outlined,
|
||||||
),
|
),
|
||||||
onPressed:
|
onPressed:
|
||||||
controller.recreateChat,
|
controller.recreateChat,
|
||||||
|
@ -185,7 +185,7 @@ class ChatListViewBody extends StatelessWidget {
|
|||||||
if (controller.isSearchMode)
|
if (controller.isSearchMode)
|
||||||
SearchTitle(
|
SearchTitle(
|
||||||
title: L10n.of(context)!.chats,
|
title: L10n.of(context)!.chats,
|
||||||
icon: const Icon(Icons.chat_outlined),
|
icon: const Icon(Icons.forum_outlined),
|
||||||
),
|
),
|
||||||
if (rooms.isEmpty && !controller.isSearchMode)
|
if (rooms.isEmpty && !controller.isSearchMode)
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -45,13 +45,13 @@ class ChatListView extends StatelessWidget {
|
|||||||
badgePosition: badgePosition,
|
badgePosition: badgePosition,
|
||||||
filter:
|
filter:
|
||||||
controller.getRoomFilterByActiveFilter(ActiveFilter.messages),
|
controller.getRoomFilterByActiveFilter(ActiveFilter.messages),
|
||||||
child: const Icon(Icons.chat_outlined),
|
child: const Icon(Icons.forum_outlined),
|
||||||
),
|
),
|
||||||
selectedIcon: UnreadRoomsBadge(
|
selectedIcon: UnreadRoomsBadge(
|
||||||
badgePosition: badgePosition,
|
badgePosition: badgePosition,
|
||||||
filter:
|
filter:
|
||||||
controller.getRoomFilterByActiveFilter(ActiveFilter.messages),
|
controller.getRoomFilterByActiveFilter(ActiveFilter.messages),
|
||||||
child: const Icon(Icons.chat),
|
child: const Icon(Icons.forum),
|
||||||
),
|
),
|
||||||
label: L10n.of(context)!.messages,
|
label: L10n.of(context)!.messages,
|
||||||
),
|
),
|
||||||
@ -61,13 +61,13 @@ class ChatListView extends StatelessWidget {
|
|||||||
badgePosition: badgePosition,
|
badgePosition: badgePosition,
|
||||||
filter:
|
filter:
|
||||||
controller.getRoomFilterByActiveFilter(ActiveFilter.allChats),
|
controller.getRoomFilterByActiveFilter(ActiveFilter.allChats),
|
||||||
child: const Icon(Icons.chat_outlined),
|
child: const Icon(Icons.forum_outlined),
|
||||||
),
|
),
|
||||||
selectedIcon: UnreadRoomsBadge(
|
selectedIcon: UnreadRoomsBadge(
|
||||||
badgePosition: badgePosition,
|
badgePosition: badgePosition,
|
||||||
filter:
|
filter:
|
||||||
controller.getRoomFilterByActiveFilter(ActiveFilter.allChats),
|
controller.getRoomFilterByActiveFilter(ActiveFilter.allChats),
|
||||||
child: const Icon(Icons.chat),
|
child: const Icon(Icons.forum),
|
||||||
),
|
),
|
||||||
label: L10n.of(context)!.chats,
|
label: L10n.of(context)!.chats,
|
||||||
),
|
),
|
||||||
|
@ -169,7 +169,7 @@ class SettingsView extends StatelessWidget {
|
|||||||
trailing: const Icon(Icons.chevron_right_outlined),
|
trailing: const Icon(Icons.chevron_right_outlined),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.chat_bubble_outline_outlined),
|
leading: const Icon(Icons.forum_outlined),
|
||||||
title: Text(L10n.of(context)!.chat),
|
title: Text(L10n.of(context)!.chat),
|
||||||
onTap: () => VRouter.of(context).to('/settings/chat'),
|
onTap: () => VRouter.of(context).to('/settings/chat'),
|
||||||
trailing: const Icon(Icons.chevron_right_outlined),
|
trailing: const Icon(Icons.chevron_right_outlined),
|
||||||
|
@ -33,8 +33,8 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
onPressed: () => controller
|
onPressed: () => controller
|
||||||
.participantAction(UserBottomSheetAction.message),
|
.participantAction(UserBottomSheetAction.message),
|
||||||
icon: const Icon(Icons.chat_outlined),
|
icon: const Icon(Icons.forum_outlined),
|
||||||
label: Text(L10n.of(context)!.newChat),
|
label: Text(L10n.of(context)!.sendAMessage),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -72,7 +72,7 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
if (controller.widget.onMention != null)
|
if (controller.widget.onMention != null)
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: const Icon(Icons.alternate_email_outlined),
|
leading: const Icon(Icons.alternate_email_outlined),
|
||||||
title: Text(L10n.of(context)!.mention),
|
title: Text(L10n.of(context)!.mention),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.participantAction(UserBottomSheetAction.mention),
|
controller.participantAction(UserBottomSheetAction.mention),
|
||||||
@ -80,14 +80,14 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
if (user.canChangePowerLevel)
|
if (user.canChangePowerLevel)
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context)!.setPermissionsLevel),
|
title: Text(L10n.of(context)!.setPermissionsLevel),
|
||||||
trailing: const Icon(Icons.edit_attributes_outlined),
|
leading: const Icon(Icons.edit_attributes_outlined),
|
||||||
onTap: () => controller
|
onTap: () => controller
|
||||||
.participantAction(UserBottomSheetAction.permission),
|
.participantAction(UserBottomSheetAction.permission),
|
||||||
),
|
),
|
||||||
if (user.canKick)
|
if (user.canKick)
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context)!.kickFromChat),
|
title: Text(L10n.of(context)!.kickFromChat),
|
||||||
trailing: const Icon(Icons.exit_to_app_outlined),
|
leading: const Icon(Icons.exit_to_app_outlined),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.participantAction(UserBottomSheetAction.kick),
|
controller.participantAction(UserBottomSheetAction.kick),
|
||||||
),
|
),
|
||||||
@ -101,7 +101,7 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
else if (user.canBan && user.membership == Membership.ban)
|
else if (user.canBan && user.membership == Membership.ban)
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context)!.unbanFromChat),
|
title: Text(L10n.of(context)!.unbanFromChat),
|
||||||
trailing: const Icon(Icons.warning_outlined),
|
leading: const Icon(Icons.warning_outlined),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.participantAction(UserBottomSheetAction.unban),
|
controller.participantAction(UserBottomSheetAction.unban),
|
||||||
),
|
),
|
||||||
@ -111,7 +111,7 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
textColor: Theme.of(context).colorScheme.onErrorContainer,
|
textColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||||
iconColor: Theme.of(context).colorScheme.onErrorContainer,
|
iconColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||||
title: Text(L10n.of(context)!.ignore),
|
title: Text(L10n.of(context)!.ignore),
|
||||||
trailing: const Icon(Icons.block),
|
leading: const Icon(Icons.block),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.participantAction(UserBottomSheetAction.ignore),
|
controller.participantAction(UserBottomSheetAction.ignore),
|
||||||
),
|
),
|
||||||
@ -120,7 +120,7 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
textColor: Theme.of(context).colorScheme.error,
|
textColor: Theme.of(context).colorScheme.error,
|
||||||
iconColor: Theme.of(context).colorScheme.error,
|
iconColor: Theme.of(context).colorScheme.error,
|
||||||
title: Text(L10n.of(context)!.reportUser),
|
title: Text(L10n.of(context)!.reportUser),
|
||||||
trailing: const Icon(Icons.shield_outlined),
|
leading: const Icon(Icons.shield_outlined),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.participantAction(UserBottomSheetAction.report),
|
controller.participantAction(UserBottomSheetAction.report),
|
||||||
),
|
),
|
||||||
|
@ -8,7 +8,7 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
required Widget Function(BuildContext) builder,
|
required Widget Function(BuildContext) builder,
|
||||||
bool isDismissible = true,
|
bool isDismissible = true,
|
||||||
bool isScrollControlled = false,
|
bool isScrollControlled = true,
|
||||||
}) =>
|
}) =>
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -16,8 +16,8 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||||||
useRootNavigator: !PlatformInfos.isMobile,
|
useRootNavigator: !PlatformInfos.isMobile,
|
||||||
isDismissible: isDismissible,
|
isDismissible: isDismissible,
|
||||||
isScrollControlled: isScrollControlled,
|
isScrollControlled: isScrollControlled,
|
||||||
constraints: BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
maxHeight: MediaQuery.of(context).size.height - 128,
|
maxHeight: 480,
|
||||||
maxWidth: FluffyThemes.columnWidth * 1.5,
|
maxWidth: FluffyThemes.columnWidth * 1.5,
|
||||||
),
|
),
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
|
Loading…
Reference in New Issue
Block a user