mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-23 02:16:08 +00:00
fix: add binary file detection support
Add isBinary flag to editor documents to handle binary files appropriately Update BinaryContent component styling to display properly in the editor
This commit is contained in:
parent
5e590aa16a
commit
18f1b251ab
@ -1,6 +1,6 @@
|
||||
export function BinaryContent() {
|
||||
return (
|
||||
<div className="flex items-center justify-center absolute inset-0 z-10 text-sm bg-tk-elements-app-backgroundColor text-tk-elements-app-textColor">
|
||||
<div className="flex items-center justify-center absolute inset-0 z-10 text-sm bg-bolt-elements-background-depth-2 text-bolt-elements-textPrimary">
|
||||
File format cannot be displayed.
|
||||
</div>
|
||||
);
|
||||
|
@ -50,6 +50,7 @@ export class EditorStore {
|
||||
{
|
||||
value: dirent.content,
|
||||
filePath,
|
||||
isBinary: dirent.isBinary, // Add this line
|
||||
scroll: previousDocument?.scroll,
|
||||
},
|
||||
] as [string, EditorDocument];
|
||||
|
Loading…
Reference in New Issue
Block a user