78 lines
1.9 KiB
HTML
78 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>SmartUp Auth Importer</title>
|
|
<style>
|
|
body {
|
|
width: 360px;
|
|
margin: 0;
|
|
padding: 14px;
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
color: #1f2937;
|
|
}
|
|
h1 {
|
|
margin: 0 0 12px;
|
|
font-size: 16px;
|
|
}
|
|
label {
|
|
display: block;
|
|
margin: 10px 0 4px;
|
|
font-size: 12px;
|
|
color: #4b5563;
|
|
}
|
|
input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 8px;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
}
|
|
button {
|
|
width: 100%;
|
|
margin-top: 12px;
|
|
padding: 9px 10px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: #2563eb;
|
|
color: white;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
button:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
.hint {
|
|
margin-top: 8px;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
color: #6b7280;
|
|
}
|
|
.status {
|
|
margin-top: 10px;
|
|
min-height: 18px;
|
|
font-size: 12px;
|
|
color: #374151;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.ok { color: #15803d; }
|
|
.err { color: #b91c1c; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>SmartUp 凭证导入</h1>
|
|
<label for="smartup">SmartUp 地址</label>
|
|
<input id="smartup" placeholder="http://127.0.0.1:8899" />
|
|
<label for="code">导入码</label>
|
|
<input id="code" placeholder="session_id:secret" />
|
|
<div class="hint">
|
|
先在当前标签页完成目标站登录,再点击采集。扩展会读取当前域 cookie、storage 和已捕获的认证请求头。
|
|
</div>
|
|
<button id="submit">采集当前页并回填</button>
|
|
<div id="status" class="status"></div>
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|