mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
bf5f327775
- Show helpful hint in popup when disconnected: "This is normal. The extension connects automatically when you run any opencli command." - Stop eager reconnect after 6 attempts (reaching 60s backoff) to reduce ERR_CONNECTION_REFUSED noise in console; keepalive alarm still retries every ~24s at low frequency.
85 lines
2.1 KiB
HTML
85 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
width: 280px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
font-size: 13px;
|
|
color: #333;
|
|
background: #fff;
|
|
padding: 16px;
|
|
}
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 14px;
|
|
}
|
|
.header img { width: 24px; height: 24px; }
|
|
.header h1 { font-size: 15px; font-weight: 600; }
|
|
.status-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
background: #f5f5f5;
|
|
}
|
|
.dot {
|
|
width: 8px; height: 8px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
.dot.connected { background: #34c759; }
|
|
.dot.disconnected { background: #ff3b30; }
|
|
.dot.connecting { background: #ff9500; }
|
|
.status-text { font-size: 13px; color: #555; }
|
|
.status-text strong { color: #333; }
|
|
.hint {
|
|
margin-top: 10px;
|
|
padding: 8px 10px;
|
|
border-radius: 6px;
|
|
background: #f0f4ff;
|
|
font-size: 11px;
|
|
color: #666;
|
|
line-height: 1.5;
|
|
display: none;
|
|
}
|
|
.hint code {
|
|
background: #e8ecf1;
|
|
padding: 1px 4px;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
}
|
|
.footer {
|
|
margin-top: 14px;
|
|
text-align: center;
|
|
font-size: 11px;
|
|
color: #999;
|
|
}
|
|
.footer a { color: #007aff; text-decoration: none; }
|
|
.footer a:hover { text-decoration: underline; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<img src="icons/icon-48.png" alt="OpenCLI">
|
|
<h1>OpenCLI</h1>
|
|
</div>
|
|
<div class="status-row">
|
|
<span class="dot disconnected" id="dot"></span>
|
|
<span class="status-text" id="status">Checking...</span>
|
|
</div>
|
|
<div class="hint" id="hint">
|
|
This is normal. The extension connects automatically when you run any <code>opencli</code> command.
|
|
</div>
|
|
<div class="footer">
|
|
<a href="https://github.com/jackwener/opencli" target="_blank">Documentation</a>
|
|
</div>
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|