,
cpp: ,
scss: ,
json: ,
xml: ,
yaml: ,
yml: ,
toml: ,
sql: ,
vue: ,
ini: ,
};
return iconMap[ext] || ;
}
function getFileType(filename: string): {
type: string;
icon: React.ReactNode;
color: string;
} {
const kind = resolveFilePreviewKind(filename);
if (kind === "image") {
return {
type: "image",
icon: {label}
{t("fileManager.loadingFile")}
{t("fileManager.largeFileWarningDesc", { size: formatFileSize(file.size, t), })}
{isTooLarge ? ({t("fileManager.fileTooLarge")}
{t("fileManager.confirmOpenAsText")}
)}{t("fileManager.cannotPreviewTypeHint")}
{onDownload && ( )}