feat: Mise à jour des interfaces mobiles v3.2.3
- Amélioration des interfaces utilisateur sur mobile - Optimisation de la responsivité des composants Flutter - Mise à jour des widgets de chat et communication - Amélioration des formulaires et tableaux - Ajout de nouveaux composants pour l'administration - Optimisation des thèmes et styles visuels 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -45,19 +45,12 @@ class RoomsPageEmbeddedState extends State<RoomsPageEmbedded> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isWeb = kIsWeb;
|
||||
|
||||
if (_isLoading) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
// Sur le web, afficher la vue split
|
||||
if (isWeb) {
|
||||
return _buildWebSplitView(context);
|
||||
}
|
||||
|
||||
// Sur mobile, afficher la vue normale avec navigation
|
||||
return _buildMobileView(context);
|
||||
// Utiliser la vue split responsive pour toutes les plateformes
|
||||
return _buildResponsiveSplitView(context);
|
||||
}
|
||||
|
||||
Widget _buildMobileView(BuildContext context) {
|
||||
@@ -287,8 +280,8 @@ class RoomsPageEmbeddedState extends State<RoomsPageEmbedded> {
|
||||
_loadRooms();
|
||||
}
|
||||
|
||||
/// Méthode pour créer la vue split sur le web
|
||||
Widget _buildWebSplitView(BuildContext context) {
|
||||
/// Méthode pour créer la vue split responsive
|
||||
Widget _buildResponsiveSplitView(BuildContext context) {
|
||||
return ValueListenableBuilder<Box<Room>>(
|
||||
valueListenable: _service.roomsBox.listenable(),
|
||||
builder: (context, box, _) {
|
||||
@@ -315,14 +308,74 @@ class RoomsPageEmbeddedState extends State<RoomsPageEmbedded> {
|
||||
)
|
||||
: null;
|
||||
|
||||
// Déterminer si on est sur un petit écran
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
final isSmallScreen = screenWidth < 900;
|
||||
|
||||
// Si petit écran ou mobile, disposition verticale
|
||||
if (isSmallScreen) {
|
||||
// Calculer la hauteur appropriée pour la liste des rooms
|
||||
// Sur mobile, utiliser 30% de la hauteur, sur web small screen 250px
|
||||
final roomsHeight = kIsWeb ? 250.0 : screenHeight * 0.3;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
// Liste des rooms en haut avec hauteur adaptative
|
||||
Container(
|
||||
height: roomsHeight.clamp(200.0, 350.0), // Entre 200 et 350 pixels
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: _buildRoomsList(context),
|
||||
),
|
||||
// Conversation sélectionnée en dessous (reste de l'espace)
|
||||
Expanded(
|
||||
child: selectedRoom != null && selectedRoom.id.isNotEmpty
|
||||
? ChatPage(
|
||||
key: ValueKey(selectedRoom.id), // Clé unique par room
|
||||
roomId: selectedRoom.id,
|
||||
roomTitle: selectedRoom.title,
|
||||
roomType: selectedRoom.type,
|
||||
roomCreatorId: selectedRoom.createdBy,
|
||||
isEmbedded: true, // Pour indiquer qu'on est en mode embedded
|
||||
)
|
||||
: _buildEmptyConversation(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// Si grand écran, disposition horizontale (comme avant)
|
||||
return Row(
|
||||
children: [
|
||||
// Colonne de gauche : Liste des rooms (30%)
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 280,
|
||||
maxWidth: 400,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
border: Border(
|
||||
right: BorderSide(color: Colors.grey[300]!),
|
||||
right: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: _buildRoomsList(context),
|
||||
@@ -1189,7 +1242,7 @@ class _QuickBroadcastDialogState extends State<_QuickBroadcastDialog> {
|
||||
_isBroadcast = value;
|
||||
});
|
||||
},
|
||||
activeColor: Colors.amber.shade600,
|
||||
activeThumbColor: Colors.amber.shade600,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -111,9 +111,9 @@ class _RecipientSelectorState extends State<RecipientSelector> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: _hexToColor(color).withOpacity(0.1),
|
||||
color: _hexToColor(color).withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: _hexToColor(color).withOpacity(0.3)),
|
||||
border: Border.all(color: _hexToColor(color).withValues(alpha: 0.3)),
|
||||
),
|
||||
child: Text(
|
||||
name,
|
||||
@@ -602,7 +602,7 @@ class _RecipientSelectorWithMessageState extends State<_RecipientSelectorWithMes
|
||||
_isBroadcast = value;
|
||||
});
|
||||
},
|
||||
activeColor: Colors.amber.shade600,
|
||||
activeThumbColor: Colors.amber.shade600,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user