Compare commits

...

2 Commits

Author SHA1 Message Date
288b5e70d4 feat: wallpaper padrao nas conversas, logo colorida na sidebar e ajustes na aba de espacos
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled
2026-09-23 14:14:02 -03:00
c0463e51f9 fix: tema correto na lista de murais, borda nos itens de chat e ajustes no perfil 2026-09-23 12:14:18 -03:00
11 changed files with 344 additions and 325 deletions

BIN
assets/logo/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@@ -2010,7 +2010,7 @@
"select": "Selecionar", "select": "Selecionar",
"pleaseChooseAStrongPassword": "Escolha uma senha forte", "pleaseChooseAStrongPassword": "Escolha uma senha forte",
"blockUsername": "Ignorar nome de usuário", "blockUsername": "Ignorar nome de usuário",
"addChatOrSubSpace": "Adicionar conversa ou subespaço", "addChatOrSubSpace": "Criar grupo aqui",
"groupName": "Nome do grupo", "groupName": "Nome do grupo",
"leaveEmptyToClearStatus": "Deixe em branco para limpar seu estado.", "leaveEmptyToClearStatus": "Deixe em branco para limpar seu estado.",
"joinSpace": "Entrar no espaço", "joinSpace": "Entrar no espaço",

View File

@@ -13,7 +13,6 @@ import 'package:tatchat/pages/chat/encryption_info.dart';
import 'package:tatchat/pages/chat/events/message.dart'; import 'package:tatchat/pages/chat/events/message.dart';
import 'package:tatchat/pages/chat/seen_by_row.dart'; import 'package:tatchat/pages/chat/seen_by_row.dart';
import 'package:tatchat/pages/chat/typing_indicators.dart'; import 'package:tatchat/pages/chat/typing_indicators.dart';
import 'package:tatchat/utils/account_config.dart';
import 'package:tatchat/utils/matrix_sdk_extensions/filtered_timeline_extension.dart'; import 'package:tatchat/utils/matrix_sdk_extensions/filtered_timeline_extension.dart';
import 'package:tatchat/utils/platform_infos.dart'; import 'package:tatchat/utils/platform_infos.dart';
import 'package:material_ui/material_ui.dart'; import 'package:material_ui/material_ui.dart';
@@ -53,8 +52,7 @@ class ChatEventList extends StatelessWidget {
thisEventsKeyMap[events[i].eventId] = i; thisEventsKeyMap[events[i].eventId] = i;
} }
final hasWallpaper = const hasWallpaper = true;
controller.room.client.applicationAccountConfig.wallpaperUrl != null;
return SelectionArea( return SelectionArea(
child: MediaQuery( child: MediaQuery(

View File

@@ -352,22 +352,35 @@ class ChatView extends StatelessWidget {
top: false, top: false,
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
if (accountConfig.wallpaperUrl != null)
Opacity( Opacity(
opacity: accountConfig.wallpaperOpacity ?? 0.5, opacity: accountConfig.wallpaperUrl != null
? accountConfig.wallpaperOpacity ?? 0.5
: 0.3,
child: ImageFiltered( child: ImageFiltered(
imageFilter: ui.ImageFilter.blur( imageFilter: ui.ImageFilter.blur(
sigmaX: accountConfig.wallpaperBlur ?? 0.0, sigmaX: accountConfig.wallpaperUrl != null
sigmaY: accountConfig.wallpaperBlur ?? 0.0, ? accountConfig.wallpaperBlur ?? 0.0
: 0.0,
sigmaY: accountConfig.wallpaperUrl != null
? accountConfig.wallpaperBlur ?? 0.0
: 0.0,
), ),
child: MxcImage( child: accountConfig.wallpaperUrl != null
cacheKey: accountConfig.wallpaperUrl.toString(), ? MxcImage(
cacheKey: accountConfig.wallpaperUrl
.toString(),
uri: accountConfig.wallpaperUrl, uri: accountConfig.wallpaperUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
height: MediaQuery.sizeOf(context).height, height: MediaQuery.sizeOf(context).height,
width: MediaQuery.sizeOf(context).width, width: MediaQuery.sizeOf(context).width,
isThumbnail: false, isThumbnail: false,
placeholder: (_) => Container(), placeholder: (_) => Container(),
)
: Image.asset(
'./assets/logo/background.png',
fit: BoxFit.cover,
height: MediaQuery.sizeOf(context).height,
width: MediaQuery.sizeOf(context).width,
), ),
), ),
), ),

View File

@@ -73,10 +73,15 @@ class ChatListItem extends StatelessWidget {
final space = this.space; final space = this.space;
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Material( child: Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius), borderRadius: BorderRadius.circular(AppConfig.borderRadius),
clipBehavior: Clip.hardEdge, side: BorderSide(
color: theme.colorScheme.surfaceContainer,
width: 1.5,
),
), clipBehavior: Clip.hardEdge,
color: backgroundColor, color: backgroundColor,
child: FutureBuilder( child: FutureBuilder(
future: room.name.isEmpty ? room.loadHeroUsers() : null, future: room.name.isEmpty ? room.loadHeroUsers() : null,

View File

@@ -2,7 +2,7 @@
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
import 'package:flutter/material.dart'; import 'package:material_ui/material_ui.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'package:tatchat/config/app_config.dart'; import 'package:tatchat/config/app_config.dart';
import 'package:tatchat/l10n/l10n.dart'; import 'package:tatchat/l10n/l10n.dart';
@@ -45,7 +45,7 @@ class MuralListItem extends StatelessWidget {
final isMuted = room.pushRuleState != PushRuleState.notify; final isMuted = room.pushRuleState != PushRuleState.notify;
final backgroundColor = activeChat final backgroundColor = activeChat
? theme.colorScheme.secondaryContainer ? theme.colorScheme.secondaryContainer
: theme.colorScheme.surfaceContainerLow; : theme.colorScheme.surface;
final description = this.description; final description = this.description;
final creatorName = this.creatorName; final creatorName = this.creatorName;
final followers = room.summary.mJoinedMemberCount ?? 0; final followers = room.summary.mJoinedMemberCount ?? 0;
@@ -56,7 +56,13 @@ class MuralListItem extends StatelessWidget {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Material( child: Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius), borderRadius: BorderRadius.circular(AppConfig.borderRadius),
side: BorderSide(
color: theme.colorScheme.surfaceContainer,
width: 1.5,
),
),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
color: backgroundColor, color: backgroundColor,
child: InkWell( child: InkWell(
@@ -79,6 +85,13 @@ class MuralListItem extends StatelessWidget {
shapeBorder: const CircleBorder(), shapeBorder: const CircleBorder(),
), ),
const SizedBox(width: 12), const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded( Expanded(
flex: 3, flex: 3,
child: Text( child: Text(
@@ -93,7 +106,10 @@ class MuralListItem extends StatelessWidget {
if (isMuted) if (isMuted)
const Padding( const Padding(
padding: EdgeInsets.only(left: 4), padding: EdgeInsets.only(left: 4),
child: Icon(Icons.notifications_off_outlined, size: 16), child: Icon(
Icons.notifications_off_outlined,
size: 16,
),
), ),
if (room.isFavourite) if (room.isFavourite)
Padding( Padding(
@@ -104,8 +120,14 @@ class MuralListItem extends StatelessWidget {
color: theme.colorScheme.primary, color: theme.colorScheme.primary,
), ),
), ),
if (creatorName != null && creatorName.isNotEmpty) ...[ ],
const SizedBox(width: 12), ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (creatorName != null &&
creatorName.isNotEmpty) ...[
// const SizedBox(width: 12),
Flexible( Flexible(
flex: 1, flex: 1,
child: Text( child: Text(
@@ -118,14 +140,26 @@ class MuralListItem extends StatelessWidget {
), ),
), ),
], ],
const SizedBox(width: 8), const Spacer(),
Row(
children: [
Icon( Icon(
Icons.group_outlined, Icons.group_outlined,
size: 16, size: 16,
color: theme.colorScheme.onSurfaceVariant, color: theme.colorScheme.onSurfaceVariant,
), ),
const SizedBox(width: 4), const SizedBox(width: 2),
Text(l10n.countFollowers(followers), style: mutedStyle), Text(
l10n.countFollowers(followers),
style: mutedStyle,
),
],
),
],
),
],
),
),
], ],
), ),
if (description != null && description.isNotEmpty) if (description != null && description.isNotEmpty)
@@ -133,7 +167,7 @@ class MuralListItem extends StatelessWidget {
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),
child: Text( child: Text(
description, description,
maxLines: 2, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodySmall?.copyWith( style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant, color: theme.colorScheme.onSurfaceVariant,

View File

@@ -4,11 +4,10 @@
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:tatchat/config/app_config.dart';
import 'package:tatchat/widgets/hover_builder.dart';
import 'package:tatchat/widgets/unread_rooms_badge.dart';
import 'package:material_ui/material_ui.dart'; import 'package:material_ui/material_ui.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'package:tatchat/widgets/hover_builder.dart';
import 'package:tatchat/widgets/unread_rooms_badge.dart';
import '../../config/themes.dart'; import '../../config/themes.dart';
@@ -33,7 +32,7 @@ class NaviRailItem extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
final borderRadius = BorderRadius.circular(AppConfig.borderRadius); final borderRadius = BorderRadius.circular(1000);
final icon = isSelected ? selectedIcon ?? this.icon : this.icon; final icon = isSelected ? selectedIcon ?? this.icon : this.icon;
final unreadBadgeFilter = this.unreadBadgeFilter; final unreadBadgeFilter = this.unreadBadgeFilter;
return HoverBuilder( return HoverBuilder(
@@ -73,7 +72,7 @@ class NaviRailItem extends StatelessWidget {
borderRadius: borderRadius, borderRadius: borderRadius,
color: isSelected color: isSelected
? theme.colorScheme.secondaryContainer ? theme.colorScheme.secondaryContainer
: Colors.transparent, : theme.colorScheme.surfaceContainerHighest,
child: Tooltip( child: Tooltip(
message: toolTip, message: toolTip,
child: InkWell( child: InkWell(

View File

@@ -36,19 +36,25 @@ class Sidebar extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16, horizontal: 16,
vertical: 14, vertical: 4,
), ),
child: Row( child: Row(
children: [ children: [
Image.asset( ColorFiltered(
colorFilter: ColorFilter.mode(
theme.colorScheme.primary,
BlendMode.srcIn,
),
child: Image.asset(
'./assets/logo/mini/logo_mini.png', './assets/logo/mini/logo_mini.png',
width: 28, width: 58,
height: 28, height: 58,
),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(
'TatuChat', 'TatuChat',
style: theme.textTheme.titleMedium?.copyWith( style: theme.textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: theme.colorScheme.onSurface, color: theme.colorScheme.onSurface,
), ),

View File

@@ -375,24 +375,13 @@ class _SpaceViewState extends State<SpaceView> {
theme.colorScheme.onPrimaryContainer, theme.colorScheme.onPrimaryContainer,
), ),
), ),
suffixIcon: PopupMenuButton<SpaceActions>(
icon: Avatar(
size: avatarSize,
mxContent: room.avatar,
name: displayname,
shapeBorder: RoundedSuperellipseBorder(
side: BorderSide(
width: 1,
color: theme.dividerColor,
),
borderRadius: BorderRadius.circular(
AppConfig.spaceBorderRadius,
), ),
), ),
borderRadius: BorderRadius.circular(
AppConfig.spaceBorderRadius,
),
), ),
const SizedBox(width: 8),
PopupMenuButton<SpaceActions>(
tooltip: L10n.of(context).settings,
useRootNavigator: true, useRootNavigator: true,
onSelected: _onSpaceAction, onSelected: _onSpaceAction,
itemBuilder: (context) => [ itemBuilder: (context) => [
@@ -400,45 +389,28 @@ class _SpaceViewState extends State<SpaceView> {
PopupMenuItem( PopupMenuItem(
value: SpaceActions.addChild, value: SpaceActions.addChild,
child: ListTile( child: ListTile(
leading: Icon(Icons.edit_square), leading: Icon(Icons.add_circle_outline_rounded),
title: Text( title: Text(
L10n.of( L10n.of(context).addChatOrSubSpace,
context,
).addChatOrSubSpace,
), ),
), ),
), ),
PopupMenuItem( PopupMenuItem(
value: SpaceActions.settings, value: SpaceActions.settings,
child: ListTile( child: ListTile(
leading: Icon( leading: Icon(Icons.settings_outlined,),
Icons.settings_outlined, title: Text(L10n.of(context).settings),
),
title: Text(
L10n.of(context).settings,
),
), ),
), ),
PopupMenuItem( PopupMenuItem(
value: SpaceActions.leave, value: SpaceActions.leave,
child: ListTile( child: ListTile(
leading: Icon(Icons.delete_outlined), leading: Icon(Icons.delete_outlined,color: theme.colorScheme.error ),
title: Text(L10n.of(context).leave), title: Text(L10n.of(context).leave, style: TextStyle(color: theme.colorScheme.error),),
), ),
), ),
], ],
), icon: const Icon(Icons.settings_outlined),
),
),
),
const SizedBox(width: 8),
if (isAdmin)
IconButton.filledTonal(
tooltip: L10n.of(context).addChatOrSubSpace,
onPressed: () => context.go(
'/rooms/newgroup?space_id=${widget.spaceId}',
),
icon: const Icon(Icons.add),
), ),
], ],
), ),
@@ -672,21 +644,6 @@ class _SpaceViewState extends State<SpaceView> {
bottom: 12, bottom: 12,
child: Row( child: Row(
children: [ children: [
Avatar(
mxContent: avatar,
name: displayname,
size: 56,
shapeBorder: RoundedSuperellipseBorder(
side: BorderSide(
width: 2,
color: theme.colorScheme.surface,
),
borderRadius: BorderRadius.circular(
AppConfig.spaceBorderRadius,
),
),
),
const SizedBox(width: 12),
Expanded( Expanded(
child: Text( child: Text(
displayname, displayname,

View File

@@ -136,6 +136,7 @@ class _SpacesTabState extends State<SpacesTab> {
child: Icon(Icons.add), child: Icon(Icons.add),
), ),
toolTip: L10n.of(context).createNewSpace, toolTip: L10n.of(context).createNewSpace,
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
], ],

View File

@@ -236,13 +236,17 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
final userId = client.userID; final userId = client.userID;
final l10n = L10n.of(context); final l10n = L10n.of(context);
_profileFuture ??= client.fetchOwnProfile(); _profileFuture ??= client.fetchOwnProfile();
return AlertDialog.adaptive( return AlertDialog.adaptive(
insetPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
content: SingleChildScrollView( content: SingleChildScrollView(
child: SizedBox(
width: MediaQuery.of(context).size.width > 720 ? 420 : MediaQuery.of(context).size.width,
child: ConstrainedBox( child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 420), constraints: const BoxConstraints(maxWidth: 800),
child: Column( child: Column(
mainAxisSize: .min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: .stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
FutureBuilder<Profile>( FutureBuilder<Profile>(
future: _profileFuture, future: _profileFuture,
@@ -255,7 +259,7 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
children: [ children: [
Center( Center(
child: Stack( child: Stack(
alignment: .center, alignment: Alignment.center,
children: [ children: [
Avatar( Avatar(
mxContent: avatar, mxContent: avatar,
@@ -265,7 +269,8 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
onTap: avatar != null onTap: avatar != null
? () => showDialog( ? () => showDialog(
context: context, context: context,
builder: (_) => MxcImageViewer(avatar), builder: (_) =>
MxcImageViewer(avatar),
) )
: null, : null,
), ),
@@ -282,8 +287,8 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
width: 30, width: 30,
height: 30, height: 30,
child: Icon( child: Icon(
Icons.edit_outlined, Icons.camera_alt_outlined,
size: 16, size: 18,
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
), ),
), ),
@@ -302,7 +307,7 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
tooltip: l10n.editDisplayname, tooltip: l10n.editDisplayname,
onEdit: _editDisplayName, onEdit: _editDisplayName,
), ),
const SizedBox(height: 8), const SizedBox(height: 0),
_EditableLine( _EditableLine(
text: _statusMsg?.trim().isNotEmpty == true text: _statusMsg?.trim().isNotEmpty == true
? _statusMsg! ? _statusMsg!
@@ -372,13 +377,13 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
vertical: 8, vertical: 8,
), ),
child: Row( child: Row(
mainAxisSize: .min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Flexible( Flexible(
child: Text( child: Text(
userId, userId,
maxLines: 1, maxLines: 1,
overflow: .ellipsis, overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodySmall?.copyWith( style: theme.textTheme.bodySmall?.copyWith(
fontFamily: 'RobotoMono', fontFamily: 'RobotoMono',
color: theme.colorScheme.onSurfaceVariant, color: theme.colorScheme.onSurfaceVariant,
@@ -426,6 +431,7 @@ class _SelfProfileDialogState extends State<SelfProfileDialog> {
), ),
), ),
), ),
),
); );
} }
} }
@@ -448,14 +454,14 @@ class _EditableLine extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
mainAxisAlignment: .center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Flexible( Flexible(
child: Text( child: Text(
text, text,
maxLines: 3, maxLines: 3,
overflow: .ellipsis, overflow: TextOverflow.ellipsis,
textAlign: .center, textAlign: TextAlign.center,
style: style, style: style,
), ),
), ),