Spaces:
Running
Running
File size: 86,321 Bytes
f4af434 2a0dede 13c734b fee11a5 f4af434 fee11a5 f4af434 2a0dede f4af434 2a0dede f4af434 2a0dede 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 4e6d8d4 1579b71 2a0dede 4e6d8d4 2a0dede 4e6d8d4 2a0dede 4e6d8d4 2a0dede f4af434 2a0dede f4af434 2a0dede f4af434 2a0dede f4af434 cc7c1b1 f4af434 cc7c1b1 f4af434 cc7c1b1 f4af434 2a0dede 4e6d8d4 2a0dede cc7c1b1 2a0dede 1579b71 f4af434 2a0dede f4af434 | 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 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 |
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ZSL Interpreter Connect</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>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #f9fafb;
}
.primary-bg {
background-color: #023047;
}
.primary-text {
color: #023047;
}
.accent-bg {
background-color: #fb8500;
}
.accent-text {
color: #fb8500;
}
.sidebar {
transition: all 0.3s ease;
}
.call-modal {
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.video-placeholder {
background: linear-gradient(135deg, #023047 0%, #219ebc 100%);
}
#jitsi-container {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
#start-session-btn:hover, #join-doctor-btn:hover, #join-patient-btn:hover {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.toggle-checkbox:checked {
right: 0;
border-color: #fb8500;
}
.toggle-checkbox:checked + .toggle-label {
background-color: #fb8500;
}
.fab {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
transition: all 0.3s ease;
}
.fab:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.call-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.profile-pic-upload {
opacity: 0;
position: absolute;
z-index: -1;
}
.profile-pic-label {
cursor: pointer;
transition: all 0.3s ease;
}
.profile-pic-label:hover {
transform: scale(1.05);
}
</style>
</head>
<body class="min-h-screen">
<!-- Login Page (Default View) -->
<div id="login-page" class="flex flex-col items-center justify-center min-h-screen p-4">
<div class="w-full max-w-md p-8 bg-white rounded-xl shadow-md">
<div class="flex flex-col items-center mb-8">
<div class="w-20 h-20 rounded-full primary-bg flex items-center justify-center mb-4">
<i class="fas fa-hands-helping text-white text-3xl"></i>
</div>
<h1 class="text-2xl font-bold primary-text">ZSL Interpreter Connect</h1>
<p class="text-gray-500 text-sm mt-1">Empowering real-time sign language communication in healthcare</p>
</div>
<form id="login-form" class="space-y-4">
<div>
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="email" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#023047] focus:border-[#023047] transition">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="password" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#023047] focus:border-[#023047] transition">
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input type="checkbox" id="remember" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="remember" class="ml-2 block text-sm text-gray-700">Remember me</label>
</div>
<a href="#" class="text-sm text-[#023047] hover:underline">Forgot password?</a>
</div>
<button type="submit" class="w-full primary-bg text-white py-2 px-4 rounded-lg hover:bg-[#022b3d] transition font-medium flex items-center justify-center">
<i class="fas fa-sign-in-alt mr-2"></i> Login
</button>
</form>
</div>
<p class="mt-6 text-sm text-gray-500">Don't have an account? <a href="#" class="text-[#023047] hover:underline">Contact admin</a></p>
</div>
<!-- App Container (Hidden by Default) -->
<div id="app-container" class="hidden">
<!-- Mobile Header -->
<header class="md:hidden fixed top-0 left-0 right-0 primary-bg text-white p-4 flex justify-between items-center z-50 shadow-md">
<button id="mobile-menu-btn" class="text-white focus:outline-none">
<i class="fas fa-bars text-xl"></i>
</button>
<h1 class="text-lg font-bold">Interpreter Connect</h1>
<div class="w-8 h-8 rounded-full bg-white flex items-center justify-center">
<i class="fas fa-user primary-text"></i>
</div>
</header>
<!-- Desktop Sidebar -->
<aside id="sidebar" class="hidden md:block fixed top-0 left-0 h-screen w-64 primary-bg text-white p-4 sidebar">
<div class="flex flex-col h-full">
<div class="flex items-center mb-8">
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center mr-3">
<i class="fas fa-hands-helping primary-text"></i>
</div>
<h1 class="text-lg font-bold">ZSL Interpreter Connect</h1>
</div>
<nav class="flex-1">
<ul class="space-y-2">
<li>
<a href="#" data-page="dashboard" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition active-page">
<i class="fas fa-tachometer-alt mr-3"></i> Dashboard
</a>
</li>
<li>
<a href="#" data-page="calls" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-phone-alt mr-3"></i> Call History
</a>
</li>
<li>
<a href="#" data-page="profile" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-user mr-3"></i> Profile
</a>
</li>
<li>
<a href="#" data-page="settings" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-cog mr-3"></i> Settings
</a>
</li>
<li>
<a href="#" data-page="admin" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-user-shield mr-3"></i> Admin
</a>
</li>
<li>
<a href="#" data-page="booking" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-calendar-check mr-3"></i> Book an Interpreter
</a>
</li>
</ul>
</nav>
<div class="mt-auto pt-4 border-t border-[#022b3d]">
<button id="logout-btn" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition w-full">
<i class="fas fa-sign-out-alt mr-3"></i> Logout
</button>
</div>
</div>
</aside>
<!-- Mobile Sidebar -->
<aside id="mobile-sidebar" class="fixed top-0 left-0 h-screen w-64 primary-bg text-white p-4 sidebar transform -translate-x-full z-40 transition-transform duration-300 ease-in-out">
<div class="flex flex-col h-full">
<div class="flex items-center mb-8">
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center mr-3">
<i class="fas fa-hands-helping primary-text"></i>
</div>
<h1 class="text-lg font-bold">ZSL Interpreter Connect</h1>
</div>
<nav class="flex-1">
<ul class="space-y-2">
<li>
<a href="#" data-page="dashboard" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition active-page">
<i class="fas fa-tachometer-alt mr-3"></i> Dashboard
</a>
</li>
<li>
<a href="#" data-page="calls" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-phone-alt mr-3"></i> Call History
</a>
</li>
<li>
<a href="#" data-page="profile" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-user mr-3"></i> Profile
</a>
</li>
<li>
<a href="#" data-page="settings" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-cog mr-3"></i> Settings
</a>
</li>
<li>
<a href="#" data-page="admin" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
<i class="fas fa-user-shield mr-3"></i> Admin
</a>
</li>
</ul>
</nav>
<div class="mt-auto pt-4 border-t border-[#022b3d]">
<button id="mobile-logout-btn" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition w-full">
<i class="fas fa-sign-out-alt mr-3"></i> Logout
</button>
</div>
</div>
</aside>
<!-- Main Content -->
<main id="main-content" class="md:ml-64 pt-16 md:pt-0">
<!-- Dashboard Page -->
<div id="dashboard-page" class="p-4 md:p-6 active-page">
<div class="max-w-6xl mx-auto">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold primary-text">Video Interpreting Portal</h2>
<div class="flex items-center">
<span class="mr-2 text-sm text-gray-600">Status:</span>
<div class="relative inline-block w-12 mr-2 align-middle select-none">
<input type="checkbox" id="status-toggle" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="status-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
<span id="status-text" class="text-sm font-medium">Offline</span>
</div>
</div>
<div class="mb-8 bg-gradient-to-r from-[#023047] to-[#219ebc] p-6 rounded-xl shadow-lg text-white">
<h3 class="text-2xl font-bold mb-2">Hi, <span id="interpreter-name">John Mwansa</span> 👋</h3>
<p class="text-white text-opacity-90">Welcome to your interpreting session dashboard. Ready to connect with patients and healthcare providers.</p>
</div>
<!-- Jitsi Meet Container -->
<div id="jitsi-container" class="hidden mb-6 rounded-xl overflow-hidden shadow-xl">
<iframe id="jitsi-iframe" allow="camera; microphone; fullscreen; display-capture" class="w-full h-[500px] border-0"></iframe>
</div>
<!-- Action Buttons -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
<button id="start-session-btn" class="bg-gradient-to-r from-[#fb8500] to-[#ffb703] text-white py-4 px-6 rounded-xl shadow-md hover:shadow-lg transition-all transform hover:-translate-y-1 flex flex-col items-center justify-center">
<i class="fas fa-video text-2xl mb-2"></i>
<span class="font-bold text-lg">Start New Session</span>
<span class="text-sm font-light">Create new meeting room</span>
</button>
<button id="join-doctor-btn" class="bg-gradient-to-r from-[#023047] to-[#219ebc] text-white py-4 px-6 rounded-xl shadow-md hover:shadow-lg transition-all transform hover:-translate-y-1 flex flex-col items-center justify-center">
<i class="fas fa-user-md text-2xl mb-2"></i>
<span class="font-bold text-lg">Join Doctor</span>
<span class="text-sm font-light">Connect with healthcare provider</span>
</button>
<button id="join-patient-btn" class="bg-gradient-to-r from-[#8ecae6] to-[#219ebc] text-white py-4 px-6 rounded-xl shadow-md hover:shadow-lg transition-all transform hover:-translate-y-1 flex flex-col items-center justify-center">
<i class="fas fa-procedures text-2xl mb-2"></i>
<span class="font-bold text-lg">Join Patient</span>
<span class="text-sm font-light">Connect directly with patient</span>
</button>
<button id="search-interpreter-btn" class="bg-gradient-to-r from-[#4CAF50] to-[#2E7D32] text-white py-4 px-6 rounded-xl shadow-md hover:shadow-lg transition-all transform hover:-translate-y-1 flex flex-col items-center justify-center">
<i class="fas fa-search-location text-2xl mb-2"></i>
<span class="font-bold text-lg">Find Interpreter</span>
<span class="text-sm font-light">Locate nearest available</span>
</button>
</div>
<!-- Incoming Call Banner (Hidden by Default) -->
<div id="incoming-call-banner" class="hidden mb-6 bg-gradient-to-r from-[#fb8500] to-[#ffb703] text-white p-4 rounded-xl shadow-md">
<div class="flex justify-between items-center">
<div>
<h3 class="font-bold text-lg">Incoming Interpreter Call</h3>
<div class="flex items-center mt-1">
<span class="bg-white text-[#fb8500] px-2 py-1 rounded text-xs font-bold mr-2">VRI</span>
<span class="text-sm">From: <strong>Nurse</strong> at Kitwe Central Hospital</span>
</div>
</div>
<div class="flex space-x-2">
<button id="accept-call-btn" class="bg-white text-[#fb8500] px-4 py-2 rounded-lg font-bold flex items-center">
<i class="fas fa-phone-alt mr-2"></i> Accept
</button>
<button id="decline-call-btn" class="bg-[#023047] text-white px-4 py-2 rounded-lg font-bold flex items-center">
<i class="fas fa-times mr-2"></i> Decline
</button>
</div>
</div>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-white p-4 rounded-xl shadow-sm">
<div class="flex items-center">
<div class="p-3 rounded-full bg-[#e1f0ff] mr-3">
<i class="fas fa-phone-alt primary-text"></i>
</div>
<div>
<p class="text-sm text-gray-500">Today's Calls</p>
<h3 class="text-xl font-bold">5</h3>
</div>
</div>
</div>
<div class="bg-white p-4 rounded-xl shadow-sm">
<div class="flex items-center">
<div class="p-3 rounded-full bg-[#fff4e5] mr-3">
<i class="fas fa-clock accent-text"></i>
</div>
<div>
<p class="text-sm text-gray-500">Total Duration</p>
<h3 class="text-xl font-bold">2h 15m</h3>
</div>
</div>
</div>
<div class="bg-white p-4 rounded-xl shadow-sm">
<div class="flex items-center">
<div class="p-3 rounded-full bg-[#e5f9f0] mr-3">
<i class="fas fa-star text-green-500"></i>
</div>
<div>
<p class="text-sm text-gray-500">Average Rating</p>
<h3 class="text-xl font-bold">4.8</h3>
</div>
</div>
</div>
</div>
<!-- Call Queue -->
<div class="bg-white p-4 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-lg">Recent Call Queue</h3>
<button class="text-sm primary-text font-medium">View All</button>
</div>
<div class="space-y-3">
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
<div class="flex justify-between items-center">
<div>
<div class="flex items-center mb-1">
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRS</span>
<span class="text-sm font-medium">Dr. Banda</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-map-marker-alt mr-1 text-xs"></i>
<span>Lusaka Central Clinic • 5km away</span>
</div>
</div>
<div class="text-right">
<p class="text-sm text-gray-500">10:45 AM</p>
<span class="text-xs px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
</div>
</div>
</div>
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
<div class="flex justify-between items-center">
<div>
<div class="flex items-center mb-1">
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRI</span>
<span class="text-sm font-medium">Sarah K.</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-video mr-1 text-xs"></i>
<span>Remote Video Session</span>
</div>
</div>
<div class="text-right">
<p class="text-sm text-gray-500">09:30 AM</p>
<span class="text-xs px-2 py-1 rounded-full bg-yellow-100 text-yellow-800">Pending</span>
</div>
</div>
</div>
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
<div class="flex justify-between items-center">
<div>
<div class="flex items-center mb-1">
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRS</span>
<span class="text-sm font-medium">Mr. Phiri</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-map-marker-alt mr-1 text-xs"></i>
<span>Ndola Teaching Hospital • 12km away</span>
</div>
</div>
<div class="text-right">
<p class="text-sm text-gray-500">08:15 AM</p>
<span class="text-xs px-2 py-1 rounded-full bg-red-100 text-red-800">Missed</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Call History Page -->
<div id="calls-page" class="p-4 md:p-6 hidden">
<div class="max-w-6xl mx-auto">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold primary-text">Call History</h2>
<div class="flex items-center space-x-2">
<div class="relative">
<select class="appearance-none bg-white border border-gray-300 rounded-lg px-4 py-2 pr-8 text-sm focus:outline-none focus:ring-2 focus:ring-[#023047]">
<option>All Calls</option>
<option>Completed</option>
<option>Missed</option>
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
<i class="fas fa-chevron-down text-xs"></i>
</div>
</div>
<button class="bg-white border border-gray-300 rounded-lg px-3 py-2 text-sm">
<i class="fas fa-filter"></i>
</button>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date & Time</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Duration</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Requester</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Feedback</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50 cursor-pointer">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 10:45 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">22 min</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold">VRS</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Dr. Banda</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i>
<span>5.0</span>
</div>
</td>
</tr>
<tr class="hover:bg-gray-50 cursor-pointer">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 09:30 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">18 min</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold">VRI</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah K.</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i>
<span>4.5</span>
</div>
</td>
</tr>
<tr class="hover:bg-gray-50 cursor-pointer">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 08:15 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold">VRS</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mr. Phiri</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 py-1 rounded-full bg-red-100 text-red-800">Missed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
</tr>
<tr class="hover:bg-gray-50 cursor-pointer">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Yesterday, 3:20 PM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15 min</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold">VRI</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Nurse Mwape</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i>
<span>4.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bg-gray-50 px-6 py-3 flex items-center justify-between border-t border-gray-200">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> Previous </a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> Next </a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700"> Showing <span class="font-medium">1</span> to <span class="font-medium">4</span> of <span class="font-medium">12</span> results </p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"> <span class="sr-only">Previous</span> <i class="fas fa-chevron-left h-5 w-5"></i> </a>
<a href="#" aria-current="page" class="z-10 bg-[#023047] border-[#023047] text-white relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 1 </a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 2 </a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 3 </a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"> <span class="sr-only">Next</span> <i class="fas fa-chevron-right h-5 w-5"></i> </a>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Profile Page -->
<div id="profile-page" class="p-4 md:p-6 hidden">
<div class="max-w-3xl mx-auto">
<div class="mb-6">
<h2 class="text-2xl font-bold primary-text">My Profile</h2>
<p class="text-gray-600">Update your personal information and preferences</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<form id="profile-form">
<div class="flex flex-col items-center mb-6">
<input type="file" id="profile-pic" accept="image/*" class="profile-pic-upload">
<label for="profile-pic" class="profile-pic-label">
<div class="w-24 h-24 rounded-full bg-gray-200 flex items-center justify-center overflow-hidden mb-3">
<img id="profile-pic-preview" src="https://ui-avatars.com/api/?name=John+Mwansa&background=023047&color=fff" alt="Profile" class="w-full h-full object-cover">
</div>
</label>
<p class="text-sm text-gray-500">Click to change photo</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div>
<label for="first-name" class="block text-sm font-medium text-gray-700 mb-1">First Name</label>
<input type="text" id="first-name" value="John" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#023047] focus:border-[#023047] transition" readonly>
</div>
<div>
<label for="last-name" class="block text-sm font-medium text-gray-700 mb-1">Last Name</label>
<input type="text" id="last-name" value="Mwansa" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#023047] focus:border-[#023047] transition" readonly>
</div>
</div>
<div class="mb-6">
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="email" value="john.mwansa@zslconnect.org" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#023047] focus:border-[#023047] transition" readonly>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Supported Languages</label>
<div class="space-y-2">
<div class="flex items-center">
<input type="checkbox" id="zsl" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="zsl" class="ml-2 block text-sm text-gray-700">Zambian Sign Language (ZSL)</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="english" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="english" class="ml-2 block text-sm text-gray-700">English</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="bemba" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="bemba" class="ml-2 block text-sm text-gray-700">Bemba</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="nyanja" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="nyanja" class="ml-2 block text-sm text-gray-700">Nyanja</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="lozi" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
<label for="lozi" class="ml-2 block text-sm text-gray-700">Lozi</label>
</div>
</div>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Availability</label>
<div class="flex items-center">
<div class="relative inline-block w-12 mr-2 align-middle select-none">
<input type="checkbox" id="availability-toggle" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="availability-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
<span id="availability-text" class="text-sm font-medium">Available</span>
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="primary-bg text-white py-2 px-6 rounded-lg hover:bg-[#022b3d] transition font-medium">Save Changes</button>
</div>
</form>
</div>
</div>
</div>
<!-- Admin Page -->
<div id="admin-page" class="p-4 md:p-6 hidden">
<div class="max-w-6xl mx-auto">
<div class="mb-6">
<h2 class="text-2xl font-bold primary-text">Admin Dashboard</h2>
<p class="text-gray-600">Manage interpreters and system settings</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4 text-gray-800">Interpreter Management</h3>
<div id="interpreter-form" class="hidden mb-6 bg-gray-50 p-4 rounded-lg">
<h4 class="font-medium mb-3">Add New Interpreter</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-sm font-medium text-gray-800 mb-1">First Name</label>
<input type="text" id="interpreter-firstname" class="w-full px-3 py-2 border border-gray-300 rounded-md text-gray-800">
</div>
<div>
<label class="block text-sm font-medium text-gray-800 mb-1">Last Name</label>
<input type="text" id="interpreter-lastname" class="w-full px-3 py-2 border border-gray-300 rounded-md text-gray-800">
</div>
<div>
<label class="block text-sm font-medium text-gray-800 mb-1">Email</label>
<input type="email" id="interpreter-email" class="w-full px-3 py-2 border border-gray-300 rounded-md text-gray-800">
</div>
<div>
<label class="block text-sm font-medium text-gray-800 mb-1">Phone</label>
<input type="tel" id="interpreter-phone" class="w-full px-3 py-2 border border-gray-300 rounded-md text-gray-800">
</div>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-800 mb-2">Languages</label>
<div class="flex flex-wrap gap-2">
<label class="inline-flex items-center">
<input type="checkbox" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded" value="ZSL">
<span class="ml-2 text-sm text-gray-800">ZSL</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded" value="English">
<span class="ml-2 text-sm text-gray-800">English</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded" value="Bemba">
<span class="ml-2 text-sm text-gray-800">Bemba</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded" value="Nyanja">
<span class="ml-2 text-sm text-gray-800">Nyanja</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded" value="Lozi">
<span class="ml-2 text-sm text-gray-800">Lozi</span>
</label>
</div>
</div>
<div class="flex justify-end space-x-3">
<button id="cancel-interpreter-btn" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium">Cancel</button>
<button id="save-interpreter-btn" class="px-4 py-2 bg-[#023047] text-white rounded-md text-sm font-medium">Save Interpreter</button>
</div>
</div>
<button id="add-interpreter-btn" class="w-full primary-bg text-white py-2 px-4 rounded-lg hover:bg-[#022b3d] transition font-medium mb-4">
<i class="fas fa-user-plus mr-2"></i> Add New Interpreter
</button>
<button id="view-interpreters-btn" class="w-full bg-white border border-[#023047] primary-text py-2 px-4 rounded-lg hover:bg-gray-50 transition font-medium">
<i class="fas fa-list mr-2"></i> View All Interpreters
</button>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4 text-gray-800">System Statistics</h3>
<div class="space-y-4">
<div>
<p class="text-sm text-gray-500">Total Interpreters</p>
<h3 class="text-xl font-bold">24</h3>
</div>
<div>
<p class="text-sm text-gray-500">Active Sessions</p>
<h3 class="text-xl font-bold">8</h3>
</div>
<div>
<p class="text-sm text-gray-500">Average Rating</p>
<h3 class="text-xl font-bold">4.6</h3>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4 text-gray-800">Quick Actions</h3>
<div class="space-y-3">
<button class="w-full text-left text-sm p-2 hover:bg-gray-50 rounded-lg">
<i class="fas fa-bell mr-2"></i> Send Announcement
</button>
<button class="w-full text-left text-sm p-2 hover:bg-gray-50 rounded-lg">
<i class="fas fa-file-export mr-2"></i> Export Reports
</button>
<button class="w-full text-left text-sm p-2 hover:bg-gray-50 rounded-lg">
<i class="fas fa-cog mr-2"></i> System Settings
</button>
</div>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4 text-gray-800">Recent Activity</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Activity</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">User</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Details</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Today, 10:30 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">New Interpreter</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Admin User</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Registered John Mwansa</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Today, 09:15 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Session Completed</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah K.</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Duration: 22 minutes</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Yesterday, 4:45 PM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">System Update</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">System</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Applied security patches</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Settings Page -->
<div id="settings-page" class="p-4 md:p-6 hidden">
<div class="max-w-3xl mx-auto">
<div class="mb-6">
<h2 class="text-2xl font-bold primary-text">Settings</h2>
<p class="text-gray-600">Configure your app preferences</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="mb-8">
<h3 class="text-lg font-semibold mb-4 primary-text">Notification Preferences</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Email Notifications</label>
<p class="text-xs text-gray-500">Receive email alerts for new calls</p>
</div>
<div class="relative inline-block w-12 align-middle select-none">
<input type="checkbox" id="email-notifications" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="email-notifications" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">In-App Notifications</label>
<p class="text-xs text-gray-500">Show popup notifications for incoming calls</p>
</div>
<div class="relative inline-block w-12 align-middle select-none">
<input type="checkbox" id="app-notifications" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="app-notifications" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Sound Alerts</label>
<p class="text-xs text-gray-500">Play sound for incoming calls</p>
</div>
<div class="relative inline-block w-12 align-middle select-none">
<input type="checkbox" id="sound-alerts" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="sound-alerts" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-lg font-semibold mb-4 primary-text">Video Settings</h3>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Video Quality</label>
<div class="flex space-x-4">
<div class="flex items-center">
<input id="low-quality" name="video-quality" type="radio" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300">
<label for="low-quality" class="ml-2 block text-sm text-gray-700">Low (for slow networks)</label>
</div>
<div class="flex items-center">
<input id="hd-quality" name="video-quality" type="radio" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300">
<label for="hd-quality" class="ml-2 block text-sm text-gray-700">HD</label>
</div>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Auto-accept Calls</label>
<p class="text-xs text-gray-500">Automatically accept calls when available</p>
</div>
<div class="relative inline-block w-12 align-middle select-none">
<input type="checkbox" id="auto-accept" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="auto-accept" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-lg font-semibold mb-4 primary-text">Privacy & Security</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Show My Location</label>
<p class="text-xs text-gray-500">Allow VRS calls to see your approximate location</p>
</div>
<div class="relative inline-block w-12 align-middle select-none">
<input type="checkbox" id="show-location" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="show-location" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Two-Factor Authentication</label>
<p class="text-xs text-gray-500">Add extra security to your account</p>
</div>
<button class="text-sm primary-text font-medium">Enable</button>
</div>
</div>
</div>
<div class="flex justify-between items-center pt-4 border-t border-gray-200">
<button class="text-sm text-gray-500 hover:underline">Need help? Contact Support</button>
<button class="primary-bg text-white py-2 px-6 rounded-lg hover:bg-[#022b3d] transition font-medium">Save Settings</button>
</div>
</div>
</div>
</div>
</main>
<!-- Interpreter Search Modal (Hidden by Default) -->
<div id="interpreter-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl w-full max-w-md mx-4">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold">Available Interpreters</h3>
<button id="close-interpreter-modal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div id="interpreter-list" class="max-h-96 overflow-y-auto mb-4">
<!-- Interpreters will be listed here -->
</div>
<input type="hidden" id="selected-interpreter-id" value="">
<button id="connect-interpreter-btn" class="w-full bg-gray-400 text-white py-3 px-6 rounded-lg font-bold disabled:opacity-75" disabled>
<i class="fas fa-phone-alt mr-2"></i> Connect to Interpreter
</button>
</div>
</div>
</div>
<!-- Call Modal (Hidden by Default) -->
<div id="call-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl w-full max-w-md mx-4 call-modal">
<div class="p-6">
<h3 class="text-xl font-bold mb-2">Incoming Call Request</h3>
<div class="space-y-3 mb-6">
<div class="flex items-center">
<i class="fas fa-user-tie mr-3 text-gray-500"></i>
<span>Requester: <strong>Nurse</strong> at Kitwe Central Hospital</span>
</div>
<div class="flex items-center">
<i class="fas fa-phone-alt mr-3 text-gray-500"></i>
<span>Call Type: <strong>VRI</strong> (Video Remote Interpreting)</span>
</div>
<div class="flex items-center">
<i class="fas fa-video mr-3 text-gray-500"></i>
<span>Mode: <strong>Video</strong></span>
</div>
<div class="flex items-center">
<i class="fas fa-clock mr-3 text-gray-500"></i>
<span>Time left: <strong id="call-timer">15</strong> seconds</span>
</div>
</div>
<div class="flex justify-center space-x-4">
<button id="modal-accept-btn" class="bg-green-500 text-white px-6 py-3 rounded-lg font-bold flex items-center hover:bg-green-600 transition">
<i class="fas fa-phone-alt mr-2"></i> Accept
</button>
<button id="modal-decline-btn" class="bg-red-500 text-white px-6 py-3 rounded-lg font-bold flex items-center hover:bg-red-600 transition">
<i class="fas fa-times mr-2"></i> Decline
</button>
</div>
</div>
</div>
</div>
<!-- Video Call Interface (Hidden by Default) -->
<div id="video-call" class="fixed inset-0 bg-black z-50 hidden flex flex-col">
<div class="flex-1 relative">
<!-- Remote Video -->
<div class="absolute inset-0 video-placeholder flex items-center justify-center">
<div class="text-center text-white">
<i class="fas fa-user-tie text-5xl mb-2"></i>
<p class="text-xl font-medium">Nurse at Kitwe Central</p>
<p class="text-sm opacity-75">Connecting...</p>
</div>
</div>
<!-- Local Video -->
<div class="absolute bottom-4 right-4 w-32 h-48 bg-gray-800 rounded-lg overflow-hidden">
<div class="w-full h-full flex items-center justify-center">
<i class="fas fa-user text-white text-2xl"></i>
</div>
</div>
<!-- Call Controls -->
<div class="absolute bottom-0 left-0 right-0 bg-gray-900 bg-opacity-70 p-4">
<div class="flex justify-center space-x-6">
<button class="w-12 h-12 rounded-full bg-gray-700 text-white flex items-center justify-center hover:bg-gray-600 transition">
<i class="fas fa-microphone"></i>
</button>
<button class="w-12 h-12 rounded-full bg-gray-700 text-white flex items-center justify-center hover:bg-gray-600 transition">
<i class="fas fa-video"></i>
</button>
<button id="end-call-btn" class="w-12 h-12 rounded-full bg-red-600 text-white flex items-center justify-center hover:bg-red-700 transition">
<i class="fas fa-phone-slash"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Mobile FAB -->
<button id="fab-online" class="md:hidden fixed bottom-6 right-6 w-14 h-14 rounded-full primary-bg text-white flex items-center justify-center shadow-lg fab">
<i class="fas fa-power-off text-xl"></i>
</button>
</div>
<script>
// DOM Elements
const loginPage = document.getElementById('login-page');
const appContainer = document.getElementById('app-container');
const loginForm = document.getElementById('login-form');
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
const mobileSidebar = document.getElementById('mobile-sidebar');
const logoutBtn = document.getElementById('logout-btn');
const mobileLogoutBtn = document.getElementById('mobile-logout-btn');
const statusToggle = document.getElementById('status-toggle');
const statusText = document.getElementById('status-text');
const fabOnline = document.getElementById('fab-online');
const incomingCallBanner = document.getElementById('incoming-call-banner');
const acceptCallBtn = document.getElementById('accept-call-btn');
const declineCallBtn = document.getElementById('decline-call-btn');
const callModal = document.getElementById('call-modal');
const modalAcceptBtn = document.getElementById('modal-accept-btn');
const modalDeclineBtn = document.getElementById('modal-decline-btn');
const callTimer = document.getElementById('call-timer');
const videoCall = document.getElementById('video-call');
const endCallBtn = document.getElementById('end-call-btn');
const pageLinks = document.querySelectorAll('[data-page]');
const pages = document.querySelectorAll('[id$="-page"]:not([id="admin-page"])');
const profilePicInput = document.getElementById('profile-pic');
const profilePicPreview = document.getElementById('profile-pic-preview');
const availabilityToggle = document.getElementById('availability-toggle');
const availabilityText = document.getElementById('availability-text');
// State
let isOnline = false;
let callTimerInterval;
let timeLeft = 15;
// Event Listeners
loginForm.addEventListener('submit', handleLogin);
mobileMenuBtn.addEventListener('click', toggleMobileSidebar);
logoutBtn.addEventListener('click', handleLogout);
mobileLogoutBtn.addEventListener('click', handleLogout);
statusToggle.addEventListener('change', toggleStatus);
fabOnline.addEventListener('click', toggleStatus);
acceptCallBtn.addEventListener('click', showCallModal);
declineCallBtn.addEventListener('click', declineCall);
modalAcceptBtn.addEventListener('click', acceptCall);
modalDeclineBtn.addEventListener('click', declineCall);
endCallBtn.addEventListener('click', endCall);
document.getElementById('close-interpreter-modal').addEventListener('click', () => {
document.getElementById('interpreter-modal').classList.add('hidden');
});
profilePicInput.addEventListener('change', updateProfilePic);
availabilityToggle.addEventListener('change', toggleAvailability);
// Page navigation
pageLinks.forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
const pageName = link.getAttribute('data-page');
showPage(pageName);
// Update active state
document.querySelector('.active-page').classList.remove('active-page');
link.classList.add('active-page');
// Close mobile sidebar if open
if (mobileSidebar.classList.contains('translate-x-0')) {
toggleMobileSidebar();
}
});
});
// Functions
function handleLogin(e) {
e.preventDefault();
loginPage.classList.add('hidden');
appContainer.classList.remove('hidden');
// For demo purposes, simulate a successful login
setTimeout(() => {
showPage('dashboard');
}, 500);
}
function handleLogout() {
appContainer.classList.add('hidden');
loginPage.classList.remove('hidden');
isOnline = false;
statusToggle.checked = false;
statusText.textContent = 'Offline';
fabOnline.classList.remove('accent-bg');
fabOnline.classList.add('primary-bg');
}
function toggleMobileSidebar() {
mobileSidebar.classList.toggle('-translate-x-full');
mobileSidebar.classList.toggle('translate-x-0');
}
function toggleStatus() {
isOnline = !isOnline;
statusToggle.checked = isOnline;
if (isOnline) {
statusText.textContent = 'Online';
fabOnline.classList.remove('primary-bg');
fabOnline.classList.add('accent-bg');
// Simulate incoming call after 3 seconds
setTimeout(() => {
incomingCallBanner.classList.remove('hidden');
}, 3000);
} else {
statusText.textContent = 'Offline';
fabOnline.classList.remove('accent-bg');
fabOnline.classList.add('primary-bg');
incomingCallBanner.classList.add('hidden');
}
}
function showCallModal() {
incomingCallBanner.classList.add('hidden');
callModal.classList.remove('hidden');
// Start countdown timer
timeLeft = 15;
callTimer.textContent = timeLeft;
callTimerInterval = setInterval(() => {
timeLeft--;
callTimer.textContent = timeLeft;
if (timeLeft <= 0) {
clearInterval(callTimerInterval);
declineCall();
}
}, 1000);
}
function acceptCall() {
clearInterval(callTimerInterval);
callModal.classList.add('hidden');
videoCall.classList.remove('hidden');
}
function declineCall() {
clearInterval(callTimerInterval);
callModal.classList.add('hidden');
// Show notification that call was declined
alert('Call declined. You have been marked as available for the next call.');
}
function endCall() {
videoCall.classList.add('hidden');
// Show call summary (for demo)
alert('Call ended. Duration: 12 minutes. Please complete your session notes.');
}
function showPage(pageName) {
pages.forEach(page => {
if (page.id === `${pageName}-page`) {
page.classList.remove('hidden');
page.classList.add('active-page');
} else {
page.classList.add('hidden');
page.classList.remove('active-page');
}
});
}
function updateProfilePic() {
const file = profilePicInput.files[0];
if (file) {
const reader = new FileReader();
reader.onload = (e) => {
profilePicPreview.src = e.target.result;
};
reader.readAsDataURL(file);
}
}
function toggleAvailability() {
const isAvailable = availabilityToggle.checked;
availabilityText.textContent = isAvailable ? 'Available' : 'Unavailable';
}
// Jitsi Elements
const jitsiContainer = document.getElementById('jitsi-container');
const jitsiIframe = document.getElementById('jitsi-iframe');
const startSessionBtn = document.getElementById('start-session-btn');
const joinDoctorBtn = document.getElementById('join-doctor-btn');
const joinPatientBtn = document.getElementById('join-patient-btn');
// Jitsi Functions
function startJitsiSession(roomName, config = {}) {
jitsiContainer.classList.remove('hidden');
const domain = '8x8.vc';
const options = {
roomName: roomName,
width: '100%',
height: '100%',
parentNode: jitsiContainer,
jwt: 'vpaas-magic-cookie-1ccca8c667d1427ab468f81fc71eda73/1e3ce2',
configOverwrite: {
disableSimulcast: false,
enableNoAudioDetection: true,
enableNoisyMicDetection: true,
startWithAudioMuted: true,
startWithVideoMuted: false,
...config.configOverwrite
},
interfaceConfigOverwrite: {
APP_NAME: 'ZSL Interpreter Connect',
SHOW_JITSI_WATERMARK: false,
SHOW_WATERMARK_FOR_GUESTS: false,
...config.interfaceConfigOverwrite
}
};
jitsiIframe.src = `https://${domain}/${roomName}?jwt=${options.jwt}`;
}
// Event Listeners for new buttons
startSessionBtn.addEventListener('click', () => {
const roomName = `ZSL-${Date.now()}`;
startJitsiSession(roomName, {
configOverwrite: {
startWithAudioMuted: true,
startWithVideoMuted: false
}
});
});
joinDoctorBtn.addEventListener('click', () => {
const roomName = prompt("Enter Doctor's Room ID:");
if (roomName) {
startJitsiSession(roomName, {
configOverwrite: {
startWithAudioMuted: true,
startWithVideoMuted: false
}
});
}
});
joinPatientBtn.addEventListener('click', () => {
const roomName = prompt("Enter Patient's Room ID:");
if (roomName) {
startJitsiSession(roomName, {
configOverwrite: {
startWithAudioMuted: true,
startWithVideoMuted: false
}
});
}
});
// Search Interpreter Elements
const searchInterpreterBtn = document.getElementById('search-interpreter-btn');
const interpreterModal = document.getElementById('interpreter-modal');
const interpreterList = document.getElementById('interpreter-list');
const connectInterpreterBtn = document.getElementById('connect-interpreter-btn');
const selectedInterpreterId = document.getElementById('selected-interpreter-id');
// Mock interpreter data (in real app, this would come from API)
const interpreters = [
{ id: 'int1', name: 'Obed Mambwe', distance: '0.5 km', rating: 4.8, languages: ['ZSL', 'English'] },
{ id: 'int2', name: 'Richard Mumba', distance: '1.2 km', rating: 4.9, languages: ['ZSL', 'Bemba'] },
{ id: 'int3', name: 'Ruth Mukuma', distance: '2.5 km', rating: 4.7, languages: ['ZSL', 'Nyanja'] }
];
// Event Listeners for new elements
searchInterpreterBtn.addEventListener('click', searchInterpreters);
connectInterpreterBtn.addEventListener('click', connectToInterpreter);
// Functions for interpreter search
function searchInterpreters() {
// In real app, this would use Geolocation API and fetch from server
navigator.geolocation.getCurrentPosition((position) => {
const { latitude, longitude } = position.coords;
console.log(`Searching interpreters near ${latitude}, ${longitude}`);
// Show loading state
interpreterList.innerHTML = '<div class="p-4 text-center">Searching nearby interpreters...</div>';
interpreterModal.classList.remove('hidden');
// Simulate API call delay
setTimeout(() => {
renderInterpreterList();
}, 1500);
}, (error) => {
alert('Please enable location services to find interpreters');
console.error('Geolocation error:', error);
});
}
function renderInterpreterList() {
interpreterList.innerHTML = interpreters.map(interpreter => `
<div class="interpreter-item p-4 border-b border-gray-200 hover:bg-gray-50 cursor-pointer" data-id="${interpreter.id}">
<div class="flex justify-between items-center">
<div>
<h4 class="font-medium">${interpreter.name}</h4>
<div class="flex items-center text-sm text-gray-500 mt-1">
<i class="fas fa-map-marker-alt mr-1"></i>
<span>${interpreter.distance} away</span>
</div>
</div>
<div class="text-right">
<div class="flex items-center justify-end">
<i class="fas fa-star text-yellow-400 mr-1"></i>
<span>${interpreter.rating}</span>
</div>
<div class="text-xs mt-1">${interpreter.languages.join(', ')}</div>
</div>
</div>
</div>
`).join('');
// Add click handlers to interpreter items
document.querySelectorAll('.interpreter-item').forEach(item => {
item.addEventListener('click', function() {
const id = this.getAttribute('data-id');
selectInterpreter(id);
});
});
}
function selectInterpreter(id) {
// Highlight selected interpreter
document.querySelectorAll('.interpreter-item').forEach(item => {
item.classList.remove('bg-blue-50', 'border-l-4', 'border-blue-500');
});
const selected = document.querySelector(`.interpreter-item[data-id="${id}"]`);
if (selected) {
selected.classList.add('bg-blue-50', 'border-l-4', 'border-blue-500');
}
// Enable connect button
selectedInterpreterId.value = id;
connectInterpreterBtn.disabled = false;
connectInterpreterBtn.classList.remove('bg-gray-400');
connectInterpreterBtn.classList.add('bg-green-600', 'hover:bg-green-700');
}
function connectToInterpreter() {
const interpreterId = selectedInterpreterId.value;
if (!interpreterId) return;
const interpreter = interpreters.find(i => i.id === interpreterId);
if (interpreter) {
interpreterModal.classList.add('hidden');
startJitsiSession(`ZSL-Interpreter-${interpreterId}-${Date.now()}`, {
configOverwrite: {
startWithAudioMuted: true,
startWithVideoMuted: false,
enableClosePage: true
}
});
}
}
// Admin Interpreter Form Elements
const addInterpreterBtn = document.getElementById('add-interpreter-btn');
const interpreterForm = document.getElementById('interpreter-form');
const cancelInterpreterBtn = document.getElementById('cancel-interpreter-btn');
const saveInterpreterBtn = document.getElementById('save-interpreter-btn');
const interpreterFirstname = document.getElementById('interpreter-firstname');
const interpreterLastname = document.getElementById('interpreter-lastname');
const interpreterEmail = document.getElementById('interpreter-email');
const interpreterPhone = document.getElementById('interpreter-phone');
const languageCheckboxes = document.querySelectorAll('#interpreter-form input[type="checkbox"]');
// Event Listeners for Admin
addInterpreterBtn.addEventListener('click', () => {
interpreterForm.classList.toggle('hidden');
});
cancelInterpreterBtn.addEventListener('click', () => {
interpreterForm.classList.add('hidden');
clearInterpreterForm();
});
saveInterpreterBtn.addEventListener('click', saveInterpreter);
// Functions for Admin
function clearInterpreterForm() {
interpreterFirstname.value = '';
interpreterLastname.value = '';
interpreterEmail.value = '';
interpreterPhone.value = '';
languageCheckboxes.forEach(checkbox => {
checkbox.checked = false;
});
}
function saveInterpreter() {
const firstName = interpreterFirstname.value.trim();
const lastName = interpreterLastname.value.trim();
const email = interpreterEmail.value.trim();
const phone = interpreterPhone.value.trim();
const languages = Array.from(languageCheckboxes)
.filter(checkbox => checkbox.checked)
.map(checkbox => checkbox.value);
if (!firstName || !lastName || !email || languages.length === 0) {
alert('Please fill in all required fields (Name, Email, and at least one language)');
return;
}
// In a real app, this would send to your backend API
console.log('Saving interpreter:', {
firstName,
lastName,
email,
phone,
languages
});
// For demo purposes, just show success and clear form
alert('Interpreter saved successfully!');
clearInterpreterForm();
interpreterForm.classList.add('hidden');
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
// Initialize any default values
statusToggle.checked = false;
availabilityToggle.checked = true;
});
</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=dataquantals/interpreter" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
});
</script>
</body>
</html> |