Refactor ShareFileDialog header to improve layout and ensure text overflow handling

This commit is contained in:
Leon Bösche
2026-01-24 22:21:50 +01:00
parent 5f7d831bdd
commit acfd882bba
3 changed files with 13 additions and 11 deletions

View File

@@ -132,17 +132,19 @@ class _ShareFileDialogState extends State<ShareFileDialog> {
// Header // Header
Row( Row(
children: [ children: [
Text( Expanded(
'Share "${widget.fileName}"', child: Text(
style: TextStyle( 'Share "${widget.fileName}"',
color: AppTheme.primaryText, style: TextStyle(
fontSize: 20, color: AppTheme.primaryText,
fontWeight: FontWeight.bold, fontSize: 20,
fontWeight: FontWeight.bold,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
), ),
maxLines: 1,
overflow: TextOverflow.ellipsis,
), ),
const Spacer(), const SizedBox(width: 16),
IconButton( IconButton(
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
icon: Icon(Icons.close, color: AppTheme.secondaryText), icon: Icon(Icons.close, color: AppTheme.secondaryText),

Binary file not shown.

View File

@@ -266,10 +266,10 @@ func NewRouter(cfg *config.Config, db *database.DB, jwtManager *jwt.Manager, aut
r.With(middleware.Permission(db, auditLogger, permission.FileRead)).Get("/share", func(w http.ResponseWriter, req *http.Request) { r.With(middleware.Permission(db, auditLogger, permission.FileRead)).Get("/share", func(w http.ResponseWriter, req *http.Request) {
getFileShareLinkHandler(w, req, db) getFileShareLinkHandler(w, req, db)
}) })
r.With(middleware.Permission(db, auditLogger, permission.FileWrite)).Post("/share", func(w http.ResponseWriter, req *http.Request) { r.With(middleware.Permission(db, auditLogger, permission.FileRead)).Post("/share", func(w http.ResponseWriter, req *http.Request) {
createFileShareLinkHandler(w, req, db) createFileShareLinkHandler(w, req, db)
}) })
r.With(middleware.Permission(db, auditLogger, permission.FileWrite)).Delete("/share", func(w http.ResponseWriter, req *http.Request) { r.With(middleware.Permission(db, auditLogger, permission.FileRead)).Delete("/share", func(w http.ResponseWriter, req *http.Request) {
revokeFileShareLinkHandler(w, req, db) revokeFileShareLinkHandler(w, req, db)
}) })
// WOPI session for org files // WOPI session for org files