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