This commit is contained in:
Leon Bösche
2026-01-25 00:45:26 +01:00
parent 02e4eeec07
commit c29bd89a0a

View File

@@ -86,7 +86,8 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
bool _isDocumentFile() {
final mimeType = _fileData?['capabilities']?['mimeType'] ?? '';
return mimeType == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
return mimeType ==
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
mimeType == 'application/msword' ||
mimeType.toString().contains('document');
}
@@ -147,10 +148,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
const SizedBox(height: 8),
Text(
'This document type requires download to view',
style: TextStyle(
color: AppTheme.secondaryText,
fontSize: 14,
),
style: TextStyle(color: AppTheme.secondaryText, fontSize: 14),
textAlign: TextAlign.center,
),
],
@@ -180,10 +178,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
const SizedBox(height: 8),
Text(
'This file type requires download to view',
style: TextStyle(
color: AppTheme.secondaryText,
fontSize: 14,
),
style: TextStyle(color: AppTheme.secondaryText, fontSize: 14),
textAlign: TextAlign.center,
),
],
@@ -265,7 +260,10 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
children: [
// File info bar
Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
color: AppTheme.primaryBackground.withValues(alpha: 0.8),
child: Row(
children: [
@@ -290,9 +288,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
),
),
// File content
Expanded(
child: _buildFilePreview(),
),
Expanded(child: _buildFilePreview()),
// Video controls (if video)
if (_isVideoFile() && _videoController != null)
Container(