added claude login for credentials creation if credentials not exist
This commit is contained in:
@@ -108,8 +108,20 @@
|
||||
<div style="font-size:10px;color:#555570;margin-top:4px" id="proxy-models-hint"></div>
|
||||
</div>
|
||||
<div id="proxy-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:120px;overflow-y:auto;white-space:pre-wrap;color:#8888AA"></div>
|
||||
<div id="proxy-login-box" style="margin-top:6px;display:none">
|
||||
<div style="background:#1A1A0A;border:1px solid #FFD60A33;border-radius:6px;padding:8px 10px">
|
||||
<div style="font-size:11px;color:#FFD60A;margin-bottom:6px;font-weight:bold">Claude Login</div>
|
||||
<div id="login-output" style="font-size:11px;line-height:1.6;color:#AAB;max-height:100px;overflow-y:auto;white-space:pre-wrap"></div>
|
||||
<div id="login-url-box" style="display:none;margin-top:6px">
|
||||
<div style="font-size:11px;color:#8888AA;margin-bottom:4px">Link oeffnen und autorisieren:</div>
|
||||
<a id="login-url-link" href="#" target="_blank" style="color:#0096FF;font-size:12px;word-break:break-all"></a>
|
||||
</div>
|
||||
<div id="login-done" style="display:none;margin-top:6px;color:#34C759;font-size:12px">Login abgeschlossen!</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn secondary" id="btn-proxy-test" onclick="testProxyBtn()" style="margin-top:6px">Proxy testen</button>
|
||||
<button class="btn secondary" onclick="checkProxyAuth()" style="margin-top:6px">Auth pruefen</button>
|
||||
<button class="btn secondary" id="btn-proxy-login" onclick="startProxyLogin()" style="margin-top:6px">Login starten</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -291,6 +303,34 @@
|
||||
el.textContent = msg.error ? `Fehler: ${msg.error}` : msg.info;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'login_output') {
|
||||
const el = document.getElementById('login-output');
|
||||
el.textContent += msg.text + '\n';
|
||||
el.scrollTop = el.scrollHeight;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'login_url') {
|
||||
const el = document.getElementById('login-output');
|
||||
el.textContent += msg.raw + '\n';
|
||||
el.scrollTop = el.scrollHeight;
|
||||
document.getElementById('login-url-box').style.display = 'block';
|
||||
const link = document.getElementById('login-url-link');
|
||||
link.href = msg.url;
|
||||
link.textContent = msg.url;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'login_status') {
|
||||
if (msg.status === 'done') {
|
||||
document.getElementById('login-done').style.display = 'block';
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
document.getElementById('btn-proxy-login').textContent = 'Erneut einloggen';
|
||||
} else if (msg.status === 'error') {
|
||||
const el = document.getElementById('login-output');
|
||||
el.textContent += 'FEHLER: ' + msg.error + '\n';
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'docker_logs') {
|
||||
showDockerLogs(msg);
|
||||
return;
|
||||
@@ -327,6 +367,15 @@
|
||||
send({ action: 'check_proxy_auth' });
|
||||
}
|
||||
|
||||
function startProxyLogin() {
|
||||
document.getElementById('proxy-login-box').style.display = 'block';
|
||||
document.getElementById('login-output').textContent = 'Starte Login...\n';
|
||||
document.getElementById('login-url-box').style.display = 'none';
|
||||
document.getElementById('login-done').style.display = 'none';
|
||||
document.getElementById('btn-proxy-login').disabled = true;
|
||||
send({ action: 'proxy_login' });
|
||||
}
|
||||
|
||||
function loadDockerLogs() {
|
||||
if (!DOCKER_TABS.includes(activeTab)) return;
|
||||
send({ action: 'docker_logs', tab: activeTab, tail: 200 });
|
||||
|
||||
Reference in New Issue
Block a user