forked from heliomarpm/udemy-downloader-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
501 lines (460 loc) · 22.4 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
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<!DOCTYPE html>
<html>
<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"> -->
<!-- TITULO ADICIONADO VIA INDEX.JS -->
<!-- <title>Udeler | Udemy Course Downloader</title> -->
<link rel="stylesheet" href="assets/css/semantic.min.css" />
<link rel="stylesheet" href="assets/css/style.css" />
<script src="./renderer.js"></script>
</head>
<body>
<div class="ui basic subtitle modal">
<div class="ui icon header">
<i class="closed captioning icon"></i>
<script>translateWrite("Select Subtitle")</script>
</div>
<div class="content">
<div class="ui fluid selection dropdown">
<input type="hidden" name="subtitle" />
<i class="dropdown icon"></i>
<div class="default text">
"Subtitle Language"
<!-- <script>translateWrite("Subtitle Language")</script> -->
</div>
</div>
</div>
</div>
<div class="ui basic update-available modal">
<div class="ui icon header">
<i class="gift icon"></i>
<script>translateWrite("New Update Available")</script>
</div>
<div class="content">
<p>
<center>
<script>translateWrite("A new version of Udeler is available. You can download the latest version from github releases page")</script>
</center>
</p>
</div>
<div class="actions" style="text-align: center;">
<div class="ui red cancel inverted button">
<i class="remove icon"></i>
<script>translateWrite("Cancel")</script>
</div>
<div class="ui green ok inverted download-update button">
<i class="checkmark icon"></i>
<script>translateWrite("Download")</script>
</div>
</div>
</div>
<script>
const $ = (jQuery = require("jquery"));
</script>
<script src="assets/js/semantic.min.js"></script>
<script type="text/javascript">
var template = `
<div class="ui center aligned login grid">
<div class="ui login dimmer">
<div class="ui big text loader">${translate("Logging in")}</div>
</div>
<div class="ui authenticator dimmer">
<div class="ui big text loader">
${translate("Awaiting Login Request")}
</div>
</div>
<div class="row">
<div class="ten wide column">
<h2 class="ui icon grey login header">
<i class="circular purple user icon"></i>
${translate("Udemy Login")}
</h2>
</div>
</div>
<div class="row">
<div class="ten wide column">
<form class="ui form">
<!-- <div class="field">
<div class="ui fluid label input">
<input type="text" name="username" id="username" placeholder="${translate("Username")}">
<input type="password" name="userpass" id="userpass" placeholder="${translate("Password")}">
</div>
</div> -->
<div class="field">
<div class="ui fluid label checkbox">
<input type="checkbox" name="business" id="business">
<label for="business">${translate("Udemy Business")} ?</label>
</div>
</div>
<div class="field">
<div id="divsubdomain" class="ui right labeled input" style="display: none" >
<input type="text" id="subdomain" name="subdomain" placeholder="${translate("Udemy Business Name")}">
<span class="ui tag label">.udemy.com</span>
</div>
</div>
</form>
<div class="ui horizontal divider">
${translate("Choose Login Method")}
</div>
<div class="ui fluid icon buttons">
<!-- <button class="ui purple button" onclick="loginWithPassword()" style="margin-right: 1px">
<i class="key icon"></i> ${translate("Using Password")}
</button>
<div class="or"></div> -->
<button class="ui purple button" type="button" onclick="loginWithUdemy()">
${translate("Get Credentials")}
</button>
</div>
<div class="ui horizontal divider">
<i class="exchange icon"></i>
</div>
<!-- <div class="ui fluid icon buttons">
<button class="ui blue login disabled authenticator button" style="margin-right: 1px">
<i class="user secret icon"></i> Authenticator
</button>
<div class="or"></div> -->
<button class="ui fluid violet button" onclick="loginWithAccessToken()" style="margin-left: 1px">
<i class="key icon"></i> Access Token
</button>
<!-- </div> -->
</div>
</div>
</div>
<div class="ui dashboard">
<div class="ui logout dimmer">
<div class="ui big text loader">${translate("Logging Out")}</div>
</div>
<div class="ui courses dimmer">
<div class="ui big text loader">${translate("Loading Courses")}</div>
</div>
<div class="ui course dimmer">
<div class="ui big text loader">${translate("Getting Info")}</div>
</div>
<div class="ui about dimmer">
<div class="ui big text loader">${translate("Checking for Updates")}</div>
</div>
<div class="ui visible fixed vertical inverted sidebar labeled icon menu ${settings.get("general.language") == "Arabic" ? "right" : "left"}">
<a class="active purple courses-sidebar item">
<i class="file video icon"></i>
${translate("Courses")}
</a>
<a class="downloads-sidebar item">
<i class="download icon"></i>
${translate("Downloads")}
</a>
<a class="settings-sidebar item">
<i class="wrench icon"></i>
${translate("Settings")}
</a>
<a class="about-sidebar item">
<i class="info icon"></i>
${translate("About")}
</a>
<a class="logger-sidebar item">
<i class="code icon"></i>
</a>
<div class="ui footer">
<a class="logout-sidebar item">
<i class="power off icon"></i>
${translate("Logout")}
</a>
</div>
</div>
<div class="content">
<div class="ui courses section">
<form class="ui search form">
<div class="ui fluid search">
<div class="ui fluid icon input">
<input class="prompt" type="text" placeholder="${translate("Search Courses")}">
<i class="search icon"></i>
</div>
</div>
</form>
<div class="ui divided unstackable courses items attached segment" style="margin-top: 5px !important;"></div>
</div>
<div class="ui downloads section">
<h5 class="ui top attached header">
<i class="ui download icon"></i> ${translate("Downloads")}
</h5>
<div class="ui divided unstackable courses items attached segment" style="margin-top: 0px !important;"></div>
</div>
<div class="ui settings section">
<form class="ui form">
<h5 class="ui top attached header">
<i class="ui setting icon"></i> ${translate("Application Settings")}
</h5>
<div class="ui attached segment">
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="check-new-version">
<label>${translate("Check for a new version on startup")}</label>
</div>
</div>
<div class="field">
<label>${translate("Language (Requires App Restart)")}</label>
<div class="ui fluid search selection language dropdown">
<input type="hidden" name="language">
<i class="dropdown icon"></i>
<div class="default text"></div>
<div class="menu">
<div class="item" data-value="English">English</div>
</div>
</div>
</div>
<div class="field">
<label>${translate("Default Subtitle for download")}</label>
<div class="ui fluid search selection defaultSubtitle dropdown">
<input type="hidden" name="defaultSubtitle">
<i class="dropdown icon"></i>
<div class="defaultSubtitle text"></div>
<div class="menu">
<div class="item" data-value=""></div>
<div class="item" data-value="English">English</div>
</div>
</div>
</div>
</div>
<h5 class="ui top attached header">
<i class="ui download icon"></i> ${translate("Download Settings")}
</h5>
<div class="ui attached segment">
<div class="field">
<label>${translate("Download Path")}</label>
<div class="ui action input">
<input type="text" readonly name="downloadpath">
<label class="ui icon button btn-file" onclick="selectDownloadPath()">
<i class="folder icon"></i>
</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="auto-start-download">
<label>${translate("Start pending downloads at startup")}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="continue-downloading-encrypted">
<label>${translate("Keep downloading even if the course is DRM protected")}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="enabledownloadstartend">
<label>${translate("Enable Download Start/End")}</label>
</div>
</div>
<div class="two unstackable fields">
<div class="field">
<label>${translate("Download Start")}</label>
<input placeholder="${translate("Start Download at")}" type="number" min="1" name="downloadstart">
</div>
<div class="field">
<label>${translate("Download End")}</label>
<input placeholder="${translate("End Download at")}" type="number" min="1" name="downloadend">
</div>
</div>
<div class="ui divider"></div>
<div class="field">
<label>${translate("Video Quality")}</label>
<div class="ui fluid search selection dropdown">
<input type="hidden" name="videoquality">
<i class="dropdown icon"></i>
<div class="default text"></div>
<div class="menu">
<div class="item" data-value="Auto">${translate("Auto")}</div>
<div class="item" data-value="Lowest">${translate("Lowest")}</div>
<div class="item" data-value="360p">360p</div>
<div class="item" data-value="480p">480p</div>
<div class="item" data-value="720p">720p</div>
<div class="item" data-value="1080p">1080p</div>
<div class="item" data-value="Highest">${translate("Highest")}</div>
</div>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="skipattachments">
<label>${translate("Skip Attachments")}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="skipsubtitles">
<label>${translate("Skip Subtitles")}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="seq-zero-left">
<label>${translate("Enumerate download with zero left")}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="autoretry">
<label>${translate("Auto Retry on Error (Experimental)")}</label>
</div>
</div>
</div>
<div class="ui horizontal divider"></div>
<button class="ui fluid green button" type="submit">
${translate("Save")}
</button>
</form>
</div>
<div class="ui about section">
<div class="ui segment">
<h4 class="ui center aligned icon header">
<!-- <i class="grey file code outline icon"></i> -->
<!-- <i class="grey download icon"></i> -->
<img src="./assets/images/logo64.png" style="height: 64px; width: 64px"/>
<br>
v${appVersion}
</h4>
<!-- <div class="ui clearing divider"></div> -->
<div class="ui fluid buttons">
<button class="ui primary button check-updates" style="margin-right: 1px">
${translate("Check for updates")}
</button>
</div>
<h4 class="ui header">
<i class="cloud download icon"></i></i>${translate("Old version")} 1.8.2
</h4>
<div class="ui fluid buttons">
<button class="ui secondary button old-version-linux" style="margin-left: 1px">Linux</button>
<div class="or"></div>
<button class="ui button old-version-mac" style="margin-right: 1px">Mac x64</button>
</div>
<div class="ui horizontal divider"></div>
<div class="ui clearing divider"></div>
<h4 class="ui header">
<i class="heart icon"></i>${translate("Donate")}
</h4>
<p>
${translate(
"Udeler is free and without any ads. If you appreciate that, please consider donating to the Developer."
)}
</p>
<br>
<a href="https://www.paypal.com/donate?business=KBVHLR7Z9V7B2&no_recurring=0
&item_name=${translate("Udeler is free and without any ads. If you appreciate that, please consider donating to the Developer.").replace(" ", "+")}
¤cy_code=USD" class="ui centered donate grid">
<img src="assets/images/donate-qrcode.png" alt="${translate("Donate")} (for maintainer)"/>
</a>
<div class="ui horizontal divider"></div>
<div class="ui clearing divider"></div>
<h3 class="ui header">
<i class="linkify icon"></i>${translate("Links")}
</h3>
<div class="ui relaxed divided list">
<div class="item">
<i class="large github middle aligned icon"></i>
<div class="content">
<a class="header" href="https://github.com/heliomarpm/udemy-downloader-gui">heliomarpm/udemy-downloader-gui</a>
<div class="description">${translate("Active Repository")}</div>
</div>
</div>
<div class="item">
<i class="large world middle aligned icon"></i>
<div class="content">
<a class="header" href="https://steemkr.com/utopian-io/@moenawar/my-new-logo-design-proposal-for-udeler">@Moenawar</a>
<div class="description">${translate("Icon Designer")}</div>
</div>
</div>
<div class="ui horizontal divider"></div>
<!-- <div class="ui clearing divider"></div> -->
<h3 class="ui header">
<i class="connectdevelop icon"></i>${translate("Collaborate")}
</h3>
<div class="item">
<i class="large github middle aligned icon"></i>
<div class="content">
<a class="header" href="https://github.com/heliomarpm/udemy-downloader-gui/issues">udemy-downloader-gui/issues</a>
<div class="description">${translate("Report Bug")}</div>
</div>
</div>
<div class="item">
<i class="large github middle aligned icon"></i>
<div class="content">
<a class="header" href="https://github.com/heliomarpm/udemy-downloader-gui/pulls">udemy-downloader-gui/pulls</a>
<div class="description">${translate("Contribute")}</div>
</div>
</div>
</div>
<div class="ui horizontal divider"></div>
<div class="ui clearing divider"></div>
<h3 class="ui header">
<i class="user secret icon"></i>FaisalUmair - ${translate("The great creator of this project")}
</h3>
<div class="ui relaxed divided list">
<div class="item">
<i class="large github middle aligned icon"></i>
<div class="content">
<a class="header" href="https://github.com/FaisalUmair/udemy-downloader-gui">FaisalUmair/udemy-downloader-gui</a>
<div class="description">${translate("Repository")} (${translate("Archived")})</div>
</div>
</div>
<div class="item">
<i class="large github middle aligned icon"></i>
<div class="content">
<a class="header" href="https://github.com/FaisalUmair">FaisalUmair</a>
<div class="description">${translate("Developer")}</div>
</div>
</div>
<div class="item">
<i class="large world middle aligned icon"></i>
<div class="content">
<a class="header" href="http://thewebartisans.net/">thewebartisans.net</a>
<div class="description">${translate("Website")}</div>
</div>
</div>
<h4 class="ui header">
<i class="heart icon"></i>${translate("Donate")}
</h4>
<br>
<a href="https://www.udeler.com/donate" class="ui centered donate grid">
<img src="assets/images/donate.png" alt="${translate("Donate")}"/>
</a>
</div>
</div>
</div>
<div class="ui logger section">
<h5 class="ui top attached header">
<i class="ui code icon"></i> ${translate("Console.Log")}
</h5>
<div class="ui list divided unstackable attached segment" style="margin-top: 0px !important;">
</div>
</div>
</div>
</div>
`;
$("body").prepend(template);
if (settings.get("general.language") == "Arabic") {
$(".ui.dashboard .content")
.css("margin-left", "10px")
.css("width", "80%");
}
var $languageDropdown = $(".language.dropdown .menu");
$.getJSON("locale/meta.json", function (data) {
$.each(data, function (key) {
$languageDropdown.append(
`<div class="item" data-value=${key}>${key}</div>`
);
});
});
var $defaultSubtitleDropdown = $(".defaultSubtitle.dropdown .menu");
$.getJSON("locale/meta.json", function (data) {
$.each(data, function (key) {
$defaultSubtitleDropdown.append(
`<div class="item" data-value=${key}>${key}</div>`
);
});
});
</script>
<script src="assets/js/app.js"></script>
</body>
</html>