Changed design and bug fixes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { X, Edit } from 'lucide-react';
|
||||
|
||||
export default function FileViewerModal({ file, onClose, onEdit, theme }) {
|
||||
export default function FileViewerModal({ file, onClose, onEdit }) {
|
||||
return (
|
||||
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
||||
<div className={`${theme.secondary} rounded-lg w-full max-w-4xl h-[80vh] flex flex-col ${theme.border} border`}>
|
||||
<div className={`flex items-center justify-between p-4 ${theme.border} border-b`}>
|
||||
<h2 className={`text-xl font-bold ${theme.text}`}>{file.name}</h2>
|
||||
<div className="bg-dark-800 rounded-lg w-full max-w-4xl h-[80vh] flex flex-col border border-gray-700">
|
||||
<div className="flex items-center justify-between p-4 border-b border-gray-700">
|
||||
<h2 className="text-xl font-bold text-white">{file.name}</h2>
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
onClick={onEdit}
|
||||
@@ -16,15 +16,15 @@ export default function FileViewerModal({ file, onClose, onEdit, theme }) {
|
||||
</button>
|
||||
<button
|
||||
onClick={onClose}
|
||||
className={`${theme.textSecondary} hover:${theme.text} transition`}
|
||||
className="text-gray-400 hover:text-white transition"
|
||||
>
|
||||
<X className="w-6 h-6" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={`flex-1 overflow-auto p-4 ${theme.console || theme.primary}`}>
|
||||
<pre className={`text-sm ${theme.consoleText || theme.text} font-mono whitespace-pre-wrap`}>
|
||||
<div className="flex-1 overflow-auto p-4 bg-dark-900">
|
||||
<pre className="text-sm text-gray-100 font-mono whitespace-pre-wrap">
|
||||
{file.content}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user