-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathshared.html
More file actions
123 lines (121 loc) · 4.93 KB
/
Copy pathshared.html
File metadata and controls
123 lines (121 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>共享验证码</title>
<meta name="theme-color" content="#0a0d12">
<script src="theme-bootstrap.js"></script>
<link rel="icon" href="assets/icons/icon-192.png" sizes="192x192" type="image/png">
<link rel="icon" href="assets/icons/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" sizes="180x180" href="assets/icons/apple-touch-icon.png">
<link rel="stylesheet" href="styles.css" />
<script src="runtime-config.js"></script>
<style>
body { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.share-wrap { width: min(440px, 100%); }
.share-head {
display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.share-head .logo {
width: 40px; height: 40px; border-radius: 12px;
background: linear-gradient(135deg, var(--primary), #22c55e);
display: grid; place-items: center; color: white; font-weight: 700; font-size: 18px;
box-shadow: 0 4px 14px rgba(91, 141, 239, 0.4);
}
.share-head h1 { margin: 0; font-size: 18px; font-weight: 600; }
.share-head .sub { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.share-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-xl);
padding: 24px;
box-shadow: var(--shadow);
}
.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.label-row #lbl { margin: 0; font-size: 16px; font-weight: 600; }
.label-row small { color: var(--fg-muted); font-size: 12px; }
.code-display {
margin: 24px 0 18px;
text-align: center;
font-family: var(--font-mono);
font-size: clamp(36px, 10vw, 56px);
font-weight: 700;
letter-spacing: 6px;
font-variant-numeric: tabular-nums;
background: linear-gradient(135deg, #cfe1ff, #b8f2cb);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent;
}
.progress-line {
width: 100%; height: 6px;
background: var(--surface-soft);
border-radius: 999px; overflow: hidden;
position: relative;
}
.progress-line .bar {
position: absolute; left: 0; top: 0; bottom: 0;
width: 0; background: linear-gradient(90deg, var(--ok), var(--primary));
transition: width 0.5s linear;
border-radius: 999px;
}
.progress-meta {
display: flex; justify-content: space-between;
font-size: 12px; color: var(--fg-muted);
margin-top: 8px;
}
.actions { display: flex; gap: 8px; margin-top: 20px; }
.actions button { flex: 1; }
.err { color: var(--danger); }
</style>
</head>
<body>
<div class="share-wrap">
<div class="share-head">
<div class="logo">2F</div>
<div>
<h1>共享验证码</h1>
<div class="sub">链接有效期内可用</div>
</div>
</div>
<article class="share-card">
<div class="label-row">
<h2 id="lbl">加载中…</h2>
<small id="algo"></small>
</div>
<div id="password-gate" class="section-card" style="display:none; margin: 10px 0 14px;">
<div class="col gap-2">
<div class="text-sm" style="font-weight:600;">此分享额外受访问口令保护</div>
<div class="hint" style="line-height:1.7;">链接里不包含口令。请向分享方获取后再解锁;如果没有设置口令,这个区域不会出现。</div>
<input id="share-pass" class="input" type="password" placeholder="输入访问口令" autocomplete="current-password" />
<div class="actions" style="margin-top:0;">
<button class="btn" id="unlock-share">🔓 解锁分享</button>
</div>
</div>
</div>
<div id="share-content">
<div id="note" class="hint" style="margin: 6px 0 14px; white-space: pre-wrap; display: none;"></div>
<div id="secret-panel" class="field" style="display:none; margin: 6px 0 14px;">
<label for="secret-value">Secret</label>
<input id="secret-value" class="input mono" readonly />
<div class="actions" style="margin-top:10px;">
<button class="btn ghost" id="copy-secret">复制 Secret</button>
</div>
</div>
<div id="code" class="code-display">— —</div>
<div class="progress-line"><div class="bar"></div></div>
<div class="progress-meta">
<span id="period-info"></span>
<span><span class="left">--</span>s</span>
</div>
<div class="actions">
<button class="btn" id="copy">📋 复制验证码</button>
<button class="btn ghost" id="copy-link">复制链接</button>
</div>
</div>
</article>
</div>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
<script src="shared.js" type="module"></script>
</body>
</html>