2026-02-18 13:18:33 +00:00

142 lines
4.1 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Local Screenshot</title>
<style>
:root {
--bg: #0b1220;
--panel: rgba(255, 255, 255, 0.08);
--text: #e8eefc;
--muted: rgba(232, 238, 252, 0.7);
--accent: #34d399;
--danger: #fb7185;
}
body {
margin: 0;
padding: 12px;
width: 360px;
background: radial-gradient(900px 450px at 20% 0%, rgba(52, 211, 153, 0.14), transparent 55%),
radial-gradient(700px 380px at 95% 30%, rgba(56, 189, 248, 0.12), transparent 55%),
var(--bg);
color: var(--text);
font: 13px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.card {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 12px;
padding: 12px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.title {
font-size: 14px;
font-weight: 700;
letter-spacing: 0.2px;
margin: 0 0 8px 0;
}
label {
display: block;
color: var(--muted);
margin: 10px 0 6px 0;
}
input,
select,
textarea {
width: 100%;
box-sizing: border-box;
padding: 10px 10px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(0, 0, 0, 0.2);
color: var(--text);
outline: none;
}
textarea {
resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
border-color: rgba(52, 211, 153, 0.6);
box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}
.row {
display: flex;
gap: 10px;
margin-top: 10px;
}
button {
flex: 1;
border: 0;
border-radius: 10px;
padding: 10px 10px;
font-weight: 700;
cursor: pointer;
}
#capture {
background: linear-gradient(135deg, rgba(52, 211, 153, 0.95), rgba(34, 197, 94, 0.9));
color: #07130f;
}
#capture:disabled {
opacity: 0.55;
cursor: not-allowed;
}
#ping {
background: rgba(255, 255, 255, 0.1);
color: var(--text);
border: 1px solid rgba(255, 255, 255, 0.18);
}
#show_history {
background: rgba(255, 255, 255, 0.1);
color: var(--text);
border: 1px solid rgba(255, 255, 255, 0.18);
}
#clear_history {
background: rgba(251, 113, 133, 0.12);
color: var(--text);
border: 1px solid rgba(251, 113, 133, 0.25);
}
pre {
margin: 10px 0 0 0;
padding: 10px;
border-radius: 10px;
background: rgba(0, 0, 0, 0.25);
border: 1px solid rgba(255, 255, 255, 0.12);
color: var(--text);
white-space: pre-wrap;
word-break: break-word;
min-height: 44px;
}
.ok {
color: var(--accent);
}
.err {
color: var(--danger);
}
</style>
</head>
<body>
<div class="card">
<div class="title">Local Screenshot Saver</div>
<label for="endpoint">Endpoint</label>
<input id="endpoint" type="text" spellcheck="false" />
<label for="extra_instructions">Extra instructions</label>
<textarea id="extra_instructions" rows="2" spellcheck="false" placeholder="optional: tone, goal, constraints..."></textarea>
<div class="row">
<button id="ping" type="button">Ping</button>
<button id="capture" type="button">Capture</button>
</div>
<label for="history">History</label>
<select id="history"></select>
<div class="row">
<button id="show_history" type="button">Show</button>
<button id="clear_history" type="button">Clear</button>
</div>
<pre id="status"></pre>
</div>
<script src="popup.js"></script>
</body>
</html>