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
Row(
children: [
Text(
'Share "${widget.fileName}"',
style: TextStyle(
color: AppTheme.primaryText,
fontSize: 20,
fontWeight: FontWeight.bold,
Expanded(
child: Text(
'Share "${widget.fileName}"',
style: TextStyle(
color: AppTheme.primaryText,
fontSize: 20,
fontWeight: FontWeight.bold,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
const Spacer(),
const SizedBox(width: 16),
IconButton(
onPressed: () => Navigator.of(context).pop(),
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) {
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)
})
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)
})
// WOPI session for org files