diff --git a/public/assets/app.css b/public/assets/app.css index 8726def..979e088 100644 --- a/public/assets/app.css +++ b/public/assets/app.css @@ -48,10 +48,12 @@ body[data-theme="dark"] .bg-blue-50 { background-color: rgba(59, 130, 246, 0.16) !important; } body[data-theme="dark"] .bg-green-50 { background-color: rgba(34, 197, 94, 0.16) !important; } body[data-theme="dark"] .bg-red-50 { background-color: rgba(239, 68, 68, 0.16) !important; } - body[data-theme="dark"] .text-slate-800 { color: #e2e8f0 !important; } - body[data-theme="dark"] .text-slate-700 { color: #cbd5e1 !important; } - body[data-theme="dark"] .text-slate-600 { color: #94a3b8 !important; } - body[data-theme="dark"] .text-slate-500, body[data-theme="dark"] .text-slate-400 { color: #64748b !important; } + /* Улучшенная видимость текста в темной теме */ + body[data-theme="dark"] .text-slate-800 { color: #f1f5f9 !important; } + body[data-theme="dark"] .text-slate-700 { color: #e2e8f0 !important; } + body[data-theme="dark"] .text-slate-600 { color: #cbd5e1 !important; } + body[data-theme="dark"] .text-slate-500 { color: #94a3b8 !important; } + body[data-theme="dark"] .text-slate-400 { color: #94a3b8 !important; } body[data-theme="dark"] .text-slate-300 { color: #cbd5e1 !important; } body[data-theme="dark"] .border-slate-200 { border-color: #1e293b !important; } body[data-theme="dark"] .border-slate-300 { border-color: #334155 !important; } @@ -64,12 +66,81 @@ color: #e2e8f0 !important; border-color: #334155 !important; } + body[data-theme="dark"] input::placeholder { + color: #64748b !important; + } body[data-theme="dark"] .glass-panel { background: rgba(15, 23, 42, 0.92); border-color: rgba(148, 163, 184, 0.12); } body[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f172a; } body[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; } + + /* Улучшенный заголовок в темной теме */ + body[data-theme="dark"] #mainHeader { + background-color: #111827 !important; + border-color: #1e293b !important; + } + body[data-theme="dark"] #mainHeader button { + color: #e2e8f0 !important; + } + body[data-theme="dark"] table { + background-color: #111827 !important; + } + body[data-theme="dark"] table td, + body[data-theme="dark"] table th { + border-color: #1e293b !important; + color: #e2e8f0 !important; + } + body[data-theme="dark"] .hover\:bg-slate-50:hover { + background-color: #1e293b !important; + } + body[data-theme="dark"] .bg-slate-50 { + background-color: #0f172a !important; + } + body[data-theme="dark"] a { + color: #60a5fa !important; + } + body[data-theme="dark"] a:hover { + color: #93c5fd !important; + } + + /* Hover эффекты на кнопки */ + button { + transition: all 0.2s ease; + } + button:hover:not(:disabled) { + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + } + body[data-theme="dark"] button:hover:not(:disabled) { + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); + } + + /* Специфичные hover для цветных кнопок */ + .bg-blue-600:hover { background-color: #1d4ed8 !important; } + .bg-blue-50:hover { background-color: #eff6ff !important; } + .bg-amber-600:hover { background-color: #b45309 !important; } + .bg-green-500:hover { background-color: #16a34a !important; } + .bg-red-600:hover { background-color: #dc2626 !important; } + .bg-slate-100:hover:not(:disabled) { background-color: #e2e8f0 !important; } + + /* Для темной темы */ + body[data-theme="dark"] .bg-blue-600:hover { background-color: #1e40af !important; } + body[data-theme="dark"] .bg-amber-600:hover { background-color: #92400e !important; } + body[data-theme="dark"] .bg-green-500:hover { background-color: #15803d !important; } + body[data-theme="dark"] .bg-red-600:hover { background-color: #991b1b !important; } + body[data-theme="dark"] .bg-slate-100:hover { background-color: #334155 !important; } + + /* Логотип кликабельный */ + .logo-header { + cursor: pointer; + transition: opacity 0.2s ease; + } + .logo-header:hover { + opacity: 0.8; + } + .sidebar-collapsible { transition: max-height 0.24s ease; } @@ -79,6 +150,40 @@ white-space: pre-wrap; word-break: break-word; } + + /* Улучшенные стили для кнопок в темной теме */ + body[data-theme="dark"] button { + color: #e2e8f0 !important; + } + body[data-theme="dark"] #themeSelect { + background-color: #1e293b !important; + color: #e2e8f0 !important; + } + body[data-theme="dark"] .bg-slate-100 { + background-color: #1e293b !important; + } + body[data-theme="dark"] .bg-blue-50 { + background-color: rgba(59, 130, 246, 0.2) !important; + } + body[data-theme="dark"] .text-blue-600 { + color: #60a5fa !important; + } + body[data-theme="dark"] .bg-amber-50 { + background-color: rgba(217, 119, 6, 0.2) !important; + } + body[data-theme="dark"] .text-amber-700 { + color: #fbbf24 !important; + } + body[data-theme="dark"] .bg-red-50 { + background-color: rgba(239, 68, 68, 0.2) !important; + } + body[data-theme="dark"] .text-red-600 { + color: #f87171 !important; + } + body[data-theme="dark"] .text-green-500 { + background-color: #22c55e; + } + @media (max-width: 900px) { #mobileBackdrop:not(.hidden) { display: block; @@ -114,3 +219,59 @@ padding: 1rem; } } + + /* Адаптив для очень узких экранов (меньше 640px) */ + @media (max-width: 640px) { + #mainHeader { + gap: 1rem; + padding: 0.75rem 1rem; + } + #mainHeader > div:first-child { + order: 1; + flex: 1; + } + #mainHeader > div:first-child .logo-header span { + display: none; + } + #mainHeader > div:first-child > div:nth-child(3) { + display: none; + } + #mainHeader > div:last-child { + order: 2; + width: 100%; + display: flex !important; + justify-content: flex-end; + gap: 0.5rem; + flex-wrap: wrap; + } + #mainHeader > div:last-child > select, + #mainHeader > div:last-child > button { + padding: 0.5rem 0.75rem; + font-size: 0.75rem; + } + #managementButton, + #logsButton { + display: none !important; + } + #mainHeader > div:last-child > :nth-child(4) { + display: none; + } + } + + /* Адаптив для средних экранов (640px - 900px) */ + @media (max-width: 900px) and (min-width: 641px) { + #mainHeader > div:first-child > div:nth-child(3) { + display: none; + } + #mainHeader > div:last-child > :nth-child(1) { + display: none; + } + #managementButton, + #logsButton { + display: inline-flex !important; + } + #managementButton span, + #logsButton span { + display: none; + } + } diff --git a/public/assets/app.js b/public/assets/app.js index 62a2b1c..818b898 100644 --- a/public/assets/app.js +++ b/public/assets/app.js @@ -88,6 +88,29 @@ document.getElementById('mobileBackdrop').classList.add('hidden'); } + goHome() { + // Close any open panels + this.hideWorkspacePanels(); + + // Reset to table view + this.currentTable = null; + this.setToolbarMode('default'); + document.getElementById('currentTableTitle').textContent = 'Select table'; + document.getElementById('tableActions').classList.add('hidden'); + document.getElementById('emptyState').classList.remove('hidden'); + document.getElementById('dataGrid').classList.add('hidden'); + document.getElementById('managementPanel').classList.add('hidden'); + document.getElementById('sqlPanel').classList.add('hidden'); + document.getElementById('logsPanel').classList.add('hidden'); + + // Close sidebar on mobile + this.closeSidebar(); + + // Scroll to top + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; + } + // Auth Methods async login(e) { e.preventDefault(); diff --git a/public/index.html b/public/index.html index abf922b..72eef78 100644 --- a/public/index.html +++ b/public/index.html @@ -49,7 +49,7 @@ -
+
PostgreSQL SensoLab