Socket Update and Client Login UI
This commit is contained in:
parent
47f8d96a02
commit
6358564131
|
|
@ -0,0 +1,9 @@
|
|||
version: 2
|
||||
authtoken: 2gibp9BBceUJDZtNScqH5ivAUTA_2EVNSsmY6HkNYuY6aw7a4
|
||||
tunnels:
|
||||
myapp:
|
||||
proto: http
|
||||
addr: 3000
|
||||
hostname: wired-terminally-muskrat.ngrok-free.app
|
||||
# No bind_tls here!
|
||||
# Optionally, you can specify 'scheme: https'
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -52,7 +52,13 @@ async function va_projects_log_list_function(req, res) {
|
|||
|
||||
projectList = [project];
|
||||
} else {
|
||||
projectList = await ProjectModel.find({ vaAssigned: vaId });
|
||||
|
||||
const all = await ProjectModel.find().lean();
|
||||
console.log(all.map(p => p.vaAssigned));
|
||||
|
||||
console.log("VA ID:", vaId.toString());
|
||||
|
||||
projectList = await ProjectModel.find({ vaAssigned: vaUser._id });
|
||||
}
|
||||
|
||||
if (!projectList.length) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ import fs from "node:fs"
|
|||
|
||||
import apiRoutes from './routes/index.js'
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const app = express();
|
||||
|
|
@ -55,13 +57,19 @@ app.get('/health', (req, res) => {
|
|||
res.status(201).send({ status: "Server is healthy" });
|
||||
})
|
||||
|
||||
app.get("/live", (req, res) => {
|
||||
res.render("va_live_tracker")
|
||||
app.get("/client/login", (req, res) => {
|
||||
res.render("client_login")
|
||||
})
|
||||
|
||||
app.get("/live/:projectId", (req, res) => {
|
||||
const { projectId } = req.params;
|
||||
res.render("va_live_tracker", { title: "VA Live Tracker", projectId })
|
||||
})
|
||||
|
||||
// Handling Socket
|
||||
import jwt from "jsonwebtoken";
|
||||
import { VAModel, ProjectModel, ClientModel } from './models/vaModel.js';
|
||||
import { ObjectId } from 'mongodb/lib/bson.js';
|
||||
|
||||
|
||||
const vaSocketRespectToClient = new Map();
|
||||
|
|
@ -70,6 +78,7 @@ io.use(async (socket, next) => {
|
|||
try {
|
||||
const token = socket.handshake.auth?.token;
|
||||
const projectId = socket.handshake.auth?.projectId;
|
||||
const userType = socket.handshake.auth?.userType;
|
||||
|
||||
console.log("🔐 Received token:", token);
|
||||
|
||||
|
|
@ -84,32 +93,59 @@ io.use(async (socket, next) => {
|
|||
}
|
||||
|
||||
/* ---------------------- 1️⃣ Check if VA ---------------------- */
|
||||
const vaUser = await VAModel.findOne({ "userDetails.email": decoded.email });
|
||||
const clientData = await ClientModel.findOne({ "projectIds": projectId });
|
||||
const vaProjClientId = clientData._id;
|
||||
let vaUser = null;
|
||||
let clientData = null;
|
||||
|
||||
if (userType === "va") {
|
||||
vaUser = await VAModel.findOne({ "userDetails.email": decoded.email });
|
||||
clientData = await ProjectModel.findById(projectId).populate("clientId");
|
||||
} else if (userType === "client") {
|
||||
clientData = await ProjectModel.findById(projectId).populate("clientId");
|
||||
}
|
||||
|
||||
if (clientData == null) return next(new Error("Invalid Project ID"));
|
||||
const vaProjClientId = clientData.clientId._id;
|
||||
|
||||
if (vaUser && vaUser.accessToken === token) {
|
||||
socket.data.role = "va";
|
||||
socket.data.vaId = vaUser._id.toString();
|
||||
socket.data.vaEmail = decoded.email;
|
||||
|
||||
vaSocketRespectToClient.set(vaProjClientId, socket.id)
|
||||
|
||||
const a = vaProjClientId.toString();
|
||||
const b = clientData.clientId._id.toString();
|
||||
const c = JSON.stringify(clientData);
|
||||
|
||||
console.log(a, b, c, "vaProjClientId vs clientData.clientId");
|
||||
|
||||
vaSocketRespectToClient.set(vaProjClientId.toString(), socket.id)
|
||||
|
||||
console.log("✅ Authenticated VA:", vaUser.userDetails.email);
|
||||
return next();
|
||||
}
|
||||
|
||||
/* ---------------------- 2️⃣ Check if Client ---------------------- */
|
||||
const clientUser = await ClientModel.findOne({ "userDetails.email": decoded.email });
|
||||
// const clientUser = await ClientModel.findOne({ "userDetails.email": decoded.email });
|
||||
|
||||
// if (clientUser) {
|
||||
// socket.data.role = "client";
|
||||
// socket.data.clientId = clientUser._id.toString();
|
||||
|
||||
// // Get all VA IDs assigned to this client
|
||||
// socket.data.allowedVAs = clientUser.vaIds.map((va) => va.toString());
|
||||
|
||||
// console.log("✅ Authenticated Client:", clientUser.userDetails.email);
|
||||
// return next();
|
||||
// }
|
||||
const clientUser = clientData.clientId;
|
||||
|
||||
if (clientUser) {
|
||||
socket.data.role = "client";
|
||||
socket.data.clientId = clientUser._id.toString();
|
||||
|
||||
// Get all VA IDs assigned to this client
|
||||
socket.data.allowedVAs = clientUser.vaIds.map((va) => va.toString());
|
||||
socket.data.allowedVAs = clientData.vaAssigned.map((va) => va.toString());
|
||||
|
||||
console.log("✅ Authenticated Client:", clientUser.userDetails.email);
|
||||
// console.log("✅ Authenticated Client:", clientUser.userDetails.email);
|
||||
return next();
|
||||
}
|
||||
|
||||
|
|
@ -189,8 +225,10 @@ io.on("connection", (socket) => {
|
|||
socket.on("selectApp", ({ appTitle, clientId }) => {
|
||||
console.log(`VA selected app: ${appTitle}`);
|
||||
|
||||
const sssrrrr = vaSocketRespectToClient.get(clientId);
|
||||
console.log(vaSocketRespectToClient.get(clientId), sssrrrr, "vaSocketRespectToClient[clientId]")
|
||||
// You can forward this info to the respective Electron client
|
||||
socket.to(vaSocketRespectToClient[clientId]).emit("appToCapture", { appTitle });
|
||||
socket.to(vaSocketRespectToClient.get(clientId)).emit("appToCapture", { appTitle });
|
||||
});
|
||||
|
||||
socket.on("getVisibleApps", async ({ token, apps }) => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,253 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="light">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>DocVA | Login</title>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--color-bg-light: #ffffff;
|
||||
--color-bg-dark: #121212;
|
||||
--color-card-light: #ffffff;
|
||||
--color-card-dark: #1e1e1e;
|
||||
--color-text-light: #1a1a1a;
|
||||
--color-text-dark: #f5f5f5;
|
||||
--color-muted-light: #777;
|
||||
--color-muted-dark: #aaa;
|
||||
--color-primary: #0d0b57;
|
||||
--color-secondary: #2b8efc;
|
||||
--color-input-light: #f5f5f5;
|
||||
--color-input-dark: #2a2a2a;
|
||||
--radius: 14px;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
--color-bg: var(--color-bg-dark);
|
||||
--color-card: var(--color-card-dark);
|
||||
--color-text: var(--color-text-dark);
|
||||
--color-muted: var(--color-muted-dark);
|
||||
--color-input: var(--color-input-dark);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--color-bg: var(--color-bg-light);
|
||||
--color-card: var(--color-card-light);
|
||||
--color-text: var(--color-text-light);
|
||||
--color-muted: var(--color-muted-light);
|
||||
--color-input: var(--color-input-light);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Inter", sans-serif;
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 170px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
margin: 10px 0 2px 0;
|
||||
font-size: 2.3em;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.logo p {
|
||||
color: var(--color-muted);
|
||||
font-size: 0.9em;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
background-color: var(--color-card);
|
||||
border-radius: var(--radius);
|
||||
padding: 18px 40px 35px 40px;
|
||||
/* width: 30%; */
|
||||
/* max-width: 410px; */
|
||||
width: 320px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
text-align: center;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.login-card h2 {
|
||||
margin-bottom: 25px;
|
||||
color: var(--color-muted);
|
||||
font-weight: 500;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
input {
|
||||
width: calc(100% - 28px);
|
||||
padding: 12px 14px;
|
||||
margin-bottom: 18px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background-color: var(--color-input);
|
||||
color: var(--color-text);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 2px solid var(--color-secondary);
|
||||
}
|
||||
|
||||
.forgot {
|
||||
display: block;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
color: var(--color-muted);
|
||||
text-decoration: none;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.forgot:hover {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--color-primary);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #0a0848;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: transparent;
|
||||
border: 1.5px solid #ccc;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
border-color: var(--color-secondary);
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
.divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
color: var(--color-muted);
|
||||
margin: 18px 0;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.divider:not(:empty)::before {
|
||||
margin-right: 0.75em;
|
||||
}
|
||||
|
||||
.divider:not(:empty)::after {
|
||||
margin-left: 0.75em;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
color: var(--color-muted);
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.theme-toggle:hover {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.login-card {
|
||||
width: 280px;
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="logo">
|
||||
<img src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
|
||||
<!-- <h1>DocVA</h1>
|
||||
<p>VIRTUAL ASSISTANTS FOR DOCTORS</p> -->
|
||||
</div>
|
||||
|
||||
<div class="login-card">
|
||||
<h2>Log in to your account to continue</h2>
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<input type="email" name="email" placeholder="Enter your email address *" required />
|
||||
<input type="password" name="password" placeholder="Enter your password *" required />
|
||||
<a href="/forgot" class="forgot">Forgot password?</a>
|
||||
|
||||
<button type="submit" class="btn btn-primary">🔒 Log in using password</button>
|
||||
|
||||
<div class="divider">OR</div>
|
||||
|
||||
<button type="button" class="btn btn-secondary"># Log in with Email Code</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const root = document.documentElement;
|
||||
|
||||
function setTheme(theme) {
|
||||
root.setAttribute("data-theme", theme);
|
||||
}
|
||||
|
||||
function getSystemTheme() {
|
||||
return window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? "dark"
|
||||
: "light";
|
||||
}
|
||||
|
||||
setTheme(getSystemTheme());
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -2,140 +2,142 @@
|
|||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Live Screen Feed</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
<meta charset="UTF-8" />
|
||||
<title>Live Screen Feed</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
background: #111;
|
||||
color: #fff;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
background: #111;
|
||||
color: #fff;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 280px;
|
||||
background: #1b1b1b;
|
||||
border-right: 1px solid #333;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
.sidebar {
|
||||
width: 280px;
|
||||
background: #1b1b1b;
|
||||
border-right: 1px solid #333;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.app {
|
||||
background: #222;
|
||||
border: 1px solid #333;
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s ease;
|
||||
word-break: break-word;
|
||||
}
|
||||
.app {
|
||||
background: #222;
|
||||
border: 1px solid #333;
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s ease;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.app:hover {
|
||||
background: #333;
|
||||
}
|
||||
.app:hover {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.app.active {
|
||||
background: #6C63FF;
|
||||
color: white;
|
||||
}
|
||||
.app.active {
|
||||
background: #6C63FF;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 90%;
|
||||
max-width: 900px;
|
||||
border: 2px solid #555;
|
||||
border-radius: 10px;
|
||||
object-fit: contain;
|
||||
}
|
||||
img {
|
||||
width: 90%;
|
||||
max-width: 900px;
|
||||
border: 2px solid #555;
|
||||
border-radius: 10px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.no-image {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
.no-image {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<h3>Visible Apps</h3>
|
||||
<div id="appsList"></div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<h3>Visible Apps</h3>
|
||||
<div id="appsList"></div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h2 id="selectedAppTitle">Select an app to view</h2>
|
||||
<img id="liveImage" src="" alt="Waiting for image..." class="no-image" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<h2 id="selectedAppTitle">Select an app to view</h2>
|
||||
<img id="liveImage" src="" alt="Waiting for image..." class="no-image" />
|
||||
</div>
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script>
|
||||
const socket = io({
|
||||
auth: {
|
||||
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MGIzMjhkMDkxMDFmNzRjZjUyNGMwNyIsImVtYWlsIjoiYmhhZ3dhbi5yQGhpY2dsb2JhbHNvbHV0aW9ucy5jb20iLCJuYW1lIjoiUm9oaXQiLCJpYXQiOjE3NjI4NTgxOTMsImV4cCI6MTc2Mjk0NDU5M30.UlHy3RU9W5LOid7smG7WzyNT7dnqhQT4qqzRrN1axmU"
|
||||
},
|
||||
});
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script>
|
||||
const clientId = "691311fece83c986eb8a4e89";
|
||||
const socket = io({
|
||||
auth: {
|
||||
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTQ2NTFkODM2NDZhOTAwN2EzNDI4MCIsImVtYWlsIjoiYmhhZ3dhbi5yQGhpY2dsb2JhbHNvbHV0aW9ucy5jb20iLCJuYW1lIjoiYmhhZ3dhbiIsImlhdCI6MTc2Mjk0ODk3NSwiZXhwIjoxNzYzMDM1Mzc1fQ.WvmTvfOf8DvbqKsbvfyzda1ClP8qfllKFeJINtU6mnE",
|
||||
userType: "client",
|
||||
projectId: "<%= projectId %>"
|
||||
},
|
||||
});
|
||||
|
||||
const clientId = "691311fece83c986eb8a4e89";
|
||||
socket.emit("register", { role: "client", id: clientId });
|
||||
socket.emit("register", { role: "client", id: clientId, projectId: "<%= projectId %>" });
|
||||
|
||||
const appsList = document.getElementById("appsList");
|
||||
const liveImage = document.getElementById("liveImage");
|
||||
const selectedAppTitle = document.getElementById("selectedAppTitle");
|
||||
let currentApp = null;
|
||||
const appsList = document.getElementById("appsList");
|
||||
const liveImage = document.getElementById("liveImage");
|
||||
const selectedAppTitle = document.getElementById("selectedAppTitle");
|
||||
let currentApp = null;
|
||||
|
||||
// 🟢 Receive visible apps from client
|
||||
socket.on("receiveVisibleApps", (apps) => {
|
||||
appsList.innerHTML = "";
|
||||
if (!apps?.length) {
|
||||
appsList.innerHTML = "<p>No visible apps</p>";
|
||||
return;
|
||||
}
|
||||
// 🟢 Receive visible apps from client
|
||||
socket.on("receiveVisibleApps", (apps) => {
|
||||
appsList.innerHTML = "";
|
||||
if (!apps?.length) {
|
||||
appsList.innerHTML = "<p>No visible apps</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
apps.forEach(app => {
|
||||
const div = document.createElement("div");
|
||||
div.classList.add("app");
|
||||
div.textContent = app.name || "Unnamed App";
|
||||
div.onclick = () => {
|
||||
document.querySelectorAll(".app").forEach(el => el.classList.remove("active"));
|
||||
div.classList.add("active");
|
||||
currentApp = app.name;
|
||||
selectedAppTitle.textContent = app.name;
|
||||
apps.forEach(app => {
|
||||
const div = document.createElement("div");
|
||||
div.classList.add("app");
|
||||
div.textContent = app.name || "Unnamed App";
|
||||
div.onclick = () => {
|
||||
document.querySelectorAll(".app").forEach(el => el.classList.remove("active"));
|
||||
div.classList.add("active");
|
||||
currentApp = app.name;
|
||||
selectedAppTitle.textContent = app.name;
|
||||
|
||||
// 🟠 Tell server which app VA wants to monitor
|
||||
socket.emit("selectApp", { appTitle: app.name, clientId });
|
||||
};
|
||||
appsList.appendChild(div);
|
||||
});
|
||||
});
|
||||
// 🟠 Tell server which app VA wants to monitor
|
||||
socket.emit("selectApp", { appTitle: app.name, clientId });
|
||||
};
|
||||
appsList.appendChild(div);
|
||||
});
|
||||
});
|
||||
|
||||
// 🟣 Receive images only for the selected app
|
||||
socket.on("receiveImage", (base64, title) => {
|
||||
if (currentApp && title === currentApp) {
|
||||
liveImage.src = base64;
|
||||
liveImage.classList.remove("no-image");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
// 🟣 Receive images only for the selected app
|
||||
socket.on("receiveImage", (base64, title) => {
|
||||
if (currentApp && title === currentApp) {
|
||||
liveImage.src = base64;
|
||||
liveImage.classList.remove("no-image");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Loading…
Reference in New Issue