mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
8dd9d578d4
* feat(browser): support multiple chrome profiles * fix(browser): tighten profile popup context id * fix(browser): harden profile routing edge cases * refactor(browser): remove unnecessary profile id guard
110 lines
2.8 KiB
HTML
110 lines
2.8 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; }
|
|
.profile-row {
|
|
margin-top: 10px;
|
|
padding: 9px 10px;
|
|
border-radius: 8px;
|
|
background: #fafafa;
|
|
border: 1px solid #ececec;
|
|
color: #666;
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
}
|
|
.profile-row code {
|
|
display: block;
|
|
margin-top: 2px;
|
|
padding: 3px 5px;
|
|
border-radius: 4px;
|
|
background: #f0f0f0;
|
|
color: #333;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
word-break: break-all;
|
|
user-select: all;
|
|
}
|
|
.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="profile-row" id="profile" style="display: none;">
|
|
Chrome profile contextId
|
|
<code id="contextId"></code>
|
|
</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>
|