fluffychat merge

This commit is contained in:
ggurdin 2026-02-03 14:59:06 -05:00
commit 70298d5e88
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
12 changed files with 11300 additions and 11260 deletions

File diff suppressed because it is too large Load diff

View file

@ -3375,6 +3375,7 @@
"@moreEvents": {},
"declineInvitation": "Decline invitation",
"@declineInvitation": {},
"noMessagesYet": "No messages yet",
"ignore": "Block",
"ignoredUsers": "Blocked users",
"writeAMessageLangCodes": "Type in {l1} or {l2}...",

View file

@ -2651,6 +2651,23 @@
}
}
},
"hideUnimportantStateEvents": "Skjul uviktige tilstandshendelser",
"@hideUnimportantStateEvents": {},
"hidePresences": "Skjul statuslisten?",
"@hidePresences": {},
"signInWithPassword": "Logg inn med passord",
"@signInWithPassword": {},
"pleaseTryAgainLaterOrChooseDifferentServer": "Prøv igjen senere eller velg en annen server.",
"@pleaseTryAgainLaterOrChooseDifferentServer": {},
"signInWith": "Logg inn med {provider}",
"@signInWith": {
"type": "String",
"placeholders": {
"provider": {
"type": "String"
}
}
},
"alwaysUse24HourFormat": "falsk",
"commandHint_googly": "Send noen googly-øyne",
"commandHint_cuddle": "Send en kose",
@ -2764,15 +2781,10 @@
"enterRoom": "Gå inn i rommet",
"allSpaces": "Alle rom",
"numChats": "{number} chatter",
"hideUnimportantStateEvents": "Skjul uviktige tilstandsoppdateringer",
"hidePresences": "Skjul statusliste?",
"wasDirectChatDisplayName": "Tom chat (var {oldDisplayName})",
"newSpaceDescription": "Rom lar deg konsolidere dine chatter og bygge private eller offentlige fellesskap.",
"noBackupWarning": "Advarsel! Uten å aktivere chat-sikkerhetskopi vil du miste tilgangen til dine krypterte meldinger. Det anbefales sterkt å aktivere chat-sikkerhetskopi før du logger ut.",
"report": "rapporter",
"signInWithPassword": "Logg inn med passord",
"pleaseTryAgainLaterOrChooseDifferentServer": "Vennligst prøv igjen senere eller velg en annen server.",
"signInWith": "Logg inn med {provider}",
"roomUpgradeDescription": "Deretter vil chatten bli opprettet på nytt med den nye romversjonen. Alle deltakere vil bli varslet om at de må bytte til den nye chatten. Du kan finne mer informasjon om romversjoner på https://spec.matrix.org/latest/rooms/",
"banUserDescription": "Brukeren vil bli utestengt fra chatten og vil ikke kunne komme inn igjen før de blir unbannet.",
"unbanUserDescription": "Brukeren vil kunne komme inn i chatten igjen hvis de prøver.",
@ -4511,14 +4523,6 @@
}
}
},
"@hideUnimportantStateEvents": {
"type": "String",
"placeholders": {}
},
"@hidePresences": {
"type": "String",
"placeholders": {}
},
"@wasDirectChatDisplayName": {
"type": "String",
"placeholders": {
@ -4539,22 +4543,6 @@
"type": "String",
"placeholders": {}
},
"@signInWithPassword": {
"type": "String",
"placeholders": {}
},
"@pleaseTryAgainLaterOrChooseDifferentServer": {
"type": "String",
"placeholders": {}
},
"@signInWith": {
"type": "String",
"placeholders": {
"provider": {
"type": "String"
}
}
},
"@roomUpgradeDescription": {
"type": "String",
"placeholders": {}

View file

@ -82,7 +82,7 @@
"type": "String",
"placeholders": {}
},
"areGuestsAllowedToJoin": "Visitantes podem entrar?",
"areGuestsAllowedToJoin": "Visitantes podem entrar",
"@areGuestsAllowedToJoin": {
"type": "String",
"placeholders": {}
@ -3296,7 +3296,7 @@
"@boldText": {},
"recordAVideo": "Gravar um vídeo",
"@recordAVideo": {},
"optionalMessage": "Mensagem... (opcional)",
"optionalMessage": "(Opcional) mensagem...",
"@optionalMessage": {},
"joinedChats": "Conversas que entrou",
"@joinedChats": {},

View file

@ -228,13 +228,12 @@ class ChatListItem extends StatelessWidget {
color: theme.colorScheme.primary,
),
),
if (!room.isSpace &&
lastEvent != null &&
room.membership != Membership.invite)
if (!room.isSpace && room.membership != Membership.invite)
Padding(
padding: const EdgeInsets.only(left: 4.0),
child: Text(
lastEvent.originServerTs.localizedTimeShort(context),
room.latestEventReceivedTime
.localizedTimeShort(context),
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
@ -350,7 +349,7 @@ class ChatListItem extends StatelessWidget {
: L10n.of(context).inviteChat)
// Pangea#
: snapshot.data ??
L10n.of(context).emptyChat,
L10n.of(context).noMessagesYet,
softWrap: false,
maxLines:
room.notificationCount >= 1 ? 2 : 1,

View file

@ -164,13 +164,24 @@ class PresenceAvatar extends StatelessWidget {
borderRadius:
BorderRadius.circular(avatarSize),
),
child: Avatar(
name: displayName,
// #Pangea
userId: profile?.userId,
// Pangea#
mxContent: profile?.avatarUrl,
size: avatarSize - 6,
alignment: Alignment.center,
child: Container(
height: avatarSize - 6,
alignment: Alignment.center,
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius:
BorderRadius.circular(avatarSize),
),
padding: const EdgeInsets.all(3.0),
child: Avatar(
name: displayName,
mxContent: profile?.avatarUrl,
size: avatarSize - 12,
// #Pangea
userId: profile?.userId,
// Pangea#
),
),
),
// #Pangea
@ -208,57 +219,68 @@ class PresenceAvatar extends StatelessWidget {
left: 0,
top: 0,
right: 8,
child: Material(
elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2,
),
color: statusMsgBubbleColor,
child: Padding(
padding: const EdgeInsets.all(2.0),
child: Text(
statusMsg,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: Colors.black,
fontSize: 9,
child: Column(
spacing: 2,
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Material(
elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2,
),
color: statusMsgBubbleColor,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 2.0,
horizontal: 4.0,
),
child: Text(
statusMsg,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: Colors.black,
fontSize: 9,
),
),
),
),
),
),
),
Positioned(
left: 8,
top: 32,
child: Material(
color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2,
),
child: const SizedBox(
width: 8,
height: 8,
),
),
),
Positioned(
left: 14,
top: 40,
child: Material(
color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2,
),
child: const SizedBox(
width: 4,
height: 4,
),
Padding(
padding:
const EdgeInsets.only(left: 8.0),
child: Material(
color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation,
shadowColor:
statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius,
),
child: const SizedBox.square(
dimension: 8,
),
),
),
Padding(
padding:
const EdgeInsets.only(left: 13.0),
child: Material(
color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation,
shadowColor:
statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius,
),
child: const SizedBox.square(
dimension: 5,
),
),
),
],
),
),
],

View file

@ -1,11 +1,28 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluffychat/config/app_config.dart';
class AdaptiveDialogAction extends StatelessWidget {
final VoidCallback? onPressed;
final bool autofocus;
final Widget child;
final bool bigButtons;
final BorderRadius? borderRadius;
static const BorderRadius topRadius = BorderRadius.only(
topLeft: Radius.circular(AppConfig.borderRadius),
topRight: Radius.circular(AppConfig.borderRadius),
bottomLeft: Radius.circular(2),
bottomRight: Radius.circular(2),
);
static const BorderRadius centerRadius = BorderRadius.all(Radius.circular(2));
static const BorderRadius bottomRadius = BorderRadius.only(
bottomLeft: Radius.circular(AppConfig.borderRadius),
bottomRight: Radius.circular(AppConfig.borderRadius),
topLeft: Radius.circular(2),
topRight: Radius.circular(2),
);
const AdaptiveDialogAction({
super.key,
@ -13,6 +30,7 @@ class AdaptiveDialogAction extends StatelessWidget {
required this.child,
this.autofocus = false,
this.bigButtons = false,
this.borderRadius,
});
@override
@ -25,11 +43,15 @@ class AdaptiveDialogAction extends StatelessWidget {
case TargetPlatform.windows:
if (bigButtons) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
padding: const EdgeInsets.symmetric(vertical: 2.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: borderRadius ??
BorderRadius.circular(AppConfig.borderRadius),
),
backgroundColor: autofocus
? theme.colorScheme.primary
: theme.colorScheme.surfaceBright,

View file

@ -210,6 +210,7 @@ class PublicRoomDialog extends StatelessWidget {
actions: [
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.topRadius,
onPressed: () => _joinRoom(context),
child: Text(
chunk?.joinRule == 'knock' &&
@ -222,6 +223,7 @@ class PublicRoomDialog extends StatelessWidget {
),
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.bottomRadius,
onPressed: Navigator.of(context).pop,
child: Text(L10n.of(context).close),
),

View file

@ -75,6 +75,22 @@ class UserDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Center(
child: Avatar(
mxContent: avatar,
name: displayname,
size: Avatar.defaultSize * 2,
onTap: avatar != null
? () => showDialog(
context: context,
builder: (_) => MxcImageViewer(avatar),
)
: null,
// #Pangea
userId: profile.userId,
// Pangea#
),
),
HoverBuilder(
builder: (context, hovered) => StatefulBuilder(
builder: (context, setState) => MouseRegion(
@ -123,22 +139,6 @@ class UserDialog extends StatelessWidget {
),
),
),
Center(
child: Avatar(
mxContent: avatar,
name: displayname,
size: Avatar.defaultSize * 2,
onTap: avatar != null
? () => showDialog(
context: context,
builder: (_) => MxcImageViewer(avatar),
)
: null,
// #Pangea
userId: profile.userId,
// Pangea#
),
),
if (presenceText != null)
Text(
presenceText,
@ -180,6 +180,7 @@ class UserDialog extends StatelessWidget {
actions: [
if (client.userID != profile.userId) ...[
AdaptiveDialogAction(
borderRadius: AdaptiveDialogAction.topRadius,
bigButtons: true,
onPressed: () async {
final router = GoRouter.of(context);
@ -206,6 +207,7 @@ class UserDialog extends StatelessWidget {
),
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.centerRadius,
onPressed: () {
final router = GoRouter.of(context);
Navigator.of(context).pop();
@ -222,6 +224,7 @@ class UserDialog extends StatelessWidget {
],
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.bottomRadius,
onPressed: Navigator.of(context).pop,
child: Text(L10n.of(context).close),
),

View file

@ -14,7 +14,7 @@ Future<int?> showPermissionChooser(
return await showAdaptiveDialog<int>(
context: context,
builder: (context) => AlertDialog.adaptive(
title: Text(L10n.of(context).chatPermissions),
title: Center(child: Text(L10n.of(context).chatPermissions)),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 256, maxHeight: 256),
child: Column(
@ -39,6 +39,7 @@ Future<int?> showPermissionChooser(
actions: [
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.topRadius,
onPressed: () {
final level = int.tryParse(controller.text.trim());
if (level == null) {
@ -55,18 +56,23 @@ Future<int?> showPermissionChooser(
),
if (maxLevel >= 100 && currentLevel != 100)
AdaptiveDialogAction(
borderRadius: AdaptiveDialogAction.centerRadius,
bigButtons: true,
onPressed: () => Navigator.of(context).pop<int>(100),
child: Text(L10n.of(context).admin),
),
if (maxLevel >= 50 && currentLevel != 50)
AdaptiveDialogAction(
borderRadius: maxLevel != 0
? AdaptiveDialogAction.centerRadius
: AdaptiveDialogAction.bottomRadius,
bigButtons: true,
onPressed: () => Navigator.of(context).pop<int>(50),
child: Text(L10n.of(context).moderator),
),
if (currentLevel != 0)
AdaptiveDialogAction(
borderRadius: AdaptiveDialogAction.bottomRadius,
bigButtons: true,
onPressed: () => Navigator.of(context).pop<int>(0),
child: Text(L10n.of(context).normalUser),

View file

@ -445,10 +445,10 @@ packages:
dependency: transitive
description:
name: dart_webrtc
sha256: a2ae542cdadc21359022adedc26138fa3487cc3b3547c24ff4f556681869e28c
sha256: "51bcda4ba5d7dd9e65a309244ce3ac0b58025e6e1f6d7442cee4cd02134ef65f"
url: "https://pub.dev"
source: hosted
version: "1.5.3+hotfix.4"
version: "1.6.0"
dbus:
dependency: transitive
description:
@ -589,10 +589,10 @@ packages:
dependency: "direct main"
description:
name: file_selector
sha256: "5019692b593455127794d5718304ff1ae15447dea286cdda9f0db2a796a1b828"
sha256: "5f1d15a7f17115038f433d1b0ea57513cc9e29a9d5338d166cb0bef3fa90a7a0"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
version: "1.0.4"
file_selector_android:
dependency: transitive
description:
@ -799,10 +799,10 @@ packages:
dependency: "direct main"
description:
name: flutter_local_notifications
sha256: a9966c850de5e445331b854fa42df96a8020066d67f125a5964cbc6556643f68
sha256: "7ed76be64e8a7d01dfdf250b8434618e2a028c9dfa2a3c41dc9b531d4b3fc8a5"
url: "https://pub.dev"
source: hosted
version: "19.4.1"
version: "19.4.2"
flutter_local_notifications_linux:
dependency: transitive
description:
@ -823,10 +823,10 @@ packages:
dependency: transitive
description:
name: flutter_local_notifications_windows
sha256: ed46d7ae4ec9d19e4c8fa2badac5fe27ba87a3fe387343ce726f927af074ec98
sha256: "8d658f0d367c48bd420e7cf2d26655e2d1130147bca1eea917e576ca76668aaf"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
version: "1.0.3"
flutter_localizations:
dependency: "direct main"
description: flutter
@ -992,10 +992,10 @@ packages:
dependency: "direct main"
description:
name: flutter_webrtc
sha256: "945d0a38b90fbca8257eadb167d8fb9fa7075d9a1939fd2953c10054454d1de2"
sha256: "71a38363a5b50603e405c275f30de2eb90f980b0cc94b0e1e9d8b9d6a6b03bf0"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.1"
freezed_annotation:
dependency: transitive
description:

View file

@ -33,13 +33,13 @@ dependencies:
emoji_picker_flutter: ^4.3.0
emojis: ^0.9.9
file_picker: ^10.3.3
file_selector: ^1.0.3
file_selector: ^1.0.4
flutter:
sdk: flutter
flutter_foreground_task: ^9.1.0
flutter_highlighter: ^0.1.1
flutter_linkify: ^6.0.0
flutter_local_notifications: ^19.4.1
flutter_local_notifications: ^19.4.2
flutter_localizations:
sdk: flutter
flutter_map: ^8.2.1
@ -49,7 +49,7 @@ dependencies:
flutter_shortcuts_new: ^2.0.0
flutter_vodozemac: ^0.2.2
flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379
flutter_webrtc: ^1.1.0
flutter_webrtc: ^1.2.0
geolocator: ^14.0.2
go_router: ^16.2.1
handy_window: ^0.4.0