123 lines
3.6 KiB
HTML
123 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' http: https:; connect-src 'self' http://localhost:*">
|
|
<title>PTW Auto-Disconnect</title>
|
|
<style>
|
|
* { box-sizing: border-box; }
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
font-family: sans-serif;
|
|
background: #1a1a1a;
|
|
color: #e0e0e0;
|
|
}
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 10px;
|
|
min-height: 0;
|
|
}
|
|
.webview-wrap {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
}
|
|
.webview-wrap webview {
|
|
width: 1px;
|
|
height: 1px;
|
|
}
|
|
.panels {
|
|
display: flex;
|
|
flex: 1;
|
|
gap: 10px;
|
|
min-height: 0;
|
|
margin-bottom: 10px;
|
|
}
|
|
.panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
}
|
|
.section-title { font-size: 11px; font-weight: bold; color: #aaa; margin-bottom: 4px; flex-shrink: 0; }
|
|
#sessionsBox {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
background: rgba(0,0,0,0.6);
|
|
color: #c0c0c0;
|
|
font-family: monospace;
|
|
font-size: 10px;
|
|
padding: 6px;
|
|
border-radius: 5px;
|
|
border: 1px solid #444;
|
|
scrollbar-width: thin;
|
|
}
|
|
#sessionsBox .sess-user-block { margin-bottom: 6px; }
|
|
#sessionsBox .sess-user-name { color: #7eb8da; font-weight: bold; padding: 2px 0 1px 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
|
|
#sessionsBox .sess-row { padding: 1px 0 1px 10px; font-size: 9px; color: #b5b5b5; }
|
|
#sessionsBox .sess-product { color: #b5b5b5; }
|
|
#sessionsBox .empty { color: #777; font-style: italic; }
|
|
#logBox {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
background: rgba(0,0,0,0.85);
|
|
color: #00ff00;
|
|
font-family: monospace;
|
|
font-size: 10px;
|
|
padding: 6px;
|
|
border-radius: 5px;
|
|
border: 1px solid #444;
|
|
scrollbar-width: thin;
|
|
}
|
|
#logBox .empty { color: #777; font-style: italic; }
|
|
#logBox .entry { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 2px 0; }
|
|
.controls { display: flex; gap: 8px; flex-shrink: 0; }
|
|
.controls button {
|
|
padding: 8px 15px;
|
|
color: white;
|
|
border: 1px solid white;
|
|
cursor: pointer;
|
|
border-radius: 20px;
|
|
font-family: sans-serif;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
background: #333;
|
|
}
|
|
.controls button.toggle-on { background: #28a745; }
|
|
.controls button.toggle-off { background: #dc3545; }
|
|
.controls button.clear-btn { background: #6c757d; }
|
|
.status { font-size: 10px; color: #888; margin-top: 6px; flex-shrink: 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="webview-wrap">
|
|
<webview id="wv" src="http://localhost:1947/_int_/config.html" partition="persist:ptw"></webview>
|
|
</div>
|
|
<div class="panels">
|
|
<div class="panel">
|
|
<div class="section-title">Logged in</div>
|
|
<div id="sessionsBox"><div class="empty">Loading...</div></div>
|
|
</div>
|
|
<div class="panel">
|
|
<div class="section-title">Activity log</div>
|
|
<div id="logBox"><div class="empty">Connecting...</div></div>
|
|
</div>
|
|
</div>
|
|
<div class="controls">
|
|
<button id="toggleBtn" class="toggle-on">MONITOR: ON</button>
|
|
<button id="clearBtn" class="clear-btn">Clear</button>
|
|
</div>
|
|
<div class="status" id="status">Connected to sessions page</div>
|
|
<script src="renderer.js"></script>
|
|
</body>
|
|
</html>
|