File size: 39,912 Bytes
2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 4353334 2f18c55 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Restricted Access Data Management System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar-collapsed {
width: 70px;
}
.sidebar-collapsed .sidebar-text {
display: none;
}
.main-content {
transition: all 0.3s ease;
}
.progress-bar {
height: 6px;
border-radius: 3px;
transition: width 0.5s ease;
}
.file-upload-container:hover {
background-color: rgba(59, 130, 246, 0.1);
border-color: rgba(59, 130, 246, 0.3);
}
.active-tab {
border-bottom: 3px solid #3b82f6;
color: #3b82f6;
}
.category-chip {
transition: all 0.2s ease;
}
.category-chip:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.storage-modal {
transition: all 0.3s ease;
opacity: 0;
visibility: hidden;
}
.storage-modal.active {
opacity: 1;
visibility: visible;
}
</style>
</head>
<body class="bg-gray-50 font-sans antialiased">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div id="sidebar" class="sidebar bg-gray-800 text-white w-64 flex flex-col flex-shrink-0">
<div class="p-4 flex items-center">
<div class="bg-blue-500 rounded-lg w-10 h-10 flex items-center justify-center">
<i class="fas fa-lock text-white text-xl"></i>
</div>
<span class="sidebar-text ml-3 font-bold text-xl">RADMS</span>
</div>
<div class="px-4 pb-2">
<div class="flex items-center bg-gray-700 rounded-lg p-2">
<div class="w-8 h-8 rounded-full bg-blue-400 flex items-center justify-center">
<span class="text-white font-semibold">AD</span>
</div>
<div class="sidebar-text ml-2">
<p class="font-medium">Admin User</p>
<p class="text-xs text-gray-300">Administrator</p>
</div>
</div>
</div>
<nav class="flex-1 px-2 py-4 space-y-1 overflow-y-auto">
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md bg-gray-900 text-white">
<i class="fas fa-home w-6 text-center"></i>
<span class="sidebar-text ml-3">Dashboard</span>
</a>
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-300 hover:bg-gray-700">
<i class="fas fa-file-upload w-6 text-center"></i>
<span class="sidebar-text ml-3">Upload Files</span>
</a>
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-300 hover:bg-gray-700">
<i class="fas fa-folder w-6 text-center"></i>
<span class="sidebar-text ml-3">My Files</span>
</a>
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-300 hover:bg-gray-700">
<i class="fas fa-users w-6 text-center"></i>
<span class="sidebar-text ml-3">User Management</span>
</a>
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-300 hover:bg-gray-700">
<i class="fas fa-chart-bar w-6 text-center"></i>
<span class="sidebar-text ml-3">Access Logs</span>
</a>
<a href="#" class="flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-300 hover:bg-gray-700">
<i class="fas fa-cog w-6 text-center"></i>
<span class="sidebar-text ml-3">Settings</span>
</a>
</nav>
<div class="p-4 border-t border-gray-700">
<button onclick="toggleSidebar()" class="flex items-center text-gray-300 hover:text-white">
<i class="fas fa-chevron-left w-6 text-center"></i>
<span class="sidebar-text ml-3">Collapse</span>
</button>
</div>
</div>
<!-- Main Content -->
<div class="main-content flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<header class="bg-white shadow-sm z-10">
<div class="flex items-center justify-between px-6 py-3">
<h1 class="text-xl font-semibold text-gray-800">Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="p-2 rounded-full hover:bg-gray-100 relative">
<i class="fas fa-bell text-gray-600"></i>
<span class="absolute top-0 right-0 block h-2 w-2 rounded-full bg-red-500"></span>
</button>
<button class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-blue-400 flex items-center justify-center">
<span class="text-white font-semibold">AD</span>
</div>
<span class="hidden md:inline-block">Admin User</span>
<i class="fas fa-chevron-down text-gray-500"></i>
</button>
</div>
</div>
</header>
<!-- Main Content Area -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<!-- Storage Usage -->
<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800">Storage Usage</h2>
<div class="text-sm text-gray-500">1.5 TB of 10 TB used (15%)</div>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
<div class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 15%"></div>
</div>
<div class="flex justify-between text-xs text-gray-500">
<span>0 TB</span>
<span>10 TB</span>
</div>
<div class="mt-4 grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="border rounded-lg p-4 flex items-center">
<div class="bg-blue-100 p-3 rounded-lg mr-4">
<i class="fas fa-file-pdf text-blue-600 text-xl"></i>
</div>
<div>
<p class="text-sm text-gray-500">PDF Files</p>
<p class="font-semibold">420 GB <span class="text-gray-500 font-normal">(4.2%)</span></p>
</div>
<div class="ml-auto">
<div class="w-12 h-2 bg-gray-200 rounded-full">
<div class="h-2 rounded-full bg-blue-600" style="width: 4.2%"></div>
</div>
</div>
</div>
<div class="border rounded-lg p-4 flex items-center">
<div class="bg-green-100 p-3 rounded-lg mr-4">
<i class="fas fa-file-word text-green-600 text-xl"></i>
</div>
<div>
<p class="text-sm text-gray-500">Documents</p>
<p class="font-semibold">670 GB <span class="text-gray-500 font-normal">(6.7%)</span></p>
</div>
<div class="ml-auto">
<div class="w-12 h-2 bg-gray-200 rounded-full">
<div class="h-2 rounded-full bg-green-600" style="width: 6.7%"></div>
</div>
</div>
</div>
<div class="border rounded-lg p-4 flex items-center">
<div class="bg-purple-100 p-3 rounded-lg mr-4">
<i class="fas fa-file-image text-purple-600 text-xl"></i>
</div>
<div>
<p class="text-sm text-gray-500">Images</p>
<p class="font-semibold">410 GB <span class="text-gray-500 font-normal">(4.1%)</span></p>
</div>
<div class="ml-auto">
<div class="w-12 h-2 bg-gray-200 rounded-full">
<div class="h-2 rounded-full bg-purple-600" style="width: 4.1%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">Quick Actions</h2>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<button class="file-upload-container flex flex-col items-center justify-center border-2 border-dashed border-gray-300 rounded-lg p-6 transition-colors duration-300">
<div class="bg-blue-100 p-3 rounded-full mb-2">
<i class="fas fa-file-upload text-blue-600 text-xl"></i>
</div>
<p class="text-sm font-medium text-gray-700">Upload File</p>
<p class="text-xs text-gray-500">Max 50MB per file</p>
</button>
<button class="flex flex-col items-center justify-center border rounded-lg p-6 hover:bg-gray-50 transition-colors duration-300" onclick="openUserModal()">
<div class="bg-green-100 p-3 rounded-full mb-2">
<i class="fas fa-user-plus text-green-600 text-xl"></i>
</div>
<p class="text-sm font-medium text-gray-700">Add User</p>
</button>
<button class="flex flex-col items-center justify-center border rounded-lg p-6 hover:bg-gray-50 transition-colors duration-300">
<div class="bg-purple-100 p-3 rounded-full mb-2">
<i class="fas fa-folder-plus text-purple-600 text-xl"></i>
</div>
<p class="text-sm font-medium text-gray-700">Create Folder</p>
</button>
<button class="flex flex-col items-center justify-center border rounded-lg p-6 hover:bg-gray-50 transition-colors duration-300">
<div class="bg-yellow-100 p-3 rounded-full mb-2">
<i class="fas fa-chart-line text-yellow-600 text-xl"></i>
</div>
<p class="text-sm font-medium text-gray-700">View Reports</p>
</button>
</div>
</div>
<!-- Recent Activity and Files -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<!-- Recent Activity -->
<div class="bg-white rounded-lg shadow-sm p-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800">Recent Activity</h2>
<button class="text-sm text-blue-600 hover:text-blue-800">View All</button>
</div>
<div class="space-y-4">
<div class="flex items-start">
<div class="bg-blue-100 p-2 rounded-full mr-3">
<i class="fas fa-file-upload text-blue-600"></i>
</div>
<div class="flex-1">
<p class="text-sm"><span class="font-medium">Martha Flores</span> uploaded <span class="font-medium">Q3_Report.pdf</span></p>
<p class="text-xs text-gray-500">2 hours ago</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-green-100 p-2 rounded-full mr-3">
<i class="fas fa-user-plus text-green-600"></i>
</div>
<div class="flex-1">
<p class="text-sm"><span class="font-medium">You</span> added <span class="font-medium">John Doe</span> as a new user</p>
<p class="text-xs text-gray-500">Yesterday, 4:30 PM</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-yellow-100 p-2 rounded-full mr-3">
<i class="fas fa-download text-yellow-600"></i>
</div>
<div class="flex-1">
<p class="text-sm"><span class="font-medium">Alex Rodriguez</span> downloaded <span class="font-medium">Company_Policy.docx</span></p>
<p class="text-xs text-gray-500">Yesterday, 11:20 AM</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-red-100 p-2 rounded-full mr-3">
<i class="fas fa-trash text-red-600"></i>
</div>
<div class="flex-1">
<p class="text-sm"><span class="font-medium">You</span> deleted <span class="font-medium">Old_Draft.doc</span></p>
<p class="text-xs text-gray-500">May 20, 10:15 AM</p>
</div>
</div>
</div>
</div>
<!-- Recent Files -->
<div class="bg-white rounded-lg shadow-sm p-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800">Recent Files</h2>
<div class="flex space-x-2">
<button class="text-sm px-3 py-1 rounded-md bg-gray-100 hover:bg-gray-200">View All</button>
<button class="text-sm px-3 py-1 rounded-md bg-blue-600 text-white hover:bg-blue-700">Upload</button>
</div>
</div>
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Size</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Modified</th>
<th scope="col" class="relative px-4 py-3"><span class="sr-only">Actions</span></th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<i class="fas fa-file-pdf text-red-500 mr-3"></i>
<div>
<div class="text-sm font-medium text-gray-900">Annual_Report_2023.pdf</div>
<div class="text-xs text-gray-500">Finance</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">240 MB</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">May 22, 2023</td>
<td class="px-4 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<i class="fas fa-file-word text-blue-500 mr-3"></i>
<div>
<div class="text-sm font-medium text-gray-900">Employee_Handbook.docx</div>
<div class="text-xs text-gray-500">HR</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">180 MB</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">May 20, 2023</td>
<td class="px-4 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<i class="fas fa-file-excel text-green-500 mr-3"></i>
<div>
<div class="text-sm font-medium text-gray-900">Sales_Data_Q2.xlsx</div>
<div class="text-xs text-gray-500">Sales</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">310 MB</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">May 18, 2023</td>
<td class="px-4 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<i class="fas fa-file-image text-purple-500 mr-3"></i>
<div>
<div class="text-sm font-medium text-gray-900">Product_Photos.zip</div>
<div class="text-xs text-gray-500">Marketing</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">420 MB</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td>
<td class="px-4 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- System Alerts -->
<div class="bg-white rounded-lg shadow-sm p-6 mt-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800">System Alerts</h2>
<button class="text-sm text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-filter mr-1"></i> Filter
</button>
</div>
<div class="space-y-3">
<div class="flex items-start p-3 rounded-lg bg-red-50">
<i class="fas fa-exclamation-circle text-red-500 mt-1 mr-3"></i>
<div>
<p class="text-sm font-medium text-gray-800">Low storage - Jane Smith</p>
<p class="text-xs text-gray-600">User has used 9.2 GB of 10 GB limit (92%)</p>
</div>
<button class="ml-auto text-gray-400 hover:text-gray-600" onclick="openUpgradeModal('Jane Smith', '10 GB')">
<i class="fas fa-plus-circle text-blue-500"></i>
</button>
</div>
<div class="flex items-start p-3 rounded-lg bg-yellow-50">
<i class="fas fa-exclamation-triangle text-yellow-500 mt-1 mr-3"></i>
<div>
<p class="text-sm font-medium text-gray-800">Multiple failed login attempts</p>
<p class="text-xs text-gray-600">3 failed attempts detected from IP 192.168.1.15</p>
</div>
<button class="ml-auto text-gray-400 hover:text-gray-600">
<i class="fas fa-times"></i>
</button>
</div>
<div class="flex items-start p-3 rounded-lg bg-blue-50">
<i class="fas fa-info-circle text-blue-500 mt-1 mr-3"></i>
<div>
<p class="text-sm font-medium text-gray-800">New user registered</p>
<p class="text-xs text-gray-600">John Doe was added to the system with 10 GB storage limit</p>
</div>
<button class="ml-auto text-gray-400 hover:text-gray-600">
<i class="fas fa-times"></i>
</button>
</div>
</div>
</div>
</main>
</div>
</div>
<!-- User Management Modal -->
<div id="userModal" class="storage-modal fixed z-10 inset-0 overflow-y-auto hidden">
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true" onclick="closeModal('userModal')">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start">
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
Add New User
</h3>
<div class="mt-4 space-y-4">
<div>
<label for="username" class="block text-sm font-medium text-gray-700">Username</label>
<input type="text" id="username" name="username" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
<input type="email" id="email" name="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
</div>
<div>
<label for="user-role" class="block text-sm font-medium text-gray-700">Role</label>
<select id="user-role" name="role" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
<option value="user">Regular User</option>
<option value="admin">Administrator</option>
</select>
</div>
<div>
<label for="storage-limit" class="block text-sm font-medium text-gray-700">Storage Limit</label>
<div class="flex items-center space-x-2">
<input type="number" id="storage-limit" name="storage-limit" value="10" class="mt-1 block w-24 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<select id="storage-unit" name="storage-unit" class="mt-1 block w-20 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
<option value="MB">MB</option>
<option value="GB" selected>GB</option>
<option value="TB">TB</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
Add User
</button>
<button type="button" onclick="closeModal('userModal')" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- Storage Upgrade Modal -->
<div id="upgradeModal" class="storage-modal fixed z-10 inset-0 overflow-y-auto hidden">
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true" onclick="closeModal('upgradeModal')">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start">
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
Upgrade Storage for <span id="upgrade-username">User</span>
</h3>
<div class="mt-4">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium">Current Limit: <span id="current-limit">10 GB</span></span>
<span class="text-xs text-gray-500">90% used</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-red-600 h-2.5 rounded-full" style="width: 90%"></div>
</div>
</div>
<div class="mt-6">
<label for="new-storage-limit" class="block text-sm font-medium text-gray-700">New Storage Limit</label>
<div class="flex items-center space-x-2 mt-1">
<input type="number" id="new-storage-limit" name="new-storage-limit" value="15" class="block w-24 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<select id="new-storage-unit" name="new-storage-unit" class="block w-20 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
<option value="MB">MB</option>
<option value="GB" selected>GB</option>
<option value="TB">TB</option>
</select>
</div>
</div>
<div class="mt-4">
<label class="block text-sm font-medium text-gray-700">Reason for Upgrade</label>
<textarea id="upgrade-reason" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button type="button" onclick="upgradeStorage()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
Upgrade Storage
</button>
<button type="button" onclick="closeModal('upgradeModal')" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
Cancel
</button>
</div>
</div>
</div>
</div>
<script>
// Toggle sidebar
function toggleSidebar() {
const sidebar = document.getElementById('sidebar');
const mainContent = document.querySelector('.main-content');
sidebar.classList.toggle('sidebar-collapsed');
if (sidebar.classList.contains('sidebar-collapsed')) {
mainContent.classList.add('ml-16');
} else {
mainContent.classList.remove('ml-16');
}
}
// Simulate alert dismissal
document.querySelectorAll('[class*="fa-times"]').forEach(button => {
button.addEventListener('click', function() {
this.closest('[class*="bg-"]').style.opacity = '0';
setTimeout(() => {
this.closest('[class*="bg-"]').style.display = 'none';
}, 300);
});
});
// File upload hover effect
const uploadContainer = document.querySelector('.file-upload-container');
uploadContainer.addEventListener('mouseenter', function() {
const icon = this.querySelector('i');
icon.classList.remove('text-blue-600');
icon.classList.add('text-white');
this.querySelector('[class*="bg-blue-100"]').classList.remove('bg-blue-100');
this.querySelector('[class*="bg-blue-100"]').classList.add('bg-blue-600');
});
uploadContainer.addEventListener('mouseleave', function() {
const icon = this.querySelector('i');
icon.classList.add('text-blue-600');
icon.classList.remove('text-white');
this.querySelector('[class*="bg-blue-600"]').classList.add('bg-blue-100');
this.querySelector('[class*="bg-blue-600"]').classList.remove('bg-blue-600');
});
// Modal functions
function openUserModal() {
document.getElementById('userModal').classList.remove('hidden');
}
function openUpgradeModal(username, currentLimit) {
document.getElementById('upgrade-username').textContent = username;
document.getElementById('current-limit').textContent = currentLimit;
document.getElementById('upgradeModal').classList.remove('hidden');
}
function closeModal(modalId) {
document.getElementById(modalId).classList.add('hidden');
}
function upgradeStorage() {
const newLimit = document.getElementById('new-storage-limit').value;
const newUnit = document.getElementById('new-storage-unit').value;
const reason = document.getElementById('upgrade-reason').value;
// Here you would normally send this data to the server
console.log(`Upgrading storage to ${newLimit} ${newUnit} because: ${reason}`);
// Show success message
alert(`Storage upgraded successfully to ${newLimit} ${newLimit == 1 ? newUnit.slice(0, -1) : newUnit}!`);
closeModal('upgradeModal');
}
// Set admin storage to 10TB
document.addEventListener('DOMContentLoaded', function() {
const roleSelect = document.getElementById('user-role');
roleSelect.addEventListener('change', function() {
const storageLimit = document.getElementById('storage-limit');
const storageUnit = document.getElementById('storage-unit');
if (this.value === 'admin') {
storageLimit.value = '10';
storageUnit.value = 'TB';
} else {
storageLimit.value = '10';
storageUnit.value = 'GB';
}
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - <a href="https://enzostvs-deepsite.hf.space?remix=nmtalhp/radms" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
</html> |