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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>DiagnoTool | Утилита для восстановления</title>
|
| 7 |
+
<meta name="description" content="Universal Diagnostic Dashboard">
|
| 8 |
+
|
| 9 |
+
<!-- Importing Inter Font for Modern Look -->
|
| 10 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 11 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 12 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
|
| 13 |
+
|
| 14 |
+
<!-- Importing FontAwesome for Icons -->
|
| 15 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 16 |
+
|
| 17 |
+
<style>
|
| 18 |
+
:root {
|
| 19 |
+
--primary-color: #6366f1;
|
| 20 |
+
--primary-hover: #4f46e5;
|
| 21 |
+
--accent-color: #10b981;
|
| 22 |
+
--danger-color: #ef4444;
|
| 23 |
+
--dark-bg: #0f172a;
|
| 24 |
+
--card-bg: #1e293b;
|
| 25 |
+
--text-main: #f8fafc;
|
| 26 |
+
--text-muted: #94a3b8;
|
| 27 |
+
--border-color: #334155;
|
| 28 |
+
--shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
* {
|
| 32 |
+
box-sizing: border-box;
|
| 33 |
+
margin: 0;
|
| 34 |
+
padding: 0;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
font-family: 'Inter', sans-serif;
|
| 39 |
+
background-color: var(--dark-bg);
|
| 40 |
+
color: var(--text-main);
|
| 41 |
+
line-height: 1.6;
|
| 42 |
+
display: flex;
|
| 43 |
+
flex-direction: column;
|
| 44 |
+
min-height: 100vh;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/* --- Header Section --- */
|
| 48 |
+
header {
|
| 49 |
+
background-color: var(--card-bg);
|
| 50 |
+
border-bottom: 1px solid var(--border-color);
|
| 51 |
+
padding: 1rem 2rem;
|
| 52 |
+
display: flex;
|
| 53 |
+
justify-content: space-between;
|
| 54 |
+
align-items: center;
|
| 55 |
+
position: sticky;
|
| 56 |
+
top: 0;
|
| 57 |
+
z-index: 100;
|
| 58 |
+
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.brand {
|
| 62 |
+
display: flex;
|
| 63 |
+
align-items: center;
|
| 64 |
+
gap: 10px;
|
| 65 |
+
font-size: 1.5rem;
|
| 66 |
+
font-weight: 700;
|
| 67 |
+
color: var(--text-main);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.brand i {
|
| 71 |
+
color: var(--primary-color);
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.footer-link {
|
| 75 |
+
text-decoration: none;
|
| 76 |
+
color: var(--text-muted);
|
| 77 |
+
font-size: 0.85rem;
|
| 78 |
+
transition: color 0.3s;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.footer-link:hover {
|
| 82 |
+
color: var(--primary-color);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/* --- Main Layout --- */
|
| 86 |
+
main {
|
| 87 |
+
flex: 1;
|
| 88 |
+
max-width: 1200px;
|
| 89 |
+
margin: 0 auto;
|
| 90 |
+
padding: 2rem;
|
| 91 |
+
width: 100%;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.dashboard-grid {
|
| 95 |
+
display: grid;
|
| 96 |
+
grid-template-columns: 1fr 1fr;
|
| 97 |
+
gap: 2rem;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
@media (max-width: 768px) {
|
| 101 |
+
.dashboard-grid {
|
| 102 |
+
grid-template-columns: 1fr;
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* --- Cards --- */
|
| 107 |
+
.card {
|
| 108 |
+
background-color: var(--card-bg);
|
| 109 |
+
border-radius: 1rem;
|
| 110 |
+
padding: 2rem;
|
| 111 |
+
border: 1px solid var(--border-color);
|
| 112 |
+
box-shadow: var(--shadow);
|
| 113 |
+
transition: transform 0.2s;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.card:hover {
|
| 117 |
+
transform: translateY(-2px);
|
| 118 |
+
border-color: var(--primary-color);
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
h2 {
|
| 122 |
+
font-size: 1.5rem;
|
| 123 |
+
margin-bottom: 1.5rem;
|
| 124 |
+
border-bottom: 1px solid var(--border-color);
|
| 125 |
+
padding-bottom: 1rem;
|
| 126 |
+
display: flex;
|
| 127 |
+
align-items: center;
|
| 128 |
+
gap: 10px;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
/* --- Diagnostic Tool Styles --- */
|
| 132 |
+
.problem-selector {
|
| 133 |
+
display: flex;
|
| 134 |
+
flex-direction: column;
|
| 135 |
+
gap: 1rem;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.selector-group {
|
| 139 |
+
display: flex;
|
| 140 |
+
flex-direction: column;
|
| 141 |
+
gap: 0.5rem;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
label {
|
| 145 |
+
font-size: 0.9rem;
|
| 146 |
+
color: var(--text-muted);
|
| 147 |
+
font-weight: 600;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
select, textarea {
|
| 151 |
+
background-color: var(--dark-bg);
|
| 152 |
+
border: 1px solid var(--border-color);
|
| 153 |
+
color: var(--text-main);
|
| 154 |
+
padding: 1rem;
|
| 155 |
+
border-radius: 0.5rem;
|
| 156 |
+
font-family: inherit;
|
| 157 |
+
font-size: 1rem;
|
| 158 |
+
transition: border-color 0.3s;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
select:focus, textarea:focus {
|
| 162 |
+
outline: none;
|
| 163 |
+
border-color: var(--primary-color);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
textarea {
|
| 167 |
+
resize: vertical;
|
| 168 |
+
min-height: 100px;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.diagnostic-btn {
|
| 172 |
+
background-color: var(--primary-color);
|
| 173 |
+
color: white;
|
| 174 |
+
border: none;
|
| 175 |
+
padding: 1rem;
|
| 176 |
+
border-radius: 0.5rem;
|
| 177 |
+
font-size: 1rem;
|
| 178 |
+
font-weight: 600;
|
| 179 |
+
cursor: pointer;
|
| 180 |
+
transition: all 0.3s;
|
| 181 |
+
display: flex;
|
| 182 |
+
align-items: center;
|
| 183 |
+
justify-content: center;
|
| 184 |
+
gap: 10px;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
.diagnostic-btn:hover {
|
| 188 |
+
background-color: var(--primary-hover);
|
| 189 |
+
transform: scale(1.02);
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.diagnostic-btn:disabled {
|
| 193 |
+
background-color: var(--text-muted);
|
| 194 |
+
cursor: not-allowed;
|
| 195 |
+
opacity: 0.7;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
/* --- Results Area --- */
|
| 199 |
+
#diagnostic-output {
|
| 200 |
+
margin-top: 2rem;
|
| 201 |
+
padding: 1.5rem;
|
| 202 |
+
background-color: var(--dark-bg);
|
| 203 |
+
border-radius: 0.5rem;
|
| 204 |
+
border-left: 4px solid var(--border-color);
|
| 205 |
+
display: none; /* Hidden by default */
|
| 206 |
+
animation: fadeIn 0.5s ease;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
.result-header {
|
| 210 |
+
display: flex;
|
| 211 |
+
justify-content: space-between;
|
| 212 |
+
align-items: center;
|
| 213 |
+
margin-bottom: 1rem;
|
| 214 |
+
color: var(--text-muted);
|
| 215 |
+
font-size: 0.85rem;
|
| 216 |
+
text-transform: uppercase;
|
| 217 |
+
letter-spacing: 1px;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
.solution-step {
|
| 221 |
+
margin-bottom: 1rem;
|
| 222 |
+
padding-left: 1.5rem;
|
| 223 |
+
position: relative;
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
.solution-step::before {
|
| 227 |
+
content: "✔";
|
| 228 |
+
position: absolute;
|
| 229 |
+
left: 0;
|
| 230 |
+
color: var(--accent-color);
|
| 231 |
+
font-weight: bold;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.critical-step {
|
| 235 |
+
background-color: rgba(239, 68, 68, 0.1);
|
| 236 |
+
border-left: 2px solid var(--danger-color);
|
| 237 |
+
padding: 1rem;
|
| 238 |
+
margin: 1rem 0;
|
| 239 |
+
color: #fca5a5;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
/* --- Status Panel (Right Side) --- */
|
| 243 |
+
.status-item {
|
| 244 |
+
display: flex;
|
| 245 |
+
justify-content: space-between;
|
| 246 |
+
align-items: center;
|
| 247 |
+
padding: 1rem 0;
|
| 248 |
+
border-bottom: 1px solid var(--border-color);
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
.status-item:last-child {
|
| 252 |
+
border-bottom: none;
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
.status-label {
|
| 256 |
+
color: var(--text-muted);
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.status-value {
|
| 260 |
+
font-weight: 600;
|
| 261 |
+
font-family: monospace;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.badge {
|
| 265 |
+
padding: 0.25rem 0.75rem;
|
| 266 |
+
border-radius: 9999px;
|
| 267 |
+
font-size: 0.75rem;
|
| 268 |
+
font-weight: 700;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.badge-success { background-color: rgba(16, 185, 129, 0.2); color: var(--accent-color); }
|
| 272 |
+
.badge-warning { background-color: rgba(245, 158, 11, 0.2); color: #f59e0b; }
|
| 273 |
+
.badge-danger { background-color: rgba(239, 68, 68, 0.2); color: var(--danger-color); }
|
| 274 |
+
|
| 275 |
+
/* --- Animations --- */
|
| 276 |
+
@keyframes fadeIn {
|
| 277 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 278 |
+
to { opacity: 1; transform: translateY(0); }
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.loader {
|
| 282 |
+
border: 4px solid rgba(255,255,255,0.1);
|
| 283 |
+
border-left-color: var(--primary-color);
|
| 284 |
+
border-radius: 50%;
|
| 285 |
+
width: 24px;
|
| 286 |
+
height: 24px;
|
| 287 |
+
animation: spin 1s linear infinite;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
@keyframes spin { 100% { transform: rotate(360deg); } }
|
| 291 |
+
|
| 292 |
+
.toast-container {
|
| 293 |
+
position: fixed;
|
| 294 |
+
bottom: 20px;
|
| 295 |
+
right: 20px;
|
| 296 |
+
display: flex;
|
| 297 |
+
flex-direction: column;
|
| 298 |
+
gap: 10px;
|
| 299 |
+
z-index: 200;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.toast {
|
| 303 |
+
background-color: var(--card-bg);
|
| 304 |
+
border-left: 4px solid var(--primary-color);
|
| 305 |
+
padding: 1rem 1.5rem;
|
| 306 |
+
border-radius: 4px;
|
| 307 |
+
box-shadow: var(--shadow);
|
| 308 |
+
color: var(--text-main);
|
| 309 |
+
animation: slideIn 0.3s ease;
|
| 310 |
+
min-width: 300px;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
@keyframes slideIn {
|
| 314 |
+
from { transform: translateX(100%); opacity: 0; }
|
| 315 |
+
to { transform: translateX(0); opacity: 1; }
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
</style>
|
| 319 |
+
</head>
|
| 320 |
+
<body>
|
| 321 |
+
|
| 322 |
+
<!-- Header with Required Footer Link -->
|
| 323 |
+
<header>
|
| 324 |
+
<div class="brand">
|
| 325 |
+
<i class="fa-solid fa-wrench"></i>
|
| 326 |
+
<span>DiagnoTool</span>
|
| 327 |
+
</div>
|
| 328 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="footer-link" rel="noopener noreferrer">
|
| 329 |
+
Built with anycoder
|
| 330 |
+
</a>
|
| 331 |
+
</header>
|
| 332 |
+
|
| 333 |
+
<main>
|
| 334 |
+
<div class="dashboard-grid">
|
| 335 |
+
|
| 336 |
+
<!-- Left Side: The "Tool" Interface -->
|
| 337 |
+
<section class="card">
|
| 338 |
+
<h2><i class="fa-solid fa-magnifying-glass-chart"></i> Диагностика системы</h2>
|
| 339 |
+
|
| 340 |
+
<div class="problem-selector">
|
| 341 |
+
<div class="selector-group">
|
| 342 |
+
<label for="deviceType">Тип устройства / Проблемы:</label>
|
| 343 |
+
<select id="deviceType">
|
| 344 |
+
<option value="general">Общая неисправность</option>
|
| 345 |
+
<option value="software">Программное обеспечение (Ошибка кода)</option>
|
| 346 |
+
<option value="hardware">Железо (Не включается)</option>
|
| 347 |
+
<option value="network">Сеть / Интернет</option>
|
| 348 |
+
</select>
|
| 349 |
+
</div>
|
| 350 |
+
|
| 351 |
+
<div class="selector-group">
|
| 352 |
+
<label for="symptoms">Описание симптомов (на русском):</label>
|
| 353 |
+
<textarea id="symptoms" placeholder="Опишите, что именно не работает..."></textarea>
|
| 354 |
+
</div>
|
| 355 |
+
|
| 356 |
+
<button id="runDiag" class="diagnostic-btn">
|
| 357 |
+
<i class="fa-solid fa-bolt"></i> Запустить диагностику
|
| 358 |
+
</button>
|
| 359 |
+
|
| 360 |
+
<!-- Loading State (Hidden initially) -->
|
| 361 |
+
<div id="loadingState" style="display: none; text-align: center; padding: 1rem;">
|
| 362 |
+
<div class="loader" style="margin: 0 auto;"></div>
|
| 363 |
+
<p style="margin-top: 10px; color: var(--text-muted);">Анализ логов и системных файлов...</p>
|
| 364 |
+
</div>
|
| 365 |
+
|
| 366 |
+
<!-- Results Container -->
|
| 367 |
+
<div id="diagnostic-output">
|
| 368 |
+
<div class="result-header">
|
| 369 |
+
<span>Отчет анализа</span>
|
| 370 |
+
<span id="timestamp"></span>
|
| 371 |
+
</div>
|
| 372 |
+
<div id="solution-content">
|
| 373 |
+
<!-- Content injected via JS -->
|
| 374 |
+
</div>
|
| 375 |
+
<div style="margin-top: 2rem; text-align: center;">
|
| 376 |
+
<button onclick="resetTool()" class="diagnostic-btn" style="background-color: var(--border-color); font-size: 0.9rem;">
|
| 377 |
+
<i class="fa-solid fa-rotate-right"></i> Начать заново
|
| 378 |
+
</button>
|
| 379 |
+
</div>
|
| 380 |
+
</div>
|
| 381 |
+
</div>
|
| 382 |
+
</section>
|
| 383 |
+
|
| 384 |
+
<!-- Right Side: System Status / Info -->
|
| 385 |
+
<section class="card">
|
| 386 |
+
<h2><i class="fa-solid fa-server"></i> Статус ресурсов</h2>
|
| 387 |
+
|
| 388 |
+
<div class="status-item">
|
| 389 |
+
<span class="status-label">Системная служба</span>
|
| 390 |
+
<span class="badge badge-success">Работает</span>
|
| 391 |
+
</div>
|
| 392 |
+
<div class="status-item">
|
| 393 |
+
<span class="status-label">База знаний</span>
|
| 394 |
+
<span class="badge badge-success">Обновлена</span>
|
| 395 |
+
</div>
|
| 396 |
+
<div class="status-item">
|
| 397 |
+
<span class="status-label">Поддержка API</span>
|
| 398 |
+
<span class="status-value">Online</span>
|
| 399 |
+
</div>
|
| 400 |
+
<div class="status-item">
|
| 401 |
+
<span class="status-label">Температура ядра</span>
|
| 402 |
+
<span class="status-value">45°C</span>
|
| 403 |
+
</div>
|
| 404 |
+
|
| 405 |
+
<div style="margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-color);">
|
| 406 |
+
<h3 style="font-size: 1.2rem; margin-bottom: 1rem;">Быстрые советы</h3>
|
| 407 |
+
<ul style="list-style: none; color: var(--text-muted); font-size: 0.95rem;">
|
| 408 |
+
<li style="margin-bottom: 10px;">
|
| 409 |
+
<i class="fa-solid fa-circle-info" style="color: var(--primary-color); margin-right: 8px;"></i>
|
| 410 |
+
Перед диагностикой перезагрузите устройство.
|
| 411 |
+
</li>
|
| 412 |
+
<li style="margin-bottom: 10px;">
|
| 413 |
+
<i class="fa-solid fa-circle-info" style="color: var(--primary-color); margin-right: 8px;"></i>
|
| 414 |
+
Убедитесь, что у вас есть права администратора.
|
| 415 |
+
</li>
|
| 416 |
+
<li>
|
| 417 |
+
<i class="fa-solid fa-circle-info" style="color: var(--primary-color); margin-right: 8px;"></i>
|
| 418 |
+
Опишите проблему максим��льно подробно для точного результата.
|
| 419 |
+
</li>
|
| 420 |
+
</ul>
|
| 421 |
+
</div>
|
| 422 |
+
|
| 423 |
+
<div style="margin-top: auto; padding-top: 2rem; text-align: center;">
|
| 424 |
+
<p style="font-size: 0.8rem; color: var(--text-muted);">
|
| 425 |
+
DiagnoTool v2.4.0 © 2023
|
| 426 |
+
</p>
|
| 427 |
+
</div>
|
| 428 |
+
</section>
|
| 429 |
+
|
| 430 |
+
</div>
|
| 431 |
+
</main>
|
| 432 |
+
|
| 433 |
+
<div class="toast-container" id="toastContainer"></div>
|
| 434 |
+
|
| 435 |
+
<script>
|
| 436 |
+
// --- Logic for the Application ---
|
| 437 |
+
|
| 438 |
+
const runBtn = document.getElementById('runDiag');
|
| 439 |
+
const outputDiv = document.getElementById('diagnostic-output');
|
| 440 |
+
const loadingState = document.getElementById('loadingState');
|
| 441 |
+
const solutionContent = document.getElementById('solution-content');
|
| 442 |
+
const toastContainer = document.getElementById('toastContainer');
|
| 443 |
+
const timestampSpan = document.getElementById('timestamp');
|
| 444 |
+
|
| 445 |
+
// Helper to show notifications
|
| 446 |
+
function showToast(message, type = 'info') {
|
| 447 |
+
const toast = document.createElement('div');
|
| 448 |
+
toast.className = 'toast';
|
| 449 |
+
|
| 450 |
+
let icon = '<i class="fa-solid fa-info-circle"></i>';
|
| 451 |
+
if (type === 'success') icon = '<i class="fa-solid fa-check-circle"></i>';
|
| 452 |
+
if (type === 'error') icon = '<i class="fa-solid fa-triangle-exclamation"></i>';
|
| 453 |
+
|
| 454 |
+
toast.innerHTML = `
|
| 455 |
+
<div style="display: flex; align-items: center; gap: 10px;">
|
| 456 |
+
${icon}
|
| 457 |
+
<span>${message}</span>
|
| 458 |
+
</div>
|
| 459 |
+
`;
|
| 460 |
+
|
| 461 |
+
toastContainer.appendChild(toast);
|
| 462 |
+
|
| 463 |
+
setTimeout(() => {
|
| 464 |
+
toast.style.opacity = '0';
|
| 465 |
+
toast.style.transform = 'translateX(100%)';
|
| 466 |
+
setTimeout(() => toast.remove(), 300);
|
| 467 |
+
}, 4000);
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
// Dummy Diagnostic Database
|
| 471 |
+
const solutions = {
|
| 472 |
+
general: {
|
| 473 |
+
title: "Общая неисправность",
|
| 474 |
+
steps: [
|
| 475 |
+
"Проверьте физическое подключение всех кабелей.",
|
| 476 |
+
"Выполните жесткую перезагрузку (Ctrl + Alt + Del или кнопку перезагрузки).",
|
| 477 |
+
"Проверьте панель управления на наличие ошибок."
|
| 478 |
+
],
|
| 479 |
+
note: "Если проблема сохраняется, обратитесь в техническую поддержку."
|
| 480 |
+
},
|
| 481 |
+
software: {
|
| 482 |
+
title: "Программные ошибки",
|
| 483 |
+
steps: [
|
| 484 |
+
"Откройте командную строку от имени администратора.",
|
| 485 |
+
"Выполните проверку системных файлов: sfc /scannow.",
|
| 486 |
+
"Обновите драйверы устройства через Диспетчер устройств.",
|
| 487 |
+
"Проверьте журнал событий (Event Viewer) на наличие критических ошибок."
|
| 488 |
+
],
|
| 489 |
+
note: "Вероятнее всего проблема связана с конфликтом драйверов или повреждением системных данных."
|
| 490 |
+
},
|
| 491 |
+
hardware: {
|
| 492 |
+
title: "Проблемы с оборудованием",
|
| 493 |
+
steps: [
|
| 494 |
+
"Отключите устройство от электросети на 1 минуту.",
|
| 495 |
+
"Проверьте индикаторы батареи (если есть).",
|
| 496 |
+
"Попробуйте использовать другое зарядное устройство.",
|
| 497 |
+
"Визуально осмотрите корпус на предмет повреждений."
|
| 498 |
+
],
|
| 499 |
+
note: "Если устройство не реагирует, возможно требуется замена комплектующих."
|
| 500 |
+
},
|
| 501 |
+
network: {
|
| 502 |
+
title: "Проблемы с сетью",
|
| 503 |
+
steps: [
|
| 504 |
+
"Выполните 'ipconfig /release' и 'ipconfig /renew' в CMD.",
|
| 505 |
+
"Перезагрузите модем и роутер.",
|
| 506 |
+
"Очистите кэш DNS (ipconfig /flushdns).",
|
| 507 |
+
"Проверьте настройки прокси-сервера."
|
| 508 |
+
],
|
| 509 |
+
note: "Сеть, скорее всего, работает, но у вашего устройства есть проблемы с маршрутизацией."
|
| 510 |
+
}
|
| 511 |
+
};
|
| 512 |
+
|
| 513 |
+
runBtn.addEventListener('click', () => {
|
| 514 |
+
const type = document.getElementById('deviceType').value;
|
| 515 |
+
const symptoms = document.getElementById('symptoms').value;
|
| 516 |
+
|
| 517 |
+
// Validation
|
| 518 |
+
if (!symptoms.trim()) {
|
| 519 |
+
showToast("Пожалуйста, опишите симптомы проблемы.", "error");
|
| 520 |
+
return;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
// UI Updates
|
| 524 |
+
runBtn.disabled = true;
|
| 525 |
+
runBtn.innerHTML = '<div class="loader" style="width:20px; height:20px; border-width:3px;"></div> Обработка запроса...';
|
| 526 |
+
outputDiv.style.display = 'none';
|
| 527 |
+
|
| 528 |
+
// Simulate Network/Processing Delay
|
| 529 |
+
setTimeout(() => {
|
| 530 |
+
// Generate Data
|
| 531 |
+
const now = new Date();
|
| 532 |
+
timestampSpan.textContent = now.toLocaleString('ru-RU');
|
| 533 |
+
|
| 534 |
+
let currentSolution = solutions[type];
|
| 535 |
+
if (!currentSolution) currentSolution = solutions.general;
|
| 536 |
+
|
| 537 |
+
// Build HTML Content
|
| 538 |
+
let htmlContent = `
|
| 539 |
+
<p style="margin-bottom: 1rem;"><strong>Обнаружена проблема типа:</strong> ${currentSolution.title}</p>
|
| 540 |
+
<p style="margin-bottom: 1rem; color: var(--text-muted);">Анализ текста: "${symptoms.substring(0, 50)}..." указывает на следующее:</p>
|
| 541 |
+
`;
|
| 542 |
+
|
| 543 |
+
currentSolution.steps.forEach((step, index) => {
|
| 544 |
+
htmlContent += `<div class="solution-step"><strong>Шаг ${index + 1}:</strong> ${step}</div>`;
|
| 545 |
+
});
|
| 546 |
+
|
| 547 |
+
if (type === 'software') {
|
| 548 |
+
htmlContent += `
|
| 549 |
+
<div class="critical-step">
|
| 550 |
+
<strong>ВНИМАНИЕ:</strong> Рекомендуется сохранить важные данные перед выполнением действий, так как может потребоваться переустановка компонентов.
|
| 551 |
+
</div>
|
| 552 |
+
`;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
htmlContent += `<p style="margin-top: 1.5rem; font-style: italic; color: var(--accent-color);">Рекомендация: ${currentSolution.note}</p>`;
|
| 556 |
+
|
| 557 |
+
solutionContent.innerHTML = htmlContent;
|
| 558 |
+
outputDiv.style.display = 'block';
|
| 559 |
+
|
| 560 |
+
// Reset Button
|
| 561 |
+
runBtn.disabled = false;
|
| 562 |
+
runBtn.innerHTML = '<i class="fa-solid fa-bolt"></i> Запустить диагностику';
|
| 563 |
+
|
| 564 |
+
showToast("Диагностика завершена. Решения готовы.", "success");
|
| 565 |
+
|
| 566 |
+
}, 2000); // 2 second simulated delay
|
| 567 |
+
});
|
| 568 |
+
|
| 569 |
+
function resetTool() {
|
| 570 |
+
document.getElementById('symptoms').value = '';
|
| 571 |
+
outputDiv.style.display = 'none';
|
| 572 |
+
showToast("Инструмент сброшен.", "info");
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
// Initialize timestamp
|
| 576 |
+
timestampSpan.textContent = new Date().toLocaleTimeString('ru-RU');
|
| 577 |
+
|
| 578 |
+
</script>
|
| 579 |
+
</body>
|
| 580 |
+
</html>
|