-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathindex.html
254 lines (254 loc) · 12.2 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MobaXterm Keygen</title>
<meta name="description" content="Website created with love by Zarfala" />
<link rel="icon" href="https://i.imgur.com/FtcF9ZP.png" />
<link href="./css/pure-min.css?=2" rel="stylesheet" />
<link href="./css/style.css" rel="stylesheet" />
<link href="./css/fire.css" rel="stylesheet" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: "class",
theme: {
extend: {
screens: {
'xs': '475px',
}
}
}
}
</script>
<!-- Meta tags moved together for better organization -->
<meta property="og:title" content="MobaXterm Keygen" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Website created with love by Zarfala" />
<meta property="og:image" content="https://i.imgur.com/FtcF9ZP.png" />
<meta property="og:site_name" content="MobaXterm Keygen" />
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="MobaXterm Keygen">
<meta name="twitter:description" content="Website created with love by Zarfala">
<meta name="twitter:image" content="https://i.imgur.com/FtcF9ZP.png">
</head>
<body class="transition-colors">
<main>
<div class="relative flex min-h-screen flex-col items-center justify-center bg-white dark:bg-black transition-colors overflow-hidden px-4">
<!-- Background effect -->
<div class="flex inset-0 overflow-hidden">
<div class="jumbo absolute opacity-60"></div>
</div>
<div class="box-main w-full max-w-xl mx-auto">
<div id="app" class="relative z-10 p-6 sm:p-10 w-full text-left shadow-lg rounded-xl bg-white dark:bg-slate-900/80 dark:backdrop-blur dark:ring-1 dark:ring-inset dark:ring-white/10">
<!-- Header Section -->
<header class="mb-8 text-center">
<h1 class="relative flex flex-col xs:flex-row items-center justify-center text-4xl sm:text-5xl font-bold text-gray-800 dark:text-white dark:opacity-95 transition-colors">
<span>MobaXterm</span>
<span class="mt-2 xs:mt-0 xs:ml-2 rounded-xl bg-current p-2 text-[0.7em] leading-none">
<span class="text-white dark:text-black">Keygen</span>
</span>
</h1>
<!-- Version Badge -->
<div class="mt-4 inline-flex items-center px-3 py-1 rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-sm font-medium text-white"> Compatible with versions 20.X and 25.0 </div>
<!-- Theme Toggle -->
<div class="mt-4">
<button onclick="toggleTheme()" class="px-3 py-1 border border-stone-200 rounded-full drop-shadow-sm text-sm text-stone-800 dark:text-white bg-white/40 dark:bg-black/40 backdrop-blur-lg hover:border-stone-300 transition-colors dark:border-stone-500 dark:hover:border-stone-400"> Toggle Theme </button>
</div>
</header>
<!-- Form Section -->
<form>
<div class="space-y-6">
<div>
<label for="licenseType" class="block text-lg text-gray-700 dark:text-gray-300">Edition:</label>
<select name="licenseType" id="licenseType" v-model="licenseType" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none">
<option value="" disabled>Select an option</option>
<option v-for="(val, key) in LICENSE_TYPES" :value="val">{{key}}</option>
</select>
</div>
<div>
<label for="userName" class="block text-lg text-gray-700 dark:text-gray-300">Username:</label>
<div class="relative">
<input type="text" id="userName" v-model="userName" @input="validateUserName" placeholder="Example defaultUser" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none" />
</div>
</div>
<div>
<label for="versionName" class="block text-lg text-gray-700 dark:text-gray-300">Version:</label>
<div class="relative">
<input type="text" id="versionName" v-model="versionName" @input="validateVersion" placeholder="Example 24.4" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none" />
</div>
</div>
<div>
<label for="userNum" class="block text-lg text-gray-700 dark:text-gray-300">Number of users:</label>
<div class="relative">
<input type="number" id="userNum" v-model="userNum" @input="validateUserNum" placeholder="Example 1" min="1" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none" />
</div>
</div>
<!-- Download Button -->
<div class="text-center pt-4">
<button type="button" @click="validateAndGenerate" class="w-full sm:w-auto px-6 py-3 bg-blue-600 text-white rounded-lg shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors duration-200"> Download Key </button>
</div>
</div>
</form>
<!-- Footer -->
<footer class="mt-8 pt-6 border-t border-slate-200 dark:border-slate-700">
<div class="flex flex-col items-center space-y-4">
<div class="flex items-center space-x-2">
<span class="text-sm text-slate-600 dark:text-slate-400">Created with</span>
<span class="animate-pulse text-red-500">❤</span>
<span class="text-sm text-slate-600 dark:text-slate-400">by</span>
<span class="text-sm font-semibold bg-clip-text text-transparent bg-gradient-to-r from-purple-500 to-pink-500"> Zarfala </span>
</div>
<p class="text-sm text-slate-600 dark:text-slate-400" style="margin-top: 0;"> UI/UX Design optimized for <span class="inline-block">
<span class="text-blue-500 font-semibold">Computer</span>
<span class="text-green-500 font-semibold">& Mobile</span>
</span>
</p>
<div class="text-xs text-slate-500 dark:text-slate-500" style="margin-top: 5px;"> v2.0 © 2025 All rights reserved </div>
</div>
</footer>
</div>
</div>
</div>
<!-- Scripts -->
<script src="./js/vue.min-2.6.12.js"></script>
<script src="./js/FileSaver.js"></script>
<script src="./js/jszip.js"></script>
<script src="./js/fire.js"></script>
<script src="./js/alert.js"></script>
<script type="module">
import {
LicenseType,
generateLicense
} from './js/mobaXtermGenerater.js'
new Vue({
el: '#app',
data() {
return {
LICENSE_TYPES: LicenseType,
licenseType: '',
userName: '',
versionName: '',
userNum: '',
errors: {
userName: '',
versionName: '',
userNum: ''
}
}
},
methods: {
validateUserName() {
const regex = /^[a-zA-Z]+$/;
if (!regex.test(this.userName)) {
this.errors.userName = 'Only letters can be used';
return false;
}
this.errors.userName = '';
return true;
},
validateVersion() {
const regex = /^[1-9][0-9]*\.?\d{0,1}$/;
if (!regex.test(this.versionName)) {
this.errors.versionName = 'Enter a valid version (e.g., 24.4)';
return false;
}
this.errors.versionName = '';
return true;
},
validateUserNum() {
const regex = /^[1-9]+\d*$/;
if (!regex.test(this.userNum)) {
this.errors.userNum = 'Enter a valid number greater than 0';
return false;
}
this.errors.userNum = '';
return true;
},
validateAndGenerate() {
// Validate all fields
const isUserNameValid = this.validateUserName();
const isVersionValid = this.validateVersion();
const isUserNumValid = this.validateUserNum();
// Only generate if all validations pass
if (isUserNameValid && isVersionValid && isUserNumValid) {
let versionNameArr = this.versionName.split('.');
const majorVersion = parseInt(versionNameArr[0]);
const minorVersion = versionNameArr.length === 2 ? (parseInt(versionNameArr[1]) || 0) : 0;
let licenseStr = generateLicense(this.licenseType, this.userName, this.userNum, majorVersion, minorVersion);
this.generateLicenseFile(licenseStr);
}
},
generateLicenseFile(licenseStr) {
let zip = new JSZip();
zip.file("Pro.key", licenseStr);
zip.generateAsync({
type: "blob"
}).then(function(content) {
saveAs(content, "Custom.mxtpro");
});
}
},
components: {
'my-input': {
template: `
<div class="my-input w-full sm:w-3/4 mx-auto">
<input class="w-full p-2 rounded-lg border dark:bg-slate-800 dark:border-slate-600 dark:text-white" :id="idattr" :placeholder="placeholderattr" v-model="value" required/>
<div :class="validationTipsDiplay" class="my-input-tips-wrap">
<span class="my-input-tips">{{validationtips}}</span>
<div class="my-input-arrow"></div>
</div>
</div>`,
data() {
return {
value: this.valueattr,
validationTipsDiplay: 'hide',
tipsDisplayTimeout: undefined
}
},
props: {
idattr: {
type: String,
default: ''
},
placeholderattr: {
type: String,
default: ''
},
valueattr: '',
validation: {
type: String,
default: ''
},
validationtips: ''
},
watch: {
valueattr(newVal, oldVal) {
this.value = newVal
},
value(newVal, oldVal) {
if (newVal && this.validation) {
let reg = new RegExp(this.validation);
if (!reg.test(newVal)) {
this.validationTipsDiplay = '';
this.value = oldVal;
if (this.tipsDisplayTimeout) clearTimeout(this.tipsDisplayTimeout);
var _this = this;
this.tipsDisplayTimeout = setTimeout(function() {
_this.tipsDisplayTimeout = undefined;
_this.validationTipsDiplay = 'hide';
}, 1000);
return;
}
}
this.$emit('set-data', newVal);
}
}
}
}
});
</script>
</body>
</html>