From e4931d4e034f18a51abaeb7d8c0af1774ec4a722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Sat, 24 Jan 2026 23:51:29 +0100 Subject: [PATCH] Refactor ShareFileDialog: reduce maxLines for share URL input and streamline button layout for link creation --- .../lib/widgets/share_file_dialog.dart | 57 ++++++------------- 1 file changed, 16 insertions(+), 41 deletions(-) diff --git a/b0esche_cloud/lib/widgets/share_file_dialog.dart b/b0esche_cloud/lib/widgets/share_file_dialog.dart index 6bb21bb..a82fbb0 100644 --- a/b0esche_cloud/lib/widgets/share_file_dialog.dart +++ b/b0esche_cloud/lib/widgets/share_file_dialog.dart @@ -225,7 +225,7 @@ class _ShareFileDialogState extends State { child: TextField( controller: TextEditingController(text: _shareUrl), readOnly: true, - maxLines: 2, + maxLines: 1, style: TextStyle(color: AppTheme.primaryText), decoration: InputDecoration( border: OutlineInputBorder( @@ -265,52 +265,27 @@ class _ShareFileDialogState extends State { ], ), const SizedBox(height: 16), - Row( - children: [ - ModernGlassButton( - onPressed: _revokeShareLink, - child: Text( - 'Revoke Link', - style: TextStyle(color: AppTheme.errorColor), - ), - ), - const Spacer(), - TextButton( - onPressed: () => Navigator.of(context).pop(), - child: const Text('Close'), - ), - ], - ), ] else ...[ Text( 'No share link yet. Create a public, read-only link for this file.', style: TextStyle(color: AppTheme.secondaryText), ), const SizedBox(height: 16), - Row( - children: [ - ModernGlassButton( - onPressed: _createShareLink, - isLoading: _isLoading, - child: _isLoading - ? const SizedBox( - height: 16, - width: 16, - child: CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation( - AppTheme.accentColor, - ), - ), - ) - : const Text('Create link'), - ), - const Spacer(), - TextButton( - onPressed: () => Navigator.of(context).pop(), - child: const Text('Close'), - ), - ], + ModernGlassButton( + onPressed: _createShareLink, + isLoading: _isLoading, + child: _isLoading + ? const SizedBox( + height: 16, + width: 16, + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + AppTheme.accentColor, + ), + ), + ) + : const Text('Create link'), ), ], ],