-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
244 lines (223 loc) · 12.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<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 -->
<title>MobaXterm Keygen</title>
<!-- SEO meta tags -->
<meta name="description" content="Website created with love by Zarfala" />
<!-- Favicon -->
<link rel="icon" href="https://i.imgur.com/FtcF9ZP.png" />
<!-- CSS -->
<link href="./css/pure-min.css?=2" rel="stylesheet" />
<link href="./css/style.css" rel="stylesheet" />
<link href="./css/fire.css" rel="stylesheet" />
<!-- JS -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: "class",
}
</script>
<!-- Open Graph data -->
<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" />
<!-- Twitter Card data -->
<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 flex-col h-[100vh] items-center justify-center bg-white dark:bg-black transition-colors inset-0 overflow-hidden">
<div class="flex inset-0 overflow-hidden">
<div class="jumbo absolute opacity-60"></div>
</div>
<div class="box-main">
<div id="app"
class="inset-0 overflow-hidden p-8 max-w-lg w-full text-center shadow-xl sm:rounded-xl bg-white dark:bg-slate-900/70 dark:backdrop-blur dark:ring-1 dark:ring-inset dark:ring-white/10">
<div class="content">
<div class="pure-form pure-form-aligned auto-center">
<fieldset>
<legend>
<h1
class="relative flex items-center text-5xl font-bold text-gray-800 dark:text-white dark:opacity-95 transition-colors">
MobaXterm
<span class="ml-1 rounded-xl bg-current p-2 text-[0.7em] leading-none">
<span class="text-white dark:text-black">Keygen</span>
</span>
</h1>
<!-- Badge de versión
<div class="mt-2 inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-500 text-white dark:bg-blue-700">
Current version 24.3
</div> -->
<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>
</legend>
<div class="mt-2 pure-g">
<div class="mt-4 pure-control-group pure-u-1">
<label for="licenseType"
class="mt-6 text-lg text-slate-600 text-center max-w-3xl mx-auto dark:text-slate-400">Edition:</label>
<select name="licenseType" id="licenseType" v-model="licenseType" class="pure-input-1-2">
<option value="" disabled>Select an option</option>
<option v-for="(val, key) in LICENSE_TYPES" :value="val">{{key}}</option>
</select>
</div>
<div class="pure-control-group pure-u-1">
<label for="userName"
class="mt-6 text-lg text-slate-600 text-center max-w-3xl mx-auto dark:text-slate-400">Username:</label>
<my-input :idattr="'userName'" :validation="'^[a-zA-Z]+$'" :valueattr="userName"
:validationtips="'Only letters can be used'"
:placeholderattr="'Example defaultUser'" @set-data="setUserName">
</my-input>
</div>
<div class="pure-control-group pure-u-1">
<label for="versionName"
class="mt-6 text-lg text-slate-600 text-center max-w-3xl mx-auto dark:text-slate-400">Version:</label>
<my-input :idattr="'versionName'" :validation="'^[1-9][0-9]*\\.?\\d{0,1}$'"
:validationtips="'Fractions with only 1 digit after the decimal point'"
:valueattr="versionName" :placeholderattr="'Example 24.3'"
@set-data="setVersionName"></my-input>
</div>
<div class="pure-control-group pure-u-1">
<label for="userNum"
class="mt-6 text-lg text-slate-600 text-center max-w-3xl mx-auto dark:text-slate-400">Number
of users:</label>
<my-input :idattr="'userNum'" :validation="'^[1-9]+\\d*$'" :valueattr="userNum"
:placeholderattr="'Example 1'"
:validationtips="'Numbers with a minimum value of 1'"
@set-data="setUserNum">
</my-input>
</div>
<div class="m-8 max-w-lg w-full mx-auto flex justify-center text-center">
<button type="submit" style="letter-spacing: normal !important;"
class="bg-slate-900 hover:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50 text-white font-semibold h-12 px-6 rounded-lg w-full flex items-center justify-center sm:w-auto dark:bg-sky-500 dark:highlight-white/20 dark:hover:bg-sky-400"
@click.stop="generate">Download key</button>
</div>
</div>
<div class="mt-6 text-xs text-slate-600 dark:text-slate-400 flex flex-col items-center">
<p>Created with ❤ by Zarfala.</p>
</div>
<p class="mt-2 text-sm text-slate-600 dark:text-slate-400">UI/UX Design created for <span class="text-blue-500 font-semibold">Computer</span></p>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- JS -->
<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'
var app = new Vue({
el: '#app',
data() {
return {
LICENSE_TYPES: LicenseType,
licenseType: 1,
userName: 'defaultUser',
versionName: '24.3',
userNum: 1,
}
},
methods: {
setUserName(newVal) {
this.userName = newVal;
},
setVersionName(newVal) {
this.versionName = newVal;
},
setUserNum(newVal) {
this.userNum = newVal;
},
generate() {
if (!this.userName) {
alert('Please fill in the user name');
return;
}
if (!this.versionName) {
alert('Please fill in the version number');
return;
}
if (!this.userNum) this.userNum = 1;
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">
<input :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>