Changed design and bug fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-16 15:40:14 +06:00
parent e6264efac6
commit fbfddf3c7a
16 changed files with 920 additions and 844 deletions

View File

@@ -3,7 +3,7 @@ import { Send } from 'lucide-react';
import axios from 'axios';
import { API_URL, WS_URL } from '../config';
export default function Console({ serverName, token, theme }) {
export default function Console({ serverName, token }) {
const [logs, setLogs] = useState([]);
const [command, setCommand] = useState('');
const logsEndRef = useRef(null);
@@ -84,11 +84,11 @@ export default function Console({ serverName, token, theme }) {
};
return (
<div className={`flex flex-col h-full ${theme.primary}`}>
<div className="flex flex-col h-full">
{/* Консоль */}
<div className={`flex-1 overflow-y-auto p-4 font-mono text-sm ${theme.console || theme.secondary}`}>
<div className="console-terminal flex-1 overflow-y-auto min-h-[400px] max-h-[600px]">
{logs.length === 0 ? (
<div className={theme.textSecondary}>Консоль пуста. Запустите сервер для просмотра логов.</div>
<div className="text-gray-500">Консоль пуста. Запустите сервер для просмотра логов.</div>
) : (
logs.map((log, index) => (
<div key={index} className="whitespace-pre-wrap leading-relaxed">
@@ -100,17 +100,17 @@ export default function Console({ serverName, token, theme }) {
</div>
{/* Поле ввода команды */}
<form onSubmit={sendCommand} className={`${theme.border} border-t p-4 flex gap-2`}>
<form onSubmit={sendCommand} className="border-t border-dark-700 p-4 flex gap-2 bg-dark-850">
<input
type="text"
value={command}
onChange={(e) => setCommand(e.target.value)}
placeholder="Введите команду и нажмите Enter для отправки, используйте стрелки для навигации между предыдущими командами"
className={`flex-1 ${theme.input} ${theme.border} border rounded-lg px-4 py-2.5 ${theme.text} placeholder:text-gray-600 focus:outline-none focus:ring-2 focus:ring-green-500 transition`}
placeholder="Введите команду..."
className="input flex-1"
/>
<button
type="submit"
className={`${theme.success} ${theme.successHover} px-6 py-2.5 rounded-lg flex items-center gap-2 text-white font-medium transition shadow-lg`}
className="btn-success flex items-center gap-2"
>
<Send className="w-4 h-4" />
Отправить