added subscription for opencloud
This commit is contained in:
+28
-6
@@ -97,7 +97,10 @@
|
||||
<span class="status-label" id="gw-status">-</span>
|
||||
</div>
|
||||
<div class="error-text" id="gw-error"></div>
|
||||
<div id="core-auth" style="margin-top:6px;display:none;background:#080810;border:1px solid #1E1E2E;border-radius:4px;padding:6px 8px;font-size:10px;line-height:1.5;max-height:220px;overflow-y:auto;white-space:pre-wrap;color:#8888AA"></div>
|
||||
<button class="btn secondary" onclick="send({action:'reconnect_gateway'})">Reconnect</button>
|
||||
<button class="btn secondary" onclick="send({action:'check_core_auth'})">Agent-Auth pruefen</button>
|
||||
<button class="btn secondary" id="btn-core-term" onclick="openCoreTerminal()">Core Terminal</button>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -330,6 +333,12 @@
|
||||
el.textContent = msg.error ? `Fehler: ${msg.error}` : msg.info;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'core_auth') {
|
||||
const el = document.getElementById('core-auth');
|
||||
el.style.display = 'block';
|
||||
el.textContent = msg.error ? `Fehler: ${msg.error}` : msg.info;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'term_ready') {
|
||||
document.getElementById('term-status').textContent = 'Verbunden — interaktives Terminal';
|
||||
if (term) term.writeln('\x1b[32mVerbunden!\x1b[0m\r\n');
|
||||
@@ -403,10 +412,12 @@
|
||||
|
||||
let term = null;
|
||||
let termFitAddon = null;
|
||||
let termAction = null; // Welche Aktion beim Terminal-Start gesendet wird
|
||||
|
||||
function startProxyLogin() {
|
||||
function openTermModal(title, action) {
|
||||
termAction = action;
|
||||
document.querySelector('#term-modal .modal-header h3').textContent = title;
|
||||
document.getElementById('term-modal').classList.add('open');
|
||||
document.getElementById('btn-proxy-login').disabled = true;
|
||||
document.getElementById('term-status').textContent = 'Starte Terminal...';
|
||||
|
||||
if (typeof Terminal === 'undefined') {
|
||||
@@ -424,11 +435,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
function startProxyLogin() {
|
||||
document.getElementById('btn-proxy-login').disabled = true;
|
||||
openTermModal('Claude Login Terminal (aria-proxy)', { action: 'proxy_login' });
|
||||
}
|
||||
|
||||
function openCoreTerminal() {
|
||||
document.getElementById('btn-core-term').disabled = true;
|
||||
openTermModal('aria-core Shell', { action: 'core_terminal' });
|
||||
}
|
||||
|
||||
function closeTermModal() {
|
||||
document.getElementById('term-modal').classList.remove('open');
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
document.getElementById('btn-proxy-login').textContent = 'Login starten';
|
||||
// Terminal aufräumen
|
||||
document.getElementById('btn-core-term').disabled = false;
|
||||
// Terminal aufraeumen
|
||||
if (term) { term.dispose(); term = null; }
|
||||
}
|
||||
|
||||
@@ -461,8 +482,9 @@
|
||||
send({ action: 'term_input', data: btoa(b64) });
|
||||
});
|
||||
|
||||
term.writeln('\x1b[33mVerbinde mit Proxy-Container...\x1b[0m');
|
||||
send({ action: 'proxy_login' });
|
||||
const containerName = termAction?.action === 'core_terminal' ? 'aria-core' : 'aria-proxy';
|
||||
term.writeln('\x1b[33mVerbinde mit ' + containerName + '...\x1b[0m');
|
||||
send(termAction);
|
||||
}
|
||||
|
||||
// Resize bei Fensteraenderung
|
||||
|
||||
Reference in New Issue
Block a user