fixed claude login
This commit is contained in:
@@ -119,9 +119,19 @@
|
||||
<div id="login-done" style="display:none;margin-top:6px;color:#34C759;font-size:12px">Login abgeschlossen!</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="proxy-creds-box" style="margin-top:6px;display:none">
|
||||
<div style="background:#0A1A1A;border:1px solid #0096FF33;border-radius:6px;padding:8px 10px">
|
||||
<div style="font-size:11px;color:#0096FF;margin-bottom:4px;font-weight:bold">Credentials einfuegen</div>
|
||||
<div style="font-size:10px;color:#8888AA;margin-bottom:6px">Auf einem Rechner mit Claude Login: <code style="background:#1E1E2E;padding:1px 4px;border-radius:3px">cat ~/.config/claude/.credentials.json</code><br>Inhalt hier einfuegen:</div>
|
||||
<textarea id="creds-input" rows="4" style="width:100%;background:#080810;border:1px solid #333;border-radius:4px;padding:6px;color:#E0E0F0;font-family:monospace;font-size:11px;resize:vertical" placeholder='{"claudeAiOauth":{"accessToken":"...","refreshToken":"...","expiresAt":"..."}}'></textarea>
|
||||
<button class="btn" onclick="submitCredentials()" style="margin-top:4px;padding:4px 12px;font-size:11px">Speichern</button>
|
||||
<div id="creds-status" style="font-size:11px;margin-top:4px"></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>
|
||||
<button class="btn secondary" onclick="toggleCredsBox()" style="margin-top:6px">Credentials einfuegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -324,10 +334,14 @@
|
||||
document.getElementById('login-done').style.display = 'block';
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
document.getElementById('btn-proxy-login').textContent = 'Erneut einloggen';
|
||||
const cs = document.getElementById('creds-status');
|
||||
cs.textContent = 'Erfolgreich!'; cs.style.color = '#34C759';
|
||||
} else if (msg.status === 'error') {
|
||||
const el = document.getElementById('login-output');
|
||||
el.textContent += 'FEHLER: ' + msg.error + '\n';
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
const cs = document.getElementById('creds-status');
|
||||
cs.textContent = msg.error; cs.style.color = '#FF6B6B';
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -376,6 +390,24 @@
|
||||
send({ action: 'proxy_login' });
|
||||
}
|
||||
|
||||
function toggleCredsBox() {
|
||||
const box = document.getElementById('proxy-creds-box');
|
||||
box.style.display = box.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
function submitCredentials() {
|
||||
const input = document.getElementById('creds-input').value.trim();
|
||||
const status = document.getElementById('creds-status');
|
||||
if (!input) { status.textContent = 'Bitte JSON einfuegen'; status.style.color = '#FF6B6B'; return; }
|
||||
try {
|
||||
JSON.parse(input);
|
||||
} catch (e) {
|
||||
status.textContent = 'Ungueltig: Kein gueltiges JSON'; status.style.color = '#FF6B6B'; return;
|
||||
}
|
||||
status.textContent = 'Speichere...'; status.style.color = '#FFD60A';
|
||||
send({ action: 'write_credentials', credentials: input });
|
||||
}
|
||||
|
||||
function loadDockerLogs() {
|
||||
if (!DOCKER_TABS.includes(activeTab)) return;
|
||||
send({ action: 'docker_logs', tab: activeTab, tail: 200 });
|
||||
|
||||
Reference in New Issue
Block a user