Added Daemon system and fixed interface
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-16 18:56:21 +06:00
parent fbfddf3c7a
commit d188cec1f0
24 changed files with 1974 additions and 4985 deletions

View File

@@ -13,6 +13,7 @@ import Users from './components/Users';
import UserManagement from './components/UserManagement';
import Tickets from './components/Tickets';
import Profile from './components/Profile';
import Daemons from './components/Daemons';
import Auth from './components/Auth';
import ErrorBoundary from './components/ErrorBoundary';
import NotificationSystem, { notify } from './components/NotificationSystem';
@@ -27,6 +28,7 @@ function App() {
const [activeTab, setActiveTab] = useState('console');
const [showCreateModal, setShowCreateModal] = useState(false);
const [showUserManagement, setShowUserManagement] = useState(false);
const [showDaemons, setShowDaemons] = useState(false);
const [showTickets, setShowTickets] = useState(false);
const [showProfile, setShowProfile] = useState(false);
const [connectionError, setConnectionError] = useState(false);
@@ -216,17 +218,30 @@ function App() {
{/* Bottom section */}
<div className="p-4 border-t border-dark-700 space-y-2">
{user?.role === 'owner' && (
<button
onClick={() => {
setShowUserManagement(true);
setCurrentView('management');
}}
className="sidebar-item w-full"
>
<Shield className="w-5 h-5 flex-shrink-0 text-yellow-500" />
{sidebarOpen && <span>Управление</span>}
</button>
{(user?.role === 'owner' || user?.role === 'admin') && (
<>
<button
onClick={() => {
setShowUserManagement(true);
setCurrentView('management');
}}
className="sidebar-item w-full"
>
<Shield className="w-5 h-5 flex-shrink-0 text-yellow-500" />
{sidebarOpen && <span>Управление</span>}
</button>
<button
onClick={() => {
setShowDaemons(true);
setCurrentView('daemons');
}}
className="sidebar-item w-full"
>
<Server className="w-5 h-5 flex-shrink-0 text-blue-500" />
{sidebarOpen && <span>Демоны</span>}
</button>
</>
)}
<button
@@ -279,6 +294,7 @@ function App() {
{currentView === 'dashboard' && 'Панель управления'}
{currentView === 'server' && selectedServer?.displayName}
{currentView === 'management' && 'Управление пользователями'}
{currentView === 'daemons' && 'Управление демонами'}
{currentView === 'tickets' && 'Тикеты поддержки'}
{currentView === 'profile' && 'Профиль'}
</h1>
@@ -538,6 +554,14 @@ function App() {
</div>
)}
{showDaemons && (
<div className="modal-overlay" onClick={() => setShowDaemons(false)}>
<div className="modal-content" onClick={(e) => e.stopPropagation()}>
<Daemons token={token} />
</div>
</div>
)}
{showTickets && (
<div className="modal-overlay" onClick={() => setShowTickets(false)}>
<div className="modal-content" onClick={(e) => e.stopPropagation()}>