|
- v{ver.version}
+
+ v{ver.version}
+
{ver.is_current_version && (
Current
@@ -241,7 +262,9 @@ function VersionRow({ ver, onDownload }: { ver: FileAttachment; onDownload: () =
)}
|
- {formatDate(ver.created_at)} |
+
+ {formatDate(ver.created_at)}
+ |
@@ -276,7 +299,9 @@ const FileView = (): ReactElement => {
const permissions = useSelector((state: RootState) => state.auth.permissions);
const isTenantAdmin = permissions.some(
- (p) => (p.resource === "files" || p.resource === "*") && (p.action === "update" || p.action === "*")
+ (p) =>
+ (p.resource === "files" || p.resource === "*") &&
+ (p.action === "update" || p.action === "*"),
);
// ── State ──
@@ -317,10 +342,15 @@ const FileView = (): ReactElement => {
}
}, [id]);
- useEffect(() => { void loadFile(); }, [loadFile]);
+ useEffect(() => {
+ void loadFile();
+ }, [loadFile]);
const handleDownload = () => {
- if (file) fileAttachmentService.download(file.id, file.original_name).catch(() => {});
+ if (file)
+ fileAttachmentService
+ .download(file.id, file.original_name)
+ .catch(() => {});
};
const handleSaveMetadata = async () => {
@@ -341,10 +371,18 @@ const FileView = (): ReactElement => {
};
const copyChecksum = () => {
- if (file) { copyToClipboard(file.checksum); setCopiedChecksum(true); setTimeout(() => setCopiedChecksum(false), 1500); }
+ if (file) {
+ copyToClipboard(file.checksum);
+ setCopiedChecksum(true);
+ setTimeout(() => setCopiedChecksum(false), 1500);
+ }
};
const copyPath = () => {
- if (file) { copyToClipboard(file.file_path); setCopiedPath(true); setTimeout(() => setCopiedPath(false), 1500); }
+ if (file) {
+ copyToClipboard(file.file_path);
+ setCopiedPath(true);
+ setTimeout(() => setCopiedPath(false), 1500);
+ }
};
if (isLoading) {
@@ -397,9 +435,13 @@ const FileView = (): ReactElement => {
- {file.original_name}
+
+ {file.original_name}
+
- {file.mime_type} · {file.file_size_formatted || formatBytes(file.file_size)} · Uploaded {formatDate(file.created_at)}
+ {file.mime_type} ·{" "}
+ {file.file_size_formatted || formatBytes(file.file_size)} ·
+ Uploaded {formatDate(file.created_at)}
@@ -435,9 +477,7 @@ const FileView = (): ReactElement => {
{/* Preview panel */}
@@ -447,7 +487,9 @@ const FileView = (): ReactElement => {
{/* File Details */}
- File Details
+
+ File Details
+
{isTenantAdmin && !editingMetadata && (
|