sensivity 2.5.31 → 2.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/css/style.css +32 -0
- package/public/index.html +1 -0
- package/public/js/app.js +52 -2
package/package.json
CHANGED
package/public/css/style.css
CHANGED
|
@@ -592,6 +592,29 @@ body::after {
|
|
|
592
592
|
box-shadow: none;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
#debug-toast {
|
|
596
|
+
position: fixed;
|
|
597
|
+
left: 50%;
|
|
598
|
+
bottom: 66px;
|
|
599
|
+
z-index: 900;
|
|
600
|
+
max-width: min(520px, calc(100vw - 28px));
|
|
601
|
+
transform: translateX(-50%) translateY(10px);
|
|
602
|
+
opacity: 0;
|
|
603
|
+
pointer-events: none;
|
|
604
|
+
padding: 12px 16px;
|
|
605
|
+
border: 1px solid rgba(241, 93, 98, .5);
|
|
606
|
+
border-radius: 8px;
|
|
607
|
+
background: rgba(12, 3, 4, .96);
|
|
608
|
+
color: #ffd8da;
|
|
609
|
+
font: 900 12px var(--font);
|
|
610
|
+
box-shadow: 0 18px 48px rgba(0,0,0,.48), 0 0 24px rgba(241, 93, 98, .16);
|
|
611
|
+
transition: opacity .18s ease, transform .18s ease;
|
|
612
|
+
}
|
|
613
|
+
#debug-toast.show {
|
|
614
|
+
opacity: 1;
|
|
615
|
+
transform: translateX(-50%) translateY(0);
|
|
616
|
+
}
|
|
617
|
+
|
|
595
618
|
#license-overlay {
|
|
596
619
|
position: fixed;
|
|
597
620
|
inset: 0;
|
|
@@ -1007,6 +1030,14 @@ body::after {
|
|
|
1007
1030
|
font-size: 10px;
|
|
1008
1031
|
}
|
|
1009
1032
|
#statusbar .kill-btn { flex-basis: 46px; min-width: 46px; }
|
|
1033
|
+
#debug-toast {
|
|
1034
|
+
bottom: 58px;
|
|
1035
|
+
left: 66px;
|
|
1036
|
+
right: 10px;
|
|
1037
|
+
max-width: none;
|
|
1038
|
+
transform: translateY(10px);
|
|
1039
|
+
}
|
|
1040
|
+
#debug-toast.show { transform: translateY(0); }
|
|
1010
1041
|
}
|
|
1011
1042
|
|
|
1012
1043
|
@media (max-width: 600px) {
|
|
@@ -1027,4 +1058,5 @@ body::after {
|
|
|
1027
1058
|
.color-actions { flex-shrink: 0; }
|
|
1028
1059
|
.esp-stage { height: 280px; min-height: 280px; }
|
|
1029
1060
|
.esp-preview-panel { min-height: 334px; }
|
|
1061
|
+
#debug-toast { left: 56px; right: 8px; }
|
|
1030
1062
|
}
|
package/public/index.html
CHANGED
package/public/js/app.js
CHANGED
|
@@ -2,6 +2,7 @@ const SOCKET = (typeof io !== 'undefined') ? io() : null;
|
|
|
2
2
|
let state = {}, currentSection = 0, currentSub = 0;
|
|
3
3
|
let licenseAccepted = false, cheatRunning = false, listeningKeybind = null;
|
|
4
4
|
let espSyncTimer = null;
|
|
5
|
+
let startWatchTimer = null, startPending = false;
|
|
5
6
|
|
|
6
7
|
const SECTION_GROUPS = [
|
|
7
8
|
{ label: 'AIMBOT', ids: ['aim'] },
|
|
@@ -259,8 +260,42 @@ document.addEventListener('mousedown', function(e) {
|
|
|
259
260
|
function toggleCheat() {
|
|
260
261
|
if (!SOCKET) return;
|
|
261
262
|
const eventName = cheatRunning ? 'stopCheat' : 'startCheat';
|
|
263
|
+
if (eventName === 'startCheat') beginPanelStartWatch();
|
|
264
|
+
else clearPanelStartWatch();
|
|
262
265
|
SOCKET.emit(eventName);
|
|
263
|
-
if (!SOCKET.connected && typeof SOCKET.connect === 'function')
|
|
266
|
+
if (!SOCKET.connected && typeof SOCKET.connect === 'function') {
|
|
267
|
+
showPanelDebug('Panel reconnecting before start');
|
|
268
|
+
SOCKET.connect();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function beginPanelStartWatch() {
|
|
273
|
+
startPending = true;
|
|
274
|
+
clearTimeout(startWatchTimer);
|
|
275
|
+
clearPanelDebug();
|
|
276
|
+
startWatchTimer = setTimeout(() => {
|
|
277
|
+
if (startPending && !cheatRunning) showPanelDebug('Program start did not confirm');
|
|
278
|
+
}, 6000);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function clearPanelStartWatch() {
|
|
282
|
+
startPending = false;
|
|
283
|
+
clearTimeout(startWatchTimer);
|
|
284
|
+
startWatchTimer = null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function showPanelDebug(message) {
|
|
288
|
+
const el = document.getElementById('debug-toast');
|
|
289
|
+
if (!el) return;
|
|
290
|
+
el.textContent = message;
|
|
291
|
+
el.classList.add('show');
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function clearPanelDebug() {
|
|
295
|
+
const el = document.getElementById('debug-toast');
|
|
296
|
+
if (!el) return;
|
|
297
|
+
el.textContent = '';
|
|
298
|
+
el.classList.remove('show');
|
|
264
299
|
}
|
|
265
300
|
|
|
266
301
|
function updateStatus() {
|
|
@@ -395,7 +430,22 @@ if (SOCKET) {
|
|
|
395
430
|
}
|
|
396
431
|
});
|
|
397
432
|
SOCKET.on('configSync', (c) => { Object.assign(state, c); rerender(); });
|
|
398
|
-
SOCKET.on('status', (s) => {
|
|
433
|
+
SOCKET.on('status', (s) => {
|
|
434
|
+
cheatRunning = s.running;
|
|
435
|
+
if (cheatRunning) {
|
|
436
|
+
clearPanelStartWatch();
|
|
437
|
+
clearPanelDebug();
|
|
438
|
+
} else if (startPending) {
|
|
439
|
+
showPanelDebug('Program inactive after start');
|
|
440
|
+
}
|
|
441
|
+
updateStatus();
|
|
442
|
+
});
|
|
443
|
+
SOCKET.on('disconnect', () => {
|
|
444
|
+
if (startPending) showPanelDebug('Panel connection lost during start');
|
|
445
|
+
});
|
|
446
|
+
SOCKET.on('connect_error', () => {
|
|
447
|
+
if (startPending) showPanelDebug('Panel connection failed during start');
|
|
448
|
+
});
|
|
399
449
|
SOCKET.on('killed', () => { document.body.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:100vh;color:var(--danger);font-size:18px;font-family:var(--font)">Sensivity Terminated</div>'; });
|
|
400
450
|
SOCKET.on('ytTrigger', (d) => {
|
|
401
451
|
const el = document.getElementById('qr-overlay');
|