forked from Omega-Numworks/Omega-External
-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.html
189 lines (172 loc) · 9.18 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
<!DOCTYPE html>
<!--
Copyright (C) 2019 Damien Nicolet
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<html ng-app="nwas">
<head>
<meta charset="utf-8">
<title translate="TITLE"></title>
<link rel="icon" type="image/png" href="images/external_icon.png">
<link rel="stylesheet" href="libs/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="libs/cropperjs/cropper.min.css">
<link rel="stylesheet" href="index.css">
<script src="libs/jquery/jquery.min.js"></script>
<script src="libs/angularjs/angular.min.js"></script>
</head>
<body class="bg-light ng-cloak">
<div class="container" ng-controller="main">
<div class="py-5 text-center">
<img class="d-block mx-auto mb-4" src="images/external_icon.png" alt="" width="52" height="52">
<h2 translate="TITLE"></h2>
<!-- <p class="lead" translate="LEAD"></p> -->
<p class="lead" ng-hide="uploading">{{ 'FIRMWARE' | translate }}<a href="https://getupsilon.web.app/">{{ 'HERE' | translate }}</a></p>
<p class="lead" ng-hide="uploading">{{ 'DISCLAIM' | translate }}<a href="https://github.com/Lauryy06/Upsilon-External" target="_blank">{{ 'HERE' | translate }}</a></p>
</div>
<div class="alert alert-danger" role="alert" ng-hide="webUSB">
{{ 'NO_WEB_USB' | translate }} <a href="https://www.google.com/chrome/">Google Chrome</a>
</div>
<div class="row" ng-hide="uploading || !webUSB">
<div class="col-md-4 order-md-2 mb-4">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted" translate="SELECTED_APPLICATIONS"></span>
<span class="badge badge-secondary badge-pill">{{selectedApps.length}}</span>
</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-condensed" ng-if="wallpaper.imagesrc != null">
<div class="my-auto">
<h6 class="my-0"><img ng-src="{{wallpaper.imagesrc}}" alt="" width="40" height="28" class="mr-3">{{wallpaper.name}}</h6>
</div>
<span><button class="btn btn-primary btn-sm" ng-click="removeWallpaper()" translate="REMOVE"></button></span>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed" ng-repeat="app in selectedApps">
<div class="my-auto">
<h6 class="my-0"><img ng-src="apps/{{app.name}}/icon.png" alt="" width="26" height="26" class="mr-3">{{app.name}}</h6>
<!-- <small class="text-muted">12 Ko</small> -->
</div>
<span><button class="btn btn-primary btn-sm" ng-click="removeApplication(app)" translate="REMOVE"></button></span>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed" ng-repeat="file in customFiles">
<div class="my-auto">
<h6 class="my-0">{{file.name}}</h6>
<!-- <small class="text-muted">12 Ko</small> -->
</div>
<span><button class="btn btn-primary btn-sm" ng-click="removeFile(file)" translate="REMOVE"></button></span>
</li>
<!-- <li class="list-group-item d-flex justify-content-between">
<span>Total (ko)</span>
<strong>45 ko</strong>
</li> -->
</ul>
<div class="card p-2 mb-3">
<div class="custom-file">
<input type="file" class="custom-file-input" lang="{{locale}}" ng-file-select multiple>
<label class="custom-file-label" translate="CUSTOM_FILE"></label>
</div>
</div>
<button class="btn btn-primary btn-lg btn-block" ng-click="upload()">{{ installText | translate }}</button>
</div>
<div class="col-md-8 order-md-1">
<h4 class="mb-3" translate="WALLPAPER"></h4>
<div class="card p-2 mb-3">
<div>
<div class="custom-file">
<input id="wallpaper-file-input" type="file" accept="image" class="custom-file-input" lang="{{locale}}" ng-wallpaper-select>
<label class="custom-file-label" id="wallpaper-name" translate="WALLPAPER_FILE"></label>
</div>
</div>
</div>
<h4 class="mb-3" translate="AVAILABLE_APPLICATIONS"></h4>
<div class="row pb-3">
<div class="col-md-12">
<div class="card mb-3" ng-repeat="app in apps">
<div class="row no-gutters">
<div class="col-md-2 text-center m-auto">
<img ng-src="apps/{{app.name}}/icon.png" alt="" width="52" height="52">
</div>
<div class="col-md-10">
<div class="card-body">
<h5 class="card-title">{{app.name}}<!--<span class="text-muted float-right">{{app.size}}</span>--></h5>
<p class="card-text">{{app.description[locale]}}</p>
<p class="card-text" ng-show="app.link"><a ng-href="{{app.link}}">{{app.link}}</a></p>
<p class="card-text"><button class="btn btn-primary btn-sm" ng-click="addApplication(app)" translate="ADD"></button></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" ng-show="uploading">
<div class="col-md-12">
<p>{{lastAction || 'Progress'}}</p>
<div class="progress">
<div class="progress-bar" role="progressbar" style="transition: none;" ng-style="{width: progress + '%'}"></div>
</div>
<p ng-show="allDone" class="text-center mt-5"><button class="btn btn-primary" ng-click="reload()" translate="ALL_DONE"></button></p>
<div class="card text-white bg-danger mt-3" ng-show="error">
<div class="card-header" translate="ERROR"></div>
<div class="card-body">
<p class="card-text">{{error}}</p>
<p class="card-text" translate="PLEASE_RELOAD"></p>
</div>
</div>
</div>
</div>
<div class="modal" id="imageModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog-lg m-5" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">{{ 'CROP_IMAGE_TITLE' | translate }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div id="cropperDiv">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'CANCEL' | translate }}</button>
<button type="button" class="btn btn-primary" ng-click="saveCroppedWallpaper()">{{ 'CROP_IMAGE_SAVE' | translate }}</button>
</div>
</div>
</div>
</div>
<footer class="my-5 pt-5 text-muted text-center text-small">
<p class="mb-1" translate="ACKNOWLEDGMENTS"></p>
<ul class="list-inline">
<li class="list-inline-item"><a href="https://www.numworks.com/">NumWorks</a></li>
<li class="list-inline-item"><a href="https://github.com/devanlai/webdfu">webdfu</a></li>
<li class="list-inline-item"><a href="https://www.gnu.org/software/binutils/">GNU Binutils</a></li>
<li class="list-inline-item"><a href="https://emscripten.org/">emscripten</a></li>
<li class="list-inline-item"><a href="https://fengyuanchen.github.io/cropperjs/">cropperjs</a></li>
</ul>
</footer>
</div>
<script src="libs/binutils/objcopy.js"></script>
<script src="libs/binutils/ld.js"></script>
<script src="libs/tarballjs/tarball.js"></script>
<script src="libs/webdfu/dfu-util/dfu.js"></script>
<script src="libs/webdfu/dfu-util/dfuse.js"></script>
<script src="libs/angularjs/angular-sanitize.min.js"></script>
<script src="libs/angular-translate/angular-translate.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script src="libs/lz4js/util.js"></script>
<script src="libs/lz4js/xxh32.js"></script>
<script src="libs/lz4js/lz4.js"></script>
<script src="libs/cropperjs/cropper.min.js"></script>
<script src="index.js"></script>
<script src="apps/apps.js"></script>
</body>
</html>