forked from malaohu/MobaXterm-GenKey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
364 lines (316 loc) · 10.4 KB
/
Copy pathindex.html
File metadata and controls
364 lines (316 loc) · 10.4 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
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MobaXterm Keygen</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
}
.form-wrapper {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 24px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
overflow: hidden;
width: 100%;
max-width: 600px;
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
form {
padding: 50px 40px;
}
h1 {
text-align: center;
font-size: 32px;
font-weight: 600;
color: #2d3748;
margin-bottom: 12px;
background: linear-gradient(135deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
text-align: center;
color: #718096;
font-size: 16px;
margin-bottom: 40px;
line-height: 1.5;
}
.form-group {
margin-bottom: 28px;
}
label {
display: block;
font-weight: 500;
color: #4a5568;
margin-bottom: 8px;
font-size: 14px;
}
input[type="text"], input[type="number"] {
width: 100%;
padding: 18px 20px;
border: 2px solid #e2e8f0;
border-radius: 14px;
font-size: 16px;
transition: all 0.3s ease;
background: #fff;
color: #2d3748;
}
input[type="text"]:focus, input[type="number"]:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
transform: translateY(-2px);
}
input[type="text"]::placeholder, input[type="number"]::placeholder {
color: #a0aec0;
}
button {
width: 100%;
padding: 18px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
border-radius: 14px;
font-size: 17px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin: 12px 0 32px 0;
text-transform: uppercase;
letter-spacing: 0.5px;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
button:active {
transform: translateY(0);
}
.divider {
height: 1px;
background: linear-gradient(to right, transparent, #e2e8f0, transparent);
margin: 24px 0;
}
.github {
text-align: center;
padding: 16px 0 0 0;
}
.github a {
display: inline-flex;
align-items: center;
gap: 8px;
text-decoration: none;
color: #4a5568;
font-size: 14px;
font-weight: 500;
transition: all 0.3s ease;
padding: 8px 16px;
border-radius: 8px;
}
.github a:hover {
color: #667eea;
background: rgba(102, 126, 234, 0.1);
}
.github svg {
width: 16px;
height: 16px;
opacity: 0.7;
transition: opacity 0.3s ease;
}
.github a:hover svg {
opacity: 1;
}
/* 语言切换按钮 */
.language-toggle {
position: absolute;
top: 20px;
right: 20px;
display: flex;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
border-radius: 25px;
padding: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.lang-btn {
padding: 8px 16px;
border: none;
background: transparent;
color: white;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.3s ease;
min-width: 60px;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
}
.lang-btn.active {
background: rgba(255, 255, 255, 0.9);
color: #4a5568;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.lang-btn:hover:not(.active) {
background: rgba(255, 255, 255, 0.1);
}
/* 响应式设计 */
@media (max-width: 480px) {
html, body {
padding: 16px;
}
.form-wrapper {
border-radius: 16px;
}
form {
padding: 40px 30px;
}
h1 {
font-size: 28px;
}
input[type="text"], input[type="number"] {
padding: 16px 18px;
}
button {
padding: 16px;
}
.language-toggle {
top: 16px;
right: 16px;
padding: 4px;
}
.lang-btn {
padding: 6px 12px;
font-size: 12px;
min-width: 50px;
}
}
</style>
</head>
<body>
<!-- 语言切换按钮 -->
<div class="language-toggle">
<button class="lang-btn active" onclick="switchLanguage('zh')" data-lang="zh">中文</button>
<button class="lang-btn" onclick="switchLanguage('en')" data-lang="en">EN</button>
</div>
<div class="form-wrapper">
<form action="./gen" method="get">
<h1 data-i18n="title">MobaXterm 密钥生成器</h1>
<p class="subtitle" data-i18n="subtitle">生成您的 MobaXterm 许可证密钥</p>
<div class="form-group">
<label for="name" data-i18n="nameLabel">姓名</label>
<input type="text" id="name" name="name" data-i18n-placeholder="namePlaceholder" placeholder="请输入您的姓名" required>
</div>
<div class="form-group">
<label for="ver" data-i18n="versionLabel">版本</label>
<input type="text" id="ver" name="ver" data-i18n-placeholder="versionPlaceholder" placeholder="请输入版本号 (例如: 25.2)" required>
</div>
<div class="form-group">
<label for="count" data-i18n="countLabel">用户数</label>
<input type="number" id="count" name="count" data-i18n-placeholder="countPlaceholder" placeholder="请输入用户数量" value="1" min="1" max="999" required>
</div>
<button type="submit" data-i18n="generateBtn">生成密钥</button>
<div class="divider"></div>
<div class="github">
<a href="https://github.com/malaohu/MobaXterm-GenKey" target="_blank" rel="noopener noreferrer">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
</svg>
<span data-i18n="githubLink">在 GitHub 上查看</span>
</a>
</div>
</form>
</div>
<script>
// 多语言文本配置
const translations = {
zh: {
title: 'MobaXterm 密钥生成器',
subtitle: '生成您的 MobaXterm 许可证密钥',
nameLabel: '姓名',
namePlaceholder: '请输入您的姓名',
versionLabel: '版本',
versionPlaceholder: '请输入版本号 (例如: 25.2)',
countLabel: '用户数',
countPlaceholder: '请输入用户数量',
generateBtn: '生成密钥',
githubLink: '在 GitHub 上查看'
},
en: {
title: 'MobaXterm Keygen',
subtitle: 'Generate your MobaXterm license key',
nameLabel: 'Name',
namePlaceholder: 'Enter your name',
versionLabel: 'Version',
versionPlaceholder: 'Enter version (e.g., 25.2)',
countLabel: 'User Count',
countPlaceholder: 'Enter user count',
generateBtn: 'Generate Key',
githubLink: 'View on GitHub'
}
};
// 当前语言
let currentLang = 'zh';
// 语言切换函数
function switchLanguage(lang) {
currentLang = lang;
// 更新按钮状态
document.querySelectorAll('.lang-btn').forEach(btn => {
btn.classList.remove('active');
if (btn.dataset.lang === lang) {
btn.classList.add('active');
}
});
// 更新文本内容
document.querySelectorAll('[data-i18n]').forEach(element => {
const key = element.dataset.i18n;
if (translations[lang][key]) {
element.textContent = translations[lang][key];
}
});
// 更新占位符
document.querySelectorAll('[data-i18n-placeholder]').forEach(element => {
const key = element.dataset.i18nPlaceholder;
if (translations[lang][key]) {
element.placeholder = translations[lang][key];
}
});
// 保存语言偏好
localStorage.setItem('preferred-language', lang);
}
// 页面加载时恢复语言偏好
document.addEventListener('DOMContentLoaded', function() {
const savedLang = localStorage.getItem('preferred-language') || 'zh';
switchLanguage(savedLang);
});
</script>
</body>
</html>