mirror of
https://github.com/epiral/bb-browser.git
synced 2026-09-14 13:45:45 +08:00
ca78b457f3
- 新增 options page (options.html + options.ts) - 上游 URL 存储到 chrome.storage.sync - sse-client.ts / api-client.ts 从 storage 动态读取 URL - 默认值保持 http://localhost:19824 兼容 Closes #2
27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>bb-browser Settings</title>
|
|
<style>
|
|
body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; padding: 24px; max-width: 480px; }
|
|
h1 { font-size: 18px; margin-bottom: 16px; }
|
|
label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
|
|
input { width: 100%; padding: 8px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
|
|
.hint { font-size: 12px; color: #888; margin-top: 4px; }
|
|
.status { margin-top: 12px; font-size: 13px; }
|
|
.saved { color: #2a7; }
|
|
button { margin-top: 12px; padding: 6px 16px; font-size: 13px; cursor: pointer; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>bb-browser Settings</h1>
|
|
<label for="url">Upstream URL</label>
|
|
<input type="text" id="url" placeholder="http://localhost:19824">
|
|
<div class="hint">Leave empty to use default (http://localhost:19824)</div>
|
|
<button id="save">Save</button>
|
|
<div class="status" id="status"></div>
|
|
<script src="options.js"></script>
|
|
</body>
|
|
</html>
|