-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfirm.html
265 lines (239 loc) · 7.08 KB
/
confirm.html
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="pageTitle">CarefullyOpenURL</title>
<link rel="stylesheet" href="css/confirm.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">
<style>
/* 白名单弹层样式 */
.modal-content {
width: 600px;
height: 500px;
display: flex;
flex-direction: column;
}
.modal-header {
padding: 16px;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-actions {
display: flex;
gap: 8px;
align-items: center;
}
.import-export-group {
display: flex;
gap: 8px;
margin-right: 16px;
}
.action-btn {
display: flex;
align-items: center;
gap: 4px;
padding: 6px 12px;
border: 1px solid #ddd;
border-radius: 4px;
background: #fff;
cursor: pointer;
transition: all 0.2s;
}
.action-btn:hover {
background: #f5f5f5;
}
.modal-body {
flex: 1;
display: flex;
flex-direction: column;
padding: 16px;
overflow: hidden;
}
.whitelist-items {
flex: 1;
overflow-y: auto;
border: 1px solid #eee;
border-radius: 4px;
padding: 8px;
}
.pagination {
margin-top: 16px;
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
}
.page-btn {
padding: 6px 12px;
border: 1px solid #ddd;
border-radius: 4px;
background: #fff;
cursor: pointer;
transition: all 0.2s;
}
.page-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.page-btn:not(:disabled):hover {
background: #f5f5f5;
}
.page-info {
font-size: 14px;
color: #666;
}
/* Badge 样式 */
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
border-radius: 10px;
background-color: #ff4d4f;
color: white;
font-size: 12px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Badge number animation */
.badge.animate {
transform: scale(1.2);
}
.badge.animate-back {
transform: scale(1);
}
/* 版权信息样式 */
.copyright {
position: fixed;
left: 16px;
bottom: 16px;
font-size: 12px;
color: #666;
display: flex;
align-items: center;
gap: 8px;
}
.copyright .separator {
color: #ddd;
}
.copyright a {
color: #666;
text-decoration: none;
transition: color 0.2s;
}
.copyright a:hover {
color: #1890ff;
}
</style>
</head>
<body>
<div class="container">
<h1 data-i18n="mainTitle">⚠️ 请确认是否访问以下网址</h1>
<div class="url-section">
<div class="url-label">
<i class="ri-shield-check-line"></i>
<span data-i18n="urlCheckPrompt">请仔细检查以下网址,特别是高亮的域名部分</span>
</div>
<div class="url-display" id="targetUrl"></div>
<div class="security-tip">
<i class="ri-alert-line"></i>
<span data-i18n="securityTip">安全提示:请仔细检查域名,防止访问钓鱼网站或恶意网址</span>
</div>
</div>
<div class="button-group">
<button class="whitelist-btn" id="whitelistBtn">
<i class="ri-shield-star-line"></i>
将域名加入白名单
</button>
<div class="action-buttons">
<button class="confirm-btn" id="confirmBtn" data-i18n="confirmButton" data-i18n-args="0,3">
确认 (<span id="confirmCount">0</span>/<span class="requiredClicks">3</span>)
</button>
<button class="visit-btn" id="visitBtn" data-i18n="visitButton">
<i class="ri-external-link-line"></i> 访问网页
</button>
</div>
</div>
</div>
<div class="settings-group">
<div class="settings-item">
<span>确认次数</span>
<input type="number" class="click-number" id="clickNumber" min="0" max="9" value="3">
</div>
<button class="settings-item whitelist-list-btn" id="whitelistListBtn">
<i class="ri-list-check"></i>
白名单列表
<span class="badge" id="whitelistCount">0</span>
</button>
<button class="settings-item lang-switch" id="langSwitch">
<i class="ri-translate"></i>
<span class="current-lang">中文</span>
</button>
</div>
<!-- 版权信息 -->
<div class="copyright">
<span><i class="ri-github-fill"></i> <a target="_blank" href="https://github.com/ezshine/CarefullyOpenURL">CarefullyOpenURL</a></span>
<span class="separator">·</span>
<span>Made with ❤️ by <a href="https://x.com/intent/follow?screen_name=ezshine" target="_blank">ezshine</a></span>
</div>
<!-- 白名单列表弹层 -->
<div class="modal" id="whitelistModal">
<div class="modal-content">
<div class="modal-header">
<h2>白名单列表</h2>
<div class="modal-actions">
<!-- 导入导出按钮组 -->
<div class="import-export-group">
<button class="action-btn" id="importWhitelistBtn" title="导入白名单">
<i class="ri-upload-2-line"></i>
导入
</button>
<button class="action-btn" id="exportWhitelistBtn" title="导出白名单">
<i class="ri-download-2-line"></i>
导出
</button>
</div>
<button class="close-btn" id="closeModalBtn">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<div class="modal-body">
<!-- 搜索框 -->
<div class="search-box">
<i class="ri-search-line"></i>
<input type="text" id="whitelistSearch" data-i18n-placeholder="searchPlaceholder">
</div>
<!-- 白名单列表容器 -->
<div class="whitelist-items" id="whitelistItems">
<!-- 白名单列表项将通过 JavaScript 动态添加 -->
</div>
<!-- 分页控件 -->
<div class="pagination">
<button class="action-btn danger-btn" id="clearWhitelistBtn" title="清空白名单">
<i class="ri-delete-bin-line"></i>
<span data-i18n="clearAll">清空全部</span>
</button>
<span class="page-info">
第 <span id="currentPage">1</span> 页,共 <span id="totalPages">1</span> 页
</span>
<div class="page-buttons">
<button class="page-btn" id="prevPage" disabled>
<i class="ri-arrow-left-s-line"></i>
</button>
<button class="page-btn" id="nextPage" disabled>
<i class="ri-arrow-right-s-line"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Hidden file input for import function -->
<input type="file" id="whitelistFileInput" accept=".json" style="display: none;">
<script src="js/confirm.js" type="module"></script>
</body>
</html>