Spaces:
Running
Running
undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +1061 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: interpreter
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1061 @@
|
|
| 1 |
-
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
</html><!DOCTYPE html>
|
| 3 |
+
<html lang="en">
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>ZSL Interpreter Connect</title>
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
+
<style>
|
| 11 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 12 |
+
|
| 13 |
+
body {
|
| 14 |
+
font-family: 'Inter', sans-serif;
|
| 15 |
+
background-color: #f9fafb;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.primary-bg {
|
| 19 |
+
background-color: #023047;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.primary-text {
|
| 23 |
+
color: #023047;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.accent-bg {
|
| 27 |
+
background-color: #fb8500;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.accent-text {
|
| 31 |
+
color: #fb8500;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.sidebar {
|
| 35 |
+
transition: all 0.3s ease;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.call-modal {
|
| 39 |
+
animation: fadeIn 0.3s ease-in-out;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
@keyframes fadeIn {
|
| 43 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 44 |
+
to { opacity: 1; transform: translateY(0); }
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.video-placeholder {
|
| 48 |
+
background: linear-gradient(135deg, #023047 0%, #219ebc 100%);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
#jitsi-container {
|
| 52 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
#start-session-btn:hover, #join-doctor-btn:hover, #join-patient-btn:hover {
|
| 56 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.toggle-checkbox:checked {
|
| 60 |
+
right: 0;
|
| 61 |
+
border-color: #fb8500;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.toggle-checkbox:checked + .toggle-label {
|
| 65 |
+
background-color: #fb8500;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.fab {
|
| 69 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 70 |
+
transition: all 0.3s ease;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.fab:hover {
|
| 74 |
+
transform: translateY(-2px);
|
| 75 |
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.call-card:hover {
|
| 79 |
+
transform: translateY(-2px);
|
| 80 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.profile-pic-upload {
|
| 84 |
+
opacity: 0;
|
| 85 |
+
position: absolute;
|
| 86 |
+
z-index: -1;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.profile-pic-label {
|
| 90 |
+
cursor: pointer;
|
| 91 |
+
transition: all 0.3s ease;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.profile-pic-label:hover {
|
| 95 |
+
transform: scale(1.05);
|
| 96 |
+
}
|
| 97 |
+
</style>
|
| 98 |
+
</head>
|
| 99 |
+
<body class="min-h-screen">
|
| 100 |
+
<!-- Login Page (Default View) -->
|
| 101 |
+
<div id="login-page" class="flex flex-col items-center justify-center min-h-screen p-4">
|
| 102 |
+
<div class="w-full max-w-md p-8 bg-white rounded-xl shadow-md">
|
| 103 |
+
<div class="flex flex-col items-center mb-8">
|
| 104 |
+
<div class="w-20 h-20 rounded-full primary-bg flex items-center justify-center mb-4">
|
| 105 |
+
<i class="fas fa-hands-helping text-white text-3xl"></i>
|
| 106 |
+
</div>
|
| 107 |
+
<h1 class="text-2xl font-bold primary-text">ZSL Interpreter Connect</h1>
|
| 108 |
+
<p class="text-gray-500 text-sm mt-1">Empowering real-time sign language communication in healthcare</p>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
<form id="login-form" class="space-y-4">
|
| 112 |
+
<div>
|
| 113 |
+
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
| 114 |
+
<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">
|
| 115 |
+
</div>
|
| 116 |
+
|
| 117 |
+
<div>
|
| 118 |
+
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
|
| 119 |
+
<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">
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="flex items-center justify-between">
|
| 123 |
+
<div class="flex items-center">
|
| 124 |
+
<input type="checkbox" id="remember" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 125 |
+
<label for="remember" class="ml-2 block text-sm text-gray-700">Remember me</label>
|
| 126 |
+
</div>
|
| 127 |
+
<a href="#" class="text-sm text-[#023047] hover:underline">Forgot password?</a>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<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">
|
| 131 |
+
<i class="fas fa-sign-in-alt mr-2"></i> Login
|
| 132 |
+
</button>
|
| 133 |
+
</form>
|
| 134 |
+
</div>
|
| 135 |
+
|
| 136 |
+
<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>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<!-- App Container (Hidden by Default) -->
|
| 140 |
+
<div id="app-container" class="hidden">
|
| 141 |
+
<!-- Mobile Header -->
|
| 142 |
+
<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">
|
| 143 |
+
<button id="mobile-menu-btn" class="text-white focus:outline-none">
|
| 144 |
+
<i class="fas fa-bars text-xl"></i>
|
| 145 |
+
</button>
|
| 146 |
+
<h1 class="text-lg font-bold">Interpreter Connect</h1>
|
| 147 |
+
<div class="w-8 h-8 rounded-full bg-white flex items-center justify-center">
|
| 148 |
+
<i class="fas fa-user primary-text"></i>
|
| 149 |
+
</div>
|
| 150 |
+
</header>
|
| 151 |
+
|
| 152 |
+
<!-- Desktop Sidebar -->
|
| 153 |
+
<aside id="sidebar" class="hidden md:block fixed top-0 left-0 h-screen w-64 primary-bg text-white p-4 sidebar">
|
| 154 |
+
<div class="flex flex-col h-full">
|
| 155 |
+
<div class="flex items-center mb-8">
|
| 156 |
+
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center mr-3">
|
| 157 |
+
<i class="fas fa-hands-helping primary-text"></i>
|
| 158 |
+
</div>
|
| 159 |
+
<h1 class="text-lg font-bold">ZSL Interpreter Connect</h1>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<nav class="flex-1">
|
| 163 |
+
<ul class="space-y-2">
|
| 164 |
+
<li>
|
| 165 |
+
<a href="#" data-page="dashboard" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition active-page">
|
| 166 |
+
<i class="fas fa-tachometer-alt mr-3"></i> Dashboard
|
| 167 |
+
</a>
|
| 168 |
+
</li>
|
| 169 |
+
<li>
|
| 170 |
+
<a href="#" data-page="calls" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 171 |
+
<i class="fas fa-phone-alt mr-3"></i> Call History
|
| 172 |
+
</a>
|
| 173 |
+
</li>
|
| 174 |
+
<li>
|
| 175 |
+
<a href="#" data-page="profile" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 176 |
+
<i class="fas fa-user mr-3"></i> Profile
|
| 177 |
+
</a>
|
| 178 |
+
</li>
|
| 179 |
+
<li>
|
| 180 |
+
<a href="#" data-page="settings" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 181 |
+
<i class="fas fa-cog mr-3"></i> Settings
|
| 182 |
+
</a>
|
| 183 |
+
</li>
|
| 184 |
+
</ul>
|
| 185 |
+
</nav>
|
| 186 |
+
|
| 187 |
+
<div class="mt-auto pt-4 border-t border-[#022b3d]">
|
| 188 |
+
<button id="logout-btn" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition w-full">
|
| 189 |
+
<i class="fas fa-sign-out-alt mr-3"></i> Logout
|
| 190 |
+
</button>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</aside>
|
| 194 |
+
|
| 195 |
+
<!-- Mobile Sidebar -->
|
| 196 |
+
<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">
|
| 197 |
+
<div class="flex flex-col h-full">
|
| 198 |
+
<div class="flex items-center mb-8">
|
| 199 |
+
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center mr-3">
|
| 200 |
+
<i class="fas fa-hands-helping primary-text"></i>
|
| 201 |
+
</div>
|
| 202 |
+
<h1 class="text-lg font-bold">ZSL Interpreter Connect</h1>
|
| 203 |
+
</div>
|
| 204 |
+
|
| 205 |
+
<nav class="flex-1">
|
| 206 |
+
<ul class="space-y-2">
|
| 207 |
+
<li>
|
| 208 |
+
<a href="#" data-page="dashboard" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition active-page">
|
| 209 |
+
<i class="fas fa-tachometer-alt mr-3"></i> Dashboard
|
| 210 |
+
</a>
|
| 211 |
+
</li>
|
| 212 |
+
<li>
|
| 213 |
+
<a href="#" data-page="calls" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 214 |
+
<i class="fas fa-phone-alt mr-3"></i> Call History
|
| 215 |
+
</a>
|
| 216 |
+
</li>
|
| 217 |
+
<li>
|
| 218 |
+
<a href="#" data-page="profile" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 219 |
+
<i class="fas fa-user mr-3"></i> Profile
|
| 220 |
+
</a>
|
| 221 |
+
</li>
|
| 222 |
+
<li>
|
| 223 |
+
<a href="#" data-page="settings" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition">
|
| 224 |
+
<i class="fas fa-cog mr-3"></i> Settings
|
| 225 |
+
</a>
|
| 226 |
+
</li>
|
| 227 |
+
</ul>
|
| 228 |
+
</nav>
|
| 229 |
+
|
| 230 |
+
<div class="mt-auto pt-4 border-t border-[#022b3d]">
|
| 231 |
+
<button id="mobile-logout-btn" class="flex items-center p-3 rounded-lg hover:bg-[#022b3d] transition w-full">
|
| 232 |
+
<i class="fas fa-sign-out-alt mr-3"></i> Logout
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</aside>
|
| 237 |
+
|
| 238 |
+
<!-- Main Content -->
|
| 239 |
+
<main id="main-content" class="md:ml-64 pt-16 md:pt-0">
|
| 240 |
+
<!-- Dashboard Page -->
|
| 241 |
+
<div id="dashboard-page" class="p-4 md:p-6 active-page">
|
| 242 |
+
<div class="max-w-6xl mx-auto">
|
| 243 |
+
<div class="flex justify-between items-center mb-6">
|
| 244 |
+
<h2 class="text-2xl font-bold primary-text">Video Interpreting Portal</h2>
|
| 245 |
+
<div class="flex items-center">
|
| 246 |
+
<span class="mr-2 text-sm text-gray-600">Status:</span>
|
| 247 |
+
<div class="relative inline-block w-12 mr-2 align-middle select-none">
|
| 248 |
+
<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"/>
|
| 249 |
+
<label for="status-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 250 |
+
</div>
|
| 251 |
+
<span id="status-text" class="text-sm font-medium">Offline</span>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<div class="mb-8 bg-gradient-to-r from-[#023047] to-[#219ebc] p-6 rounded-xl shadow-lg text-white">
|
| 256 |
+
<h3 class="text-2xl font-bold mb-2">Hi, <span id="interpreter-name">John Mwansa</span> 👋</h3>
|
| 257 |
+
<p class="text-white text-opacity-90">Welcome to your interpreting session dashboard. Ready to connect with patients and healthcare providers.</p>
|
| 258 |
+
</div>
|
| 259 |
+
|
| 260 |
+
<!-- Jitsi Meet Container -->
|
| 261 |
+
<div id="jitsi-container" class="hidden mb-6 rounded-xl overflow-hidden shadow-xl">
|
| 262 |
+
<iframe id="jitsi-iframe" allow="camera; microphone; fullscreen; display-capture" class="w-full h-[500px] border-0"></iframe>
|
| 263 |
+
</div>
|
| 264 |
+
|
| 265 |
+
<!-- Action Buttons -->
|
| 266 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
| 267 |
+
<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">
|
| 268 |
+
<i class="fas fa-video text-2xl mb-2"></i>
|
| 269 |
+
<span class="font-bold text-lg">Start New Session</span>
|
| 270 |
+
<span class="text-sm font-light">Create new meeting room</span>
|
| 271 |
+
</button>
|
| 272 |
+
|
| 273 |
+
<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">
|
| 274 |
+
<i class="fas fa-user-md text-2xl mb-2"></i>
|
| 275 |
+
<span class="font-bold text-lg">Join Doctor</span>
|
| 276 |
+
<span class="text-sm font-light">Connect with healthcare provider</span>
|
| 277 |
+
</button>
|
| 278 |
+
|
| 279 |
+
<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">
|
| 280 |
+
<i class="fas fa-procedures text-2xl mb-2"></i>
|
| 281 |
+
<span class="font-bold text-lg">Join Patient</span>
|
| 282 |
+
<span class="text-sm font-light">Connect directly with patient</span>
|
| 283 |
+
</button>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<!-- Incoming Call Banner (Hidden by Default) -->
|
| 287 |
+
<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">
|
| 288 |
+
<div class="flex justify-between items-center">
|
| 289 |
+
<div>
|
| 290 |
+
<h3 class="font-bold text-lg">Incoming Interpreter Call</h3>
|
| 291 |
+
<div class="flex items-center mt-1">
|
| 292 |
+
<span class="bg-white text-[#fb8500] px-2 py-1 rounded text-xs font-bold mr-2">VRI</span>
|
| 293 |
+
<span class="text-sm">From: <strong>Nurse</strong> at Kitwe Central Hospital</span>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
<div class="flex space-x-2">
|
| 297 |
+
<button id="accept-call-btn" class="bg-white text-[#fb8500] px-4 py-2 rounded-lg font-bold flex items-center">
|
| 298 |
+
<i class="fas fa-phone-alt mr-2"></i> Accept
|
| 299 |
+
</button>
|
| 300 |
+
<button id="decline-call-btn" class="bg-[#023047] text-white px-4 py-2 rounded-lg font-bold flex items-center">
|
| 301 |
+
<i class="fas fa-times mr-2"></i> Decline
|
| 302 |
+
</button>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<!-- Stats Cards -->
|
| 308 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
| 309 |
+
<div class="bg-white p-4 rounded-xl shadow-sm">
|
| 310 |
+
<div class="flex items-center">
|
| 311 |
+
<div class="p-3 rounded-full bg-[#e1f0ff] mr-3">
|
| 312 |
+
<i class="fas fa-phone-alt primary-text"></i>
|
| 313 |
+
</div>
|
| 314 |
+
<div>
|
| 315 |
+
<p class="text-sm text-gray-500">Today's Calls</p>
|
| 316 |
+
<h3 class="text-xl font-bold">5</h3>
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
</div>
|
| 320 |
+
|
| 321 |
+
<div class="bg-white p-4 rounded-xl shadow-sm">
|
| 322 |
+
<div class="flex items-center">
|
| 323 |
+
<div class="p-3 rounded-full bg-[#fff4e5] mr-3">
|
| 324 |
+
<i class="fas fa-clock accent-text"></i>
|
| 325 |
+
</div>
|
| 326 |
+
<div>
|
| 327 |
+
<p class="text-sm text-gray-500">Total Duration</p>
|
| 328 |
+
<h3 class="text-xl font-bold">2h 15m</h3>
|
| 329 |
+
</div>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
|
| 333 |
+
<div class="bg-white p-4 rounded-xl shadow-sm">
|
| 334 |
+
<div class="flex items-center">
|
| 335 |
+
<div class="p-3 rounded-full bg-[#e5f9f0] mr-3">
|
| 336 |
+
<i class="fas fa-star text-green-500"></i>
|
| 337 |
+
</div>
|
| 338 |
+
<div>
|
| 339 |
+
<p class="text-sm text-gray-500">Average Rating</p>
|
| 340 |
+
<h3 class="text-xl font-bold">4.8</h3>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<!-- Call Queue -->
|
| 347 |
+
<div class="bg-white p-4 rounded-xl shadow-sm">
|
| 348 |
+
<div class="flex justify-between items-center mb-4">
|
| 349 |
+
<h3 class="font-semibold text-lg">Recent Call Queue</h3>
|
| 350 |
+
<button class="text-sm primary-text font-medium">View All</button>
|
| 351 |
+
</div>
|
| 352 |
+
|
| 353 |
+
<div class="space-y-3">
|
| 354 |
+
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
|
| 355 |
+
<div class="flex justify-between items-center">
|
| 356 |
+
<div>
|
| 357 |
+
<div class="flex items-center mb-1">
|
| 358 |
+
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRS</span>
|
| 359 |
+
<span class="text-sm font-medium">Dr. Banda</span>
|
| 360 |
+
</div>
|
| 361 |
+
<div class="flex items-center text-sm text-gray-500">
|
| 362 |
+
<i class="fas fa-map-marker-alt mr-1 text-xs"></i>
|
| 363 |
+
<span>Lusaka Central Clinic • 5km away</span>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
<div class="text-right">
|
| 367 |
+
<p class="text-sm text-gray-500">10:45 AM</p>
|
| 368 |
+
<span class="text-xs px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
|
| 369 |
+
</div>
|
| 370 |
+
</div>
|
| 371 |
+
</div>
|
| 372 |
+
|
| 373 |
+
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
|
| 374 |
+
<div class="flex justify-between items-center">
|
| 375 |
+
<div>
|
| 376 |
+
<div class="flex items-center mb-1">
|
| 377 |
+
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRI</span>
|
| 378 |
+
<span class="text-sm font-medium">Sarah K.</span>
|
| 379 |
+
</div>
|
| 380 |
+
<div class="flex items-center text-sm text-gray-500">
|
| 381 |
+
<i class="fas fa-video mr-1 text-xs"></i>
|
| 382 |
+
<span>Remote Video Session</span>
|
| 383 |
+
</div>
|
| 384 |
+
</div>
|
| 385 |
+
<div class="text-right">
|
| 386 |
+
<p class="text-sm text-gray-500">09:30 AM</p>
|
| 387 |
+
<span class="text-xs px-2 py-1 rounded-full bg-yellow-100 text-yellow-800">Pending</span>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
|
| 392 |
+
<div class="call-card p-3 border border-gray-100 rounded-lg hover:shadow-md transition cursor-pointer">
|
| 393 |
+
<div class="flex justify-between items-center">
|
| 394 |
+
<div>
|
| 395 |
+
<div class="flex items-center mb-1">
|
| 396 |
+
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold mr-2">VRS</span>
|
| 397 |
+
<span class="text-sm font-medium">Mr. Phiri</span>
|
| 398 |
+
</div>
|
| 399 |
+
<div class="flex items-center text-sm text-gray-500">
|
| 400 |
+
<i class="fas fa-map-marker-alt mr-1 text-xs"></i>
|
| 401 |
+
<span>Ndola Teaching Hospital • 12km away</span>
|
| 402 |
+
</div>
|
| 403 |
+
</div>
|
| 404 |
+
<div class="text-right">
|
| 405 |
+
<p class="text-sm text-gray-500">08:15 AM</p>
|
| 406 |
+
<span class="text-xs px-2 py-1 rounded-full bg-red-100 text-red-800">Missed</span>
|
| 407 |
+
</div>
|
| 408 |
+
</div>
|
| 409 |
+
</div>
|
| 410 |
+
</div>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
|
| 415 |
+
<!-- Call History Page -->
|
| 416 |
+
<div id="calls-page" class="p-4 md:p-6 hidden">
|
| 417 |
+
<div class="max-w-6xl mx-auto">
|
| 418 |
+
<div class="flex justify-between items-center mb-6">
|
| 419 |
+
<h2 class="text-2xl font-bold primary-text">Call History</h2>
|
| 420 |
+
<div class="flex items-center space-x-2">
|
| 421 |
+
<div class="relative">
|
| 422 |
+
<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]">
|
| 423 |
+
<option>All Calls</option>
|
| 424 |
+
<option>Completed</option>
|
| 425 |
+
<option>Missed</option>
|
| 426 |
+
</select>
|
| 427 |
+
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
|
| 428 |
+
<i class="fas fa-chevron-down text-xs"></i>
|
| 429 |
+
</div>
|
| 430 |
+
</div>
|
| 431 |
+
<button class="bg-white border border-gray-300 rounded-lg px-3 py-2 text-sm">
|
| 432 |
+
<i class="fas fa-filter"></i>
|
| 433 |
+
</button>
|
| 434 |
+
</div>
|
| 435 |
+
</div>
|
| 436 |
+
|
| 437 |
+
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
|
| 438 |
+
<div class="overflow-x-auto">
|
| 439 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 440 |
+
<thead class="bg-gray-50">
|
| 441 |
+
<tr>
|
| 442 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date & Time</th>
|
| 443 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Duration</th>
|
| 444 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 445 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Requester</th>
|
| 446 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
|
| 447 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Feedback</th>
|
| 448 |
+
</tr>
|
| 449 |
+
</thead>
|
| 450 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 451 |
+
<tr class="hover:bg-gray-50 cursor-pointer">
|
| 452 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 10:45 AM</td>
|
| 453 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">22 min</td>
|
| 454 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 455 |
+
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold">VRS</span>
|
| 456 |
+
</td>
|
| 457 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Dr. Banda</td>
|
| 458 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 459 |
+
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
|
| 460 |
+
</td>
|
| 461 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 462 |
+
<div class="flex items-center">
|
| 463 |
+
<i class="fas fa-star text-yellow-400 mr-1"></i>
|
| 464 |
+
<span>5.0</span>
|
| 465 |
+
</div>
|
| 466 |
+
</td>
|
| 467 |
+
</tr>
|
| 468 |
+
<tr class="hover:bg-gray-50 cursor-pointer">
|
| 469 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 09:30 AM</td>
|
| 470 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">18 min</td>
|
| 471 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 472 |
+
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold">VRI</span>
|
| 473 |
+
</td>
|
| 474 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah K.</td>
|
| 475 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 476 |
+
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
|
| 477 |
+
</td>
|
| 478 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 479 |
+
<div class="flex items-center">
|
| 480 |
+
<i class="fas fa-star text-yellow-400 mr-1"></i>
|
| 481 |
+
<span>4.5</span>
|
| 482 |
+
</div>
|
| 483 |
+
</td>
|
| 484 |
+
</tr>
|
| 485 |
+
<tr class="hover:bg-gray-50 cursor-pointer">
|
| 486 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Today, 08:15 AM</td>
|
| 487 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
|
| 488 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 489 |
+
<span class="bg-[#023047] text-white px-2 py-1 rounded text-xs font-bold">VRS</span>
|
| 490 |
+
</td>
|
| 491 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mr. Phiri</td>
|
| 492 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 493 |
+
<span class="px-2 py-1 rounded-full bg-red-100 text-red-800">Missed</span>
|
| 494 |
+
</td>
|
| 495 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
|
| 496 |
+
</tr>
|
| 497 |
+
<tr class="hover:bg-gray-50 cursor-pointer">
|
| 498 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Yesterday, 3:20 PM</td>
|
| 499 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15 min</td>
|
| 500 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 501 |
+
<span class="bg-[#fb8500] text-white px-2 py-1 rounded text-xs font-bold">VRI</span>
|
| 502 |
+
</td>
|
| 503 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Nurse Mwape</td>
|
| 504 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 505 |
+
<span class="px-2 py-1 rounded-full bg-green-100 text-green-800">Completed</span>
|
| 506 |
+
</td>
|
| 507 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 508 |
+
<div class="flex items-center">
|
| 509 |
+
<i class="fas fa-star text-yellow-400 mr-1"></i>
|
| 510 |
+
<span>4.0</span>
|
| 511 |
+
</div>
|
| 512 |
+
</td>
|
| 513 |
+
</tr>
|
| 514 |
+
</tbody>
|
| 515 |
+
</table>
|
| 516 |
+
</div>
|
| 517 |
+
|
| 518 |
+
<div class="bg-gray-50 px-6 py-3 flex items-center justify-between border-t border-gray-200">
|
| 519 |
+
<div class="flex-1 flex justify-between sm:hidden">
|
| 520 |
+
<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>
|
| 521 |
+
<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>
|
| 522 |
+
</div>
|
| 523 |
+
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
| 524 |
+
<div>
|
| 525 |
+
<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>
|
| 526 |
+
</div>
|
| 527 |
+
<div>
|
| 528 |
+
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
| 529 |
+
<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>
|
| 530 |
+
<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>
|
| 531 |
+
<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>
|
| 532 |
+
<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>
|
| 533 |
+
<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>
|
| 534 |
+
</nav>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
</div>
|
| 539 |
+
</div>
|
| 540 |
+
</div>
|
| 541 |
+
|
| 542 |
+
<!-- Profile Page -->
|
| 543 |
+
<div id="profile-page" class="p-4 md:p-6 hidden">
|
| 544 |
+
<div class="max-w-3xl mx-auto">
|
| 545 |
+
<div class="mb-6">
|
| 546 |
+
<h2 class="text-2xl font-bold primary-text">My Profile</h2>
|
| 547 |
+
<p class="text-gray-600">Update your personal information and preferences</p>
|
| 548 |
+
</div>
|
| 549 |
+
|
| 550 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 551 |
+
<form id="profile-form">
|
| 552 |
+
<div class="flex flex-col items-center mb-6">
|
| 553 |
+
<input type="file" id="profile-pic" accept="image/*" class="profile-pic-upload">
|
| 554 |
+
<label for="profile-pic" class="profile-pic-label">
|
| 555 |
+
<div class="w-24 h-24 rounded-full bg-gray-200 flex items-center justify-center overflow-hidden mb-3">
|
| 556 |
+
<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">
|
| 557 |
+
</div>
|
| 558 |
+
</label>
|
| 559 |
+
<p class="text-sm text-gray-500">Click to change photo</p>
|
| 560 |
+
</div>
|
| 561 |
+
|
| 562 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
| 563 |
+
<div>
|
| 564 |
+
<label for="first-name" class="block text-sm font-medium text-gray-700 mb-1">First Name</label>
|
| 565 |
+
<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>
|
| 566 |
+
</div>
|
| 567 |
+
<div>
|
| 568 |
+
<label for="last-name" class="block text-sm font-medium text-gray-700 mb-1">Last Name</label>
|
| 569 |
+
<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>
|
| 570 |
+
</div>
|
| 571 |
+
</div>
|
| 572 |
+
|
| 573 |
+
<div class="mb-6">
|
| 574 |
+
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
| 575 |
+
<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>
|
| 576 |
+
</div>
|
| 577 |
+
|
| 578 |
+
<div class="mb-6">
|
| 579 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Supported Languages</label>
|
| 580 |
+
<div class="space-y-2">
|
| 581 |
+
<div class="flex items-center">
|
| 582 |
+
<input type="checkbox" id="zsl" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 583 |
+
<label for="zsl" class="ml-2 block text-sm text-gray-700">Zambian Sign Language (ZSL)</label>
|
| 584 |
+
</div>
|
| 585 |
+
<div class="flex items-center">
|
| 586 |
+
<input type="checkbox" id="english" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 587 |
+
<label for="english" class="ml-2 block text-sm text-gray-700">English</label>
|
| 588 |
+
</div>
|
| 589 |
+
<div class="flex items-center">
|
| 590 |
+
<input type="checkbox" id="bemba" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 591 |
+
<label for="bemba" class="ml-2 block text-sm text-gray-700">Bemba</label>
|
| 592 |
+
</div>
|
| 593 |
+
<div class="flex items-center">
|
| 594 |
+
<input type="checkbox" id="nyanja" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 595 |
+
<label for="nyanja" class="ml-2 block text-sm text-gray-700">Nyanja</label>
|
| 596 |
+
</div>
|
| 597 |
+
<div class="flex items-center">
|
| 598 |
+
<input type="checkbox" id="lozi" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300 rounded">
|
| 599 |
+
<label for="lozi" class="ml-2 block text-sm text-gray-700">Lozi</label>
|
| 600 |
+
</div>
|
| 601 |
+
</div>
|
| 602 |
+
</div>
|
| 603 |
+
|
| 604 |
+
<div class="mb-6">
|
| 605 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Availability</label>
|
| 606 |
+
<div class="flex items-center">
|
| 607 |
+
<div class="relative inline-block w-12 mr-2 align-middle select-none">
|
| 608 |
+
<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"/>
|
| 609 |
+
<label for="availability-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 610 |
+
</div>
|
| 611 |
+
<span id="availability-text" class="text-sm font-medium">Available</span>
|
| 612 |
+
</div>
|
| 613 |
+
</div>
|
| 614 |
+
|
| 615 |
+
<div class="flex justify-end">
|
| 616 |
+
<button type="submit" class="primary-bg text-white py-2 px-6 rounded-lg hover:bg-[#022b3d] transition font-medium">Save Changes</button>
|
| 617 |
+
</div>
|
| 618 |
+
</form>
|
| 619 |
+
</div>
|
| 620 |
+
</div>
|
| 621 |
+
</div>
|
| 622 |
+
|
| 623 |
+
<!-- Settings Page -->
|
| 624 |
+
<div id="settings-page" class="p-4 md:p-6 hidden">
|
| 625 |
+
<div class="max-w-3xl mx-auto">
|
| 626 |
+
<div class="mb-6">
|
| 627 |
+
<h2 class="text-2xl font-bold primary-text">Settings</h2>
|
| 628 |
+
<p class="text-gray-600">Configure your app preferences</p>
|
| 629 |
+
</div>
|
| 630 |
+
|
| 631 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 632 |
+
<div class="mb-8">
|
| 633 |
+
<h3 class="text-lg font-semibold mb-4 primary-text">Notification Preferences</h3>
|
| 634 |
+
<div class="space-y-4">
|
| 635 |
+
<div class="flex items-center justify-between">
|
| 636 |
+
<div>
|
| 637 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Email Notifications</label>
|
| 638 |
+
<p class="text-xs text-gray-500">Receive email alerts for new calls</p>
|
| 639 |
+
</div>
|
| 640 |
+
<div class="relative inline-block w-12 align-middle select-none">
|
| 641 |
+
<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"/>
|
| 642 |
+
<label for="email-notifications" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 643 |
+
</div>
|
| 644 |
+
</div>
|
| 645 |
+
|
| 646 |
+
<div class="flex items-center justify-between">
|
| 647 |
+
<div>
|
| 648 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">In-App Notifications</label>
|
| 649 |
+
<p class="text-xs text-gray-500">Show popup notifications for incoming calls</p>
|
| 650 |
+
</div>
|
| 651 |
+
<div class="relative inline-block w-12 align-middle select-none">
|
| 652 |
+
<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"/>
|
| 653 |
+
<label for="app-notifications" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 654 |
+
</div>
|
| 655 |
+
</div>
|
| 656 |
+
|
| 657 |
+
<div class="flex items-center justify-between">
|
| 658 |
+
<div>
|
| 659 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Sound Alerts</label>
|
| 660 |
+
<p class="text-xs text-gray-500">Play sound for incoming calls</p>
|
| 661 |
+
</div>
|
| 662 |
+
<div class="relative inline-block w-12 align-middle select-none">
|
| 663 |
+
<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"/>
|
| 664 |
+
<label for="sound-alerts" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 665 |
+
</div>
|
| 666 |
+
</div>
|
| 667 |
+
</div>
|
| 668 |
+
</div>
|
| 669 |
+
|
| 670 |
+
<div class="mb-8">
|
| 671 |
+
<h3 class="text-lg font-semibold mb-4 primary-text">Video Settings</h3>
|
| 672 |
+
<div class="space-y-4">
|
| 673 |
+
<div>
|
| 674 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Video Quality</label>
|
| 675 |
+
<div class="flex space-x-4">
|
| 676 |
+
<div class="flex items-center">
|
| 677 |
+
<input id="low-quality" name="video-quality" type="radio" checked class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300">
|
| 678 |
+
<label for="low-quality" class="ml-2 block text-sm text-gray-700">Low (for slow networks)</label>
|
| 679 |
+
</div>
|
| 680 |
+
<div class="flex items-center">
|
| 681 |
+
<input id="hd-quality" name="video-quality" type="radio" class="h-4 w-4 text-[#023047] focus:ring-[#023047] border-gray-300">
|
| 682 |
+
<label for="hd-quality" class="ml-2 block text-sm text-gray-700">HD</label>
|
| 683 |
+
</div>
|
| 684 |
+
</div>
|
| 685 |
+
</div>
|
| 686 |
+
|
| 687 |
+
<div class="flex items-center justify-between">
|
| 688 |
+
<div>
|
| 689 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Auto-accept Calls</label>
|
| 690 |
+
<p class="text-xs text-gray-500">Automatically accept calls when available</p>
|
| 691 |
+
</div>
|
| 692 |
+
<div class="relative inline-block w-12 align-middle select-none">
|
| 693 |
+
<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"/>
|
| 694 |
+
<label for="auto-accept" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 695 |
+
</div>
|
| 696 |
+
</div>
|
| 697 |
+
</div>
|
| 698 |
+
</div>
|
| 699 |
+
|
| 700 |
+
<div class="mb-8">
|
| 701 |
+
<h3 class="text-lg font-semibold mb-4 primary-text">Privacy & Security</h3>
|
| 702 |
+
<div class="space-y-4">
|
| 703 |
+
<div class="flex items-center justify-between">
|
| 704 |
+
<div>
|
| 705 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Show My Location</label>
|
| 706 |
+
<p class="text-xs text-gray-500">Allow VRS calls to see your approximate location</p>
|
| 707 |
+
</div>
|
| 708 |
+
<div class="relative inline-block w-12 align-middle select-none">
|
| 709 |
+
<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"/>
|
| 710 |
+
<label for="show-location" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
| 711 |
+
</div>
|
| 712 |
+
</div>
|
| 713 |
+
|
| 714 |
+
<div class="flex items-center justify-between">
|
| 715 |
+
<div>
|
| 716 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Two-Factor Authentication</label>
|
| 717 |
+
<p class="text-xs text-gray-500">Add extra security to your account</p>
|
| 718 |
+
</div>
|
| 719 |
+
<button class="text-sm primary-text font-medium">Enable</button>
|
| 720 |
+
</div>
|
| 721 |
+
</div>
|
| 722 |
+
</div>
|
| 723 |
+
|
| 724 |
+
<div class="flex justify-between items-center pt-4 border-t border-gray-200">
|
| 725 |
+
<button class="text-sm text-gray-500 hover:underline">Need help? Contact Support</button>
|
| 726 |
+
<button class="primary-bg text-white py-2 px-6 rounded-lg hover:bg-[#022b3d] transition font-medium">Save Settings</button>
|
| 727 |
+
</div>
|
| 728 |
+
</div>
|
| 729 |
+
</div>
|
| 730 |
+
</div>
|
| 731 |
+
</main>
|
| 732 |
+
|
| 733 |
+
<!-- Call Modal (Hidden by Default) -->
|
| 734 |
+
<div id="call-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
|
| 735 |
+
<div class="bg-white rounded-xl w-full max-w-md mx-4 call-modal">
|
| 736 |
+
<div class="p-6">
|
| 737 |
+
<h3 class="text-xl font-bold mb-2">Incoming Call Request</h3>
|
| 738 |
+
<div class="space-y-3 mb-6">
|
| 739 |
+
<div class="flex items-center">
|
| 740 |
+
<i class="fas fa-user-tie mr-3 text-gray-500"></i>
|
| 741 |
+
<span>Requester: <strong>Nurse</strong> at Kitwe Central Hospital</span>
|
| 742 |
+
</div>
|
| 743 |
+
<div class="flex items-center">
|
| 744 |
+
<i class="fas fa-phone-alt mr-3 text-gray-500"></i>
|
| 745 |
+
<span>Call Type: <strong>VRI</strong> (Video Remote Interpreting)</span>
|
| 746 |
+
</div>
|
| 747 |
+
<div class="flex items-center">
|
| 748 |
+
<i class="fas fa-video mr-3 text-gray-500"></i>
|
| 749 |
+
<span>Mode: <strong>Video</strong></span>
|
| 750 |
+
</div>
|
| 751 |
+
<div class="flex items-center">
|
| 752 |
+
<i class="fas fa-clock mr-3 text-gray-500"></i>
|
| 753 |
+
<span>Time left: <strong id="call-timer">15</strong> seconds</span>
|
| 754 |
+
</div>
|
| 755 |
+
</div>
|
| 756 |
+
|
| 757 |
+
<div class="flex justify-center space-x-4">
|
| 758 |
+
<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">
|
| 759 |
+
<i class="fas fa-phone-alt mr-2"></i> Accept
|
| 760 |
+
</button>
|
| 761 |
+
<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">
|
| 762 |
+
<i class="fas fa-times mr-2"></i> Decline
|
| 763 |
+
</button>
|
| 764 |
+
</div>
|
| 765 |
+
</div>
|
| 766 |
+
</div>
|
| 767 |
+
</div>
|
| 768 |
+
|
| 769 |
+
<!-- Video Call Interface (Hidden by Default) -->
|
| 770 |
+
<div id="video-call" class="fixed inset-0 bg-black z-50 hidden flex flex-col">
|
| 771 |
+
<div class="flex-1 relative">
|
| 772 |
+
<!-- Remote Video -->
|
| 773 |
+
<div class="absolute inset-0 video-placeholder flex items-center justify-center">
|
| 774 |
+
<div class="text-center text-white">
|
| 775 |
+
<i class="fas fa-user-tie text-5xl mb-2"></i>
|
| 776 |
+
<p class="text-xl font-medium">Nurse at Kitwe Central</p>
|
| 777 |
+
<p class="text-sm opacity-75">Connecting...</p>
|
| 778 |
+
</div>
|
| 779 |
+
</div>
|
| 780 |
+
|
| 781 |
+
<!-- Local Video -->
|
| 782 |
+
<div class="absolute bottom-4 right-4 w-32 h-48 bg-gray-800 rounded-lg overflow-hidden">
|
| 783 |
+
<div class="w-full h-full flex items-center justify-center">
|
| 784 |
+
<i class="fas fa-user text-white text-2xl"></i>
|
| 785 |
+
</div>
|
| 786 |
+
</div>
|
| 787 |
+
|
| 788 |
+
<!-- Call Controls -->
|
| 789 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gray-900 bg-opacity-70 p-4">
|
| 790 |
+
<div class="flex justify-center space-x-6">
|
| 791 |
+
<button class="w-12 h-12 rounded-full bg-gray-700 text-white flex items-center justify-center hover:bg-gray-600 transition">
|
| 792 |
+
<i class="fas fa-microphone"></i>
|
| 793 |
+
</button>
|
| 794 |
+
<button class="w-12 h-12 rounded-full bg-gray-700 text-white flex items-center justify-center hover:bg-gray-600 transition">
|
| 795 |
+
<i class="fas fa-video"></i>
|
| 796 |
+
</button>
|
| 797 |
+
<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">
|
| 798 |
+
<i class="fas fa-phone-slash"></i>
|
| 799 |
+
</button>
|
| 800 |
+
</div>
|
| 801 |
+
</div>
|
| 802 |
+
</div>
|
| 803 |
+
</div>
|
| 804 |
+
|
| 805 |
+
<!-- Mobile FAB -->
|
| 806 |
+
<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">
|
| 807 |
+
<i class="fas fa-power-off text-xl"></i>
|
| 808 |
+
</button>
|
| 809 |
+
</div>
|
| 810 |
+
|
| 811 |
+
<script>
|
| 812 |
+
// DOM Elements
|
| 813 |
+
const loginPage = document.getElementById('login-page');
|
| 814 |
+
const appContainer = document.getElementById('app-container');
|
| 815 |
+
const loginForm = document.getElementById('login-form');
|
| 816 |
+
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
|
| 817 |
+
const mobileSidebar = document.getElementById('mobile-sidebar');
|
| 818 |
+
const logoutBtn = document.getElementById('logout-btn');
|
| 819 |
+
const mobileLogoutBtn = document.getElementById('mobile-logout-btn');
|
| 820 |
+
const statusToggle = document.getElementById('status-toggle');
|
| 821 |
+
const statusText = document.getElementById('status-text');
|
| 822 |
+
const fabOnline = document.getElementById('fab-online');
|
| 823 |
+
const incomingCallBanner = document.getElementById('incoming-call-banner');
|
| 824 |
+
const acceptCallBtn = document.getElementById('accept-call-btn');
|
| 825 |
+
const declineCallBtn = document.getElementById('decline-call-btn');
|
| 826 |
+
const callModal = document.getElementById('call-modal');
|
| 827 |
+
const modalAcceptBtn = document.getElementById('modal-accept-btn');
|
| 828 |
+
const modalDeclineBtn = document.getElementById('modal-decline-btn');
|
| 829 |
+
const callTimer = document.getElementById('call-timer');
|
| 830 |
+
const videoCall = document.getElementById('video-call');
|
| 831 |
+
const endCallBtn = document.getElementById('end-call-btn');
|
| 832 |
+
const pageLinks = document.querySelectorAll('[data-page]');
|
| 833 |
+
const pages = document.querySelectorAll('[id$="-page"]');
|
| 834 |
+
const profilePicInput = document.getElementById('profile-pic');
|
| 835 |
+
const profilePicPreview = document.getElementById('profile-pic-preview');
|
| 836 |
+
const availabilityToggle = document.getElementById('availability-toggle');
|
| 837 |
+
const availabilityText = document.getElementById('availability-text');
|
| 838 |
+
|
| 839 |
+
// State
|
| 840 |
+
let isOnline = false;
|
| 841 |
+
let callTimerInterval;
|
| 842 |
+
let timeLeft = 15;
|
| 843 |
+
|
| 844 |
+
// Event Listeners
|
| 845 |
+
loginForm.addEventListener('submit', handleLogin);
|
| 846 |
+
mobileMenuBtn.addEventListener('click', toggleMobileSidebar);
|
| 847 |
+
logoutBtn.addEventListener('click', handleLogout);
|
| 848 |
+
mobileLogoutBtn.addEventListener('click', handleLogout);
|
| 849 |
+
statusToggle.addEventListener('change', toggleStatus);
|
| 850 |
+
fabOnline.addEventListener('click', toggleStatus);
|
| 851 |
+
acceptCallBtn.addEventListener('click', showCallModal);
|
| 852 |
+
declineCallBtn.addEventListener('click', declineCall);
|
| 853 |
+
modalAcceptBtn.addEventListener('click', acceptCall);
|
| 854 |
+
modalDeclineBtn.addEventListener('click', declineCall);
|
| 855 |
+
endCallBtn.addEventListener('click', endCall);
|
| 856 |
+
profilePicInput.addEventListener('change', updateProfilePic);
|
| 857 |
+
availabilityToggle.addEventListener('change', toggleAvailability);
|
| 858 |
+
|
| 859 |
+
// Page navigation
|
| 860 |
+
pageLinks.forEach(link => {
|
| 861 |
+
link.addEventListener('click', (e) => {
|
| 862 |
+
e.preventDefault();
|
| 863 |
+
const pageName = link.getAttribute('data-page');
|
| 864 |
+
showPage(pageName);
|
| 865 |
+
|
| 866 |
+
// Update active state
|
| 867 |
+
document.querySelector('.active-page').classList.remove('active-page');
|
| 868 |
+
link.classList.add('active-page');
|
| 869 |
+
|
| 870 |
+
// Close mobile sidebar if open
|
| 871 |
+
if (mobileSidebar.classList.contains('translate-x-0')) {
|
| 872 |
+
toggleMobileSidebar();
|
| 873 |
+
}
|
| 874 |
+
});
|
| 875 |
+
});
|
| 876 |
+
|
| 877 |
+
// Functions
|
| 878 |
+
function handleLogin(e) {
|
| 879 |
+
e.preventDefault();
|
| 880 |
+
loginPage.classList.add('hidden');
|
| 881 |
+
appContainer.classList.remove('hidden');
|
| 882 |
+
|
| 883 |
+
// For demo purposes, simulate a successful login
|
| 884 |
+
setTimeout(() => {
|
| 885 |
+
showPage('dashboard');
|
| 886 |
+
}, 500);
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
function handleLogout() {
|
| 890 |
+
appContainer.classList.add('hidden');
|
| 891 |
+
loginPage.classList.remove('hidden');
|
| 892 |
+
isOnline = false;
|
| 893 |
+
statusToggle.checked = false;
|
| 894 |
+
statusText.textContent = 'Offline';
|
| 895 |
+
fabOnline.classList.remove('accent-bg');
|
| 896 |
+
fabOnline.classList.add('primary-bg');
|
| 897 |
+
}
|
| 898 |
+
|
| 899 |
+
function toggleMobileSidebar() {
|
| 900 |
+
mobileSidebar.classList.toggle('-translate-x-full');
|
| 901 |
+
mobileSidebar.classList.toggle('translate-x-0');
|
| 902 |
+
}
|
| 903 |
+
|
| 904 |
+
function toggleStatus() {
|
| 905 |
+
isOnline = !isOnline;
|
| 906 |
+
statusToggle.checked = isOnline;
|
| 907 |
+
|
| 908 |
+
if (isOnline) {
|
| 909 |
+
statusText.textContent = 'Online';
|
| 910 |
+
fabOnline.classList.remove('primary-bg');
|
| 911 |
+
fabOnline.classList.add('accent-bg');
|
| 912 |
+
|
| 913 |
+
// Simulate incoming call after 3 seconds
|
| 914 |
+
setTimeout(() => {
|
| 915 |
+
incomingCallBanner.classList.remove('hidden');
|
| 916 |
+
}, 3000);
|
| 917 |
+
} else {
|
| 918 |
+
statusText.textContent = 'Offline';
|
| 919 |
+
fabOnline.classList.remove('accent-bg');
|
| 920 |
+
fabOnline.classList.add('primary-bg');
|
| 921 |
+
incomingCallBanner.classList.add('hidden');
|
| 922 |
+
}
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
function showCallModal() {
|
| 926 |
+
incomingCallBanner.classList.add('hidden');
|
| 927 |
+
callModal.classList.remove('hidden');
|
| 928 |
+
|
| 929 |
+
// Start countdown timer
|
| 930 |
+
timeLeft = 15;
|
| 931 |
+
callTimer.textContent = timeLeft;
|
| 932 |
+
|
| 933 |
+
callTimerInterval = setInterval(() => {
|
| 934 |
+
timeLeft--;
|
| 935 |
+
callTimer.textContent = timeLeft;
|
| 936 |
+
|
| 937 |
+
if (timeLeft <= 0) {
|
| 938 |
+
clearInterval(callTimerInterval);
|
| 939 |
+
declineCall();
|
| 940 |
+
}
|
| 941 |
+
}, 1000);
|
| 942 |
+
}
|
| 943 |
+
|
| 944 |
+
function acceptCall() {
|
| 945 |
+
clearInterval(callTimerInterval);
|
| 946 |
+
callModal.classList.add('hidden');
|
| 947 |
+
videoCall.classList.remove('hidden');
|
| 948 |
+
}
|
| 949 |
+
|
| 950 |
+
function declineCall() {
|
| 951 |
+
clearInterval(callTimerInterval);
|
| 952 |
+
callModal.classList.add('hidden');
|
| 953 |
+
|
| 954 |
+
// Show notification that call was declined
|
| 955 |
+
alert('Call declined. You have been marked as available for the next call.');
|
| 956 |
+
}
|
| 957 |
+
|
| 958 |
+
function endCall() {
|
| 959 |
+
videoCall.classList.add('hidden');
|
| 960 |
+
|
| 961 |
+
// Show call summary (for demo)
|
| 962 |
+
alert('Call ended. Duration: 12 minutes. Please complete your session notes.');
|
| 963 |
+
}
|
| 964 |
+
|
| 965 |
+
function showPage(pageName) {
|
| 966 |
+
pages.forEach(page => {
|
| 967 |
+
if (page.id === `${pageName}-page`) {
|
| 968 |
+
page.classList.remove('hidden');
|
| 969 |
+
page.classList.add('active-page');
|
| 970 |
+
} else {
|
| 971 |
+
page.classList.add('hidden');
|
| 972 |
+
page.classList.remove('active-page');
|
| 973 |
+
}
|
| 974 |
+
});
|
| 975 |
+
}
|
| 976 |
+
|
| 977 |
+
function updateProfilePic() {
|
| 978 |
+
const file = profilePicInput.files[0];
|
| 979 |
+
if (file) {
|
| 980 |
+
const reader = new FileReader();
|
| 981 |
+
reader.onload = (e) => {
|
| 982 |
+
profilePicPreview.src = e.target.result;
|
| 983 |
+
};
|
| 984 |
+
reader.readAsDataURL(file);
|
| 985 |
+
}
|
| 986 |
+
}
|
| 987 |
+
|
| 988 |
+
function toggleAvailability() {
|
| 989 |
+
const isAvailable = availabilityToggle.checked;
|
| 990 |
+
availabilityText.textContent = isAvailable ? 'Available' : 'Unavailable';
|
| 991 |
+
}
|
| 992 |
+
|
| 993 |
+
// Jitsi Elements
|
| 994 |
+
const jitsiContainer = document.getElementById('jitsi-container');
|
| 995 |
+
const jitsiIframe = document.getElementById('jitsi-iframe');
|
| 996 |
+
const startSessionBtn = document.getElementById('start-session-btn');
|
| 997 |
+
const joinDoctorBtn = document.getElementById('join-doctor-btn');
|
| 998 |
+
const joinPatientBtn = document.getElementById('join-patient-btn');
|
| 999 |
+
|
| 1000 |
+
// Jitsi Functions
|
| 1001 |
+
function startJitsiSession(roomName, config = {}) {
|
| 1002 |
+
jitsiContainer.classList.remove('hidden');
|
| 1003 |
+
const domain = 'meet.jit.si';
|
| 1004 |
+
const options = {
|
| 1005 |
+
roomName: roomName,
|
| 1006 |
+
width: '100%',
|
| 1007 |
+
height: '100%',
|
| 1008 |
+
parentNode: jitsiContainer,
|
| 1009 |
+
...config
|
| 1010 |
+
};
|
| 1011 |
+
jitsiIframe.src = `https://${domain}/${roomName}`;
|
| 1012 |
+
}
|
| 1013 |
+
|
| 1014 |
+
// Event Listeners for new buttons
|
| 1015 |
+
startSessionBtn.addEventListener('click', () => {
|
| 1016 |
+
const roomName = `ZSL-${Date.now()}`;
|
| 1017 |
+
startJitsiSession(roomName, {
|
| 1018 |
+
configOverwrite: {
|
| 1019 |
+
startWithAudioMuted: true,
|
| 1020 |
+
startWithVideoMuted: false
|
| 1021 |
+
},
|
| 1022 |
+
interfaceConfigOverwrite: {
|
| 1023 |
+
SHOW_JITSI_WATERMARK: false,
|
| 1024 |
+
SHOW_WATERMARK_FOR_GUESTS: false
|
| 1025 |
+
}
|
| 1026 |
+
});
|
| 1027 |
+
});
|
| 1028 |
+
|
| 1029 |
+
joinDoctorBtn.addEventListener('click', () => {
|
| 1030 |
+
const roomName = prompt("Enter Doctor's Room ID:");
|
| 1031 |
+
if (roomName) {
|
| 1032 |
+
startJitsiSession(roomName, {
|
| 1033 |
+
configOverwrite: {
|
| 1034 |
+
startWithAudioMuted: true,
|
| 1035 |
+
startWithVideoMuted: false
|
| 1036 |
+
}
|
| 1037 |
+
});
|
| 1038 |
+
}
|
| 1039 |
+
});
|
| 1040 |
+
|
| 1041 |
+
joinPatientBtn.addEventListener('click', () => {
|
| 1042 |
+
const roomName = prompt("Enter Patient's Room ID:");
|
| 1043 |
+
if (roomName) {
|
| 1044 |
+
startJitsiSession(roomName, {
|
| 1045 |
+
configOverwrite: {
|
| 1046 |
+
startWithAudioMuted: true,
|
| 1047 |
+
startWithVideoMuted: false
|
| 1048 |
+
}
|
| 1049 |
+
});
|
| 1050 |
+
}
|
| 1051 |
+
});
|
| 1052 |
+
|
| 1053 |
+
// Initialize
|
| 1054 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 1055 |
+
// Initialize any default values
|
| 1056 |
+
statusToggle.checked = false;
|
| 1057 |
+
availabilityToggle.checked = true;
|
| 1058 |
+
});
|
| 1059 |
+
</script>
|
| 1060 |
+
<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>
|
| 1061 |
+
</html>
|