The upload dialog shows its target folder and can change it, with New folder in the same list; a file never goes while a folder is being named or made. The share dialog puts the link on the clipboard when it opens, says so only if the browser let it, and has Open in new tab beside Copy. A file's format joins the line under its name.
9 lines
371 B
TypeScript
9 lines
371 B
TypeScript
import type { LibraryFile } from "../../lib/api";
|
|
|
|
/** A file's line under its name, in the table and on its card: who made it and its format. */
|
|
export function fileMeta(file: LibraryFile): string {
|
|
const who = file.display_uploader || file.asset?.uploader;
|
|
const format = file.asset?.container?.toUpperCase();
|
|
return [who, format].filter(Boolean).join(" · ");
|
|
}
|