Fix: Add CSV to card isRenderable preview check and resolve dark mode white text color inheritance in spreadsheet grids
This commit is contained in:
parent
cf21405c53
commit
2d730c8389
@ -85,8 +85,28 @@ export const AssetCard: React.FC<AssetCardProps> = ({
|
||||
const isOffice = type.includes('word') || type.includes('presentation') || type.includes('sheet') ||
|
||||
url.toLowerCase().endsWith('.docx') || url.toLowerCase().endsWith('.doc') ||
|
||||
url.toLowerCase().endsWith('.pptx') || url.toLowerCase().endsWith('.ppt') ||
|
||||
url.toLowerCase().endsWith('.xlsx') || url.toLowerCase().endsWith('.xls');
|
||||
return type === 'url' || type.includes('pdf') || type.includes('image') || type.includes('png') || type.includes('jpg') || isOffice;
|
||||
url.toLowerCase().endsWith('.xlsx') || url.toLowerCase().endsWith('.xls') ||
|
||||
url.toLowerCase().endsWith('.csv') || type.includes('csv');
|
||||
|
||||
const isTextOrCode = url.toLowerCase().endsWith('.md') ||
|
||||
url.toLowerCase().endsWith('.txt') ||
|
||||
url.toLowerCase().endsWith('.json') ||
|
||||
url.toLowerCase().endsWith('.js') ||
|
||||
url.toLowerCase().endsWith('.ts') ||
|
||||
url.toLowerCase().endsWith('.tsx') ||
|
||||
url.toLowerCase().endsWith('.jsx') ||
|
||||
url.toLowerCase().endsWith('.py') ||
|
||||
url.toLowerCase().endsWith('.yaml') ||
|
||||
url.toLowerCase().endsWith('.yml') ||
|
||||
url.toLowerCase().endsWith('.css') ||
|
||||
url.toLowerCase().endsWith('.html') ||
|
||||
url.toLowerCase().endsWith('.sh') ||
|
||||
type.includes('text') ||
|
||||
type.includes('markdown') ||
|
||||
type.includes('json') ||
|
||||
type.includes('javascript');
|
||||
|
||||
return type === 'url' || type.includes('pdf') || type.includes('image') || type.includes('png') || type.includes('jpg') || isOffice || isTextOrCode;
|
||||
};
|
||||
|
||||
const getFullAssetUrl = (url: string) => {
|
||||
|
||||
@ -605,12 +605,14 @@ export const AssetViewerModal: React.FC<AssetViewerModalProps> = ({
|
||||
min-width: 100%;
|
||||
font-size: 11px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
color: #0f172a;
|
||||
}
|
||||
.excel-preview-container th, .excel-preview-container td {
|
||||
border: 1px solid #e2e8f0;
|
||||
padding: 6px 12px;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
color: #0f172a;
|
||||
}
|
||||
.excel-preview-container tr:nth-child(even) {
|
||||
background-color: #f8fafc;
|
||||
|
||||
@ -89,6 +89,7 @@ export const SpreadsheetThumbnail: React.FC<SpreadsheetThumbnailProps> = ({ url,
|
||||
width: 100%;
|
||||
font-size: 10px;
|
||||
font-family: monospace;
|
||||
color: #0f172a;
|
||||
}
|
||||
.excel-thumbnail-container td {
|
||||
border: 1px solid #cbd5e1;
|
||||
@ -96,6 +97,7 @@ export const SpreadsheetThumbnail: React.FC<SpreadsheetThumbnailProps> = ({ url,
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #0f172a;
|
||||
}
|
||||
.excel-thumbnail-container tr:nth-child(even) {
|
||||
background-color: #f8fafc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user