-
Notifications
You must be signed in to change notification settings - Fork 1
/
listChanged.html
361 lines (279 loc) · 10.8 KB
/
listChanged.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Changed files</title>
<link rel="stylesheet" type="text/css" href="color_styles.css" />
<script src="listChanged.js"></script>
<!-- As in settings.html -->
<style>
body{
font-family: Arial;
font-size: 11pt;
background: var(--body-background);
color: var(--body-text);
}
.find-in-nw-current,
.find-in-nw-of{
color: black;
}
th{
border-collapse: collapse;
text-align:left;
font-size: 12pt;
padding: 6px;
}
table{
border-collapse: collapse;
text-align:left;
}
tr{
border-bottom: 2px solid #ccc;
font-size: 10pt;
}
td{
padding: 6px;
right: 0px;
}
.localFolder{
width: 80%;
}
.icon {
display: inline-block;
line-height: 30px;
padding-left: 17px;
}
.added {
background: url("images/added.png") no-repeat scroll 0 0 transparent;
display: inline-block;
padding-left: 1.2em;
vertical-align:middle;
background-size: 1em;
}
.modified {
background: url("images/modified.png") no-repeat scroll 0 0 transparent;
display: inline-block;
padding-left: 1.2em;
vertical-align:middle;
background-size: 1em;
}
.deleted {
background: url("images/deleted.png") no-repeat scroll 0 0 transparent;
display: inline-block;
padding-left: 1.2em;
vertical-align:middle;
background-size: 1em;
}
.renamed {
background: url("images/renamed.png") no-repeat scroll 0 0 transparent;
display: inline-block;
padding-left: 1.2em;
vertical-align:middle;
background-size: 1em;
}
</style>
<!-- https://www.w3schools.com/howto/howto_js_collapsible.asp -->
<style>
.collapsible {
background-color: #777;
color: white;
cursor: pointer;
padding: 8px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
}
.active, .collapsible:hover {
background-color: #555;
}
.collapsible:after {
content: '\002B'; # Unicode character for "plus" sign (+)
color: white;
font-weight: bold;
float: left;
margin-left: 5px;
}
.active:after {
content: "\2212"; # Unicode character for "plus" sign (-)
}
.content {
padding: 0 18px;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
img[src="images/warning.png"]
{
filter: invert( 0% );
}
</style>
</head>
<body class='light'>
<!-- Dark mode on/off , zoom-->
<script>
if (localState.dark){
document.body.classList.remove('light');
document.body.classList.add('dark');
}
window.document.body.style.zoom = global.state.zoom;
</script>
<h2>List of modified files
<!-- Help button -->
<img id="about-icon" style='vertical-align:middle;float:right; padding-right: 15px' height="17" width="17"
onclick="let evt = {}; evt.name='Modified Files';opener._callback('help',evt);"
onmouseover="document.getElementById('about-icon').src='images/questionmark_hover.png' "
onmouseout="document.getElementById('about-icon').src='images/questionmark_black.png' "
src="images/questionmark_black.png" >
<!-- Search button -->
<img id="find-icon" style='vertical-align:middle;float:right; padding-right: 15px' height="17" width="17"
onclick="findInNw.positionSearchBoxGraph()"
onmouseover="document.getElementById('find-icon').src='images/find_hover.png' "
onmouseout="document.getElementById('find-icon').src='images/find_black.png' "
src="images/find_black.png" >
<!-- File range buttons -->
<div id="fileRange" style="display:none">
<span id='down' style="cursor:pointer; zoom: 0.8;"
onclick="
lowRange = Math.max(1, lowRange - rangeWidth);
injectIntoJs(document);"
> ◀</span>
<span id="lowRange">1</span> - <span id="highRange">1000</span>
<span id='up' style="cursor:pointer; zoom: 0.8;"
onclick="
if ( ( lowRange + rangeWidth ) <= maxRange){
lowRange = lowRange + rangeWidth;
}
; injectIntoJs(document);"
> ▶</span>
</div>
</h2>
<p>
</p>
<!-- CHANGED FILES -- this title is changed in listChanges.js if history mode-->
<table style="width:100%">
<thead><tr>
<th class="path">Changed files</th>
<th class="path"> <span id="diffAllSpan"> </span></th>
<!-- <th class="path"> <span id="diffAllSpan" style="color: blue; cursor: pointer" onclick="_callback('diffLinkAll',this)"> (diff all files) </span> </th> -->
</tr></thead>
<tbody id="listFilesTableBody" >
</tbody>
</table>
<div id="commitFootnote" class="footnoteText">
<sup class="footnoteText">*</sup> Checkboxes marks files to be commited. Uncheck a file to exclude it from next commit.
</div>
<div id="applyButtonDiv">
<br>
<div style="float: right; margin-right: 10px">
<button onclick="document.getElementById('restoreAllDialog').showModal();">
Restore all
<img height="12" width="12" src="images/warning.png">
</button>
</div>
<br>
</div>
<!-- Warning dialog for restore all -->
<dialog id="restoreAllDialog" class="error">
<p>This will remove changes to all files, and restore them to their stored state. Do your really want to discard the changes? </p>
<button id="yes"
onclick="document.getElementById('restoreAllDialog').close();_callback('applyRestoreAllButton',' ');">
Yes
</button>
<button id="no"
onclick="document.getElementById('restoreAllDialog').close();selectedFile='';">
No
</button>
</dialog>
<!-- Warning dialog for restore -->
<dialog id="restoreDialog" class="error">
<p>This will remove all changes, and restore the file to its stored state. Do your really want to discard the changes? </p>
<button id="yes"
onclick="document.getElementById('restoreDialog').close();_callback('discardLink',selectedFile);">
Yes
</button>
<button id="no"
onclick="document.getElementById('restoreDialog').close();selectedFile='';">
No
</button>
</dialog>
<!-- Warning dialog for restore-renamed -->
<dialog id="restoreRenameDialog" class="error">
<p>This will undo the rename, and restore the file to its stored state. Do your really want to restore the renaming? </p>
<button id="yes"
onclick="document.getElementById('restoreRenameDialog').close();_callback('restoreRenameLink',selectedFile);">
Yes
</button>
<button id="no"
onclick="document.getElementById('restoreRenameDialog').close();selectedFile='';">
No
</button>
</dialog>
<!-- Warning dialog for delete -->
<dialog id="deleteDialog" class="error">
<p>This will delete the file on disk. Do your really want to delete ? </p>
<button id="yes"
onclick="document.getElementById('deleteDialog').close();_callback('deleteLink',selectedFile);">
Yes
</button>
<button id="no"
onclick="document.getElementById('deleteDialog').close();selectedFile='';">
No
</button>
</dialog>
<!-- Warning dialog for file checkout -->
<dialog id="fileCheckoutDialog" class="error">
<p>A modified version of this file already exists. Do you want to overwrite ? </p>
<button id="yes"
onclick="document.getElementById('fileCheckoutDialog').close();_callback('fileCheckout',selectedCommit, selectedFile);">
Yes
</button>
<button id="no"
onclick="document.getElementById('fileCheckoutDialog').close();selectedFile='';">
No
</button>
</dialog>
<!-- Warning dialog for ignore -->
<dialog id="ignoreDialog" class="error">
<p>This will ignore the new file so it will not be tracked by git. This can be un-done in Settings/Repository/git-ignore tab. </p>
<p>If the git-ignore editor is open, it will be closed and your edits saved. </p>
<p>Do your really want to ignore (not track) this file? </p>
<button id="yes"
onclick="document.getElementById('ignoreDialog').close();_callback('ignoreLink',selectedFile);">
Yes
</button>
<button id="no"
onclick="document.getElementById('ignoreDialog').close();selectedFile='';">
No
</button>
</dialog>
<script> <!-- selectedFile used in dialog -->
var selectedFile; // Will be set when clicking "restore" (which is a dynamically generated link, created from javascript)
</script>
<!-- Onload, call javascript file -->
<script>
window.addEventListener(
'DOMContentLoaded',
(event) => {
console.log('listChanged.html :DOM fully loaded and parsed');
injectIntoJs(document);
}
);
window.addEventListener(
'unload',
(event) => {
console.log('listChanged.html :DOM fully unloaded -- maybe window closed ');
closeWindow(window);
}
);
</script>
<!-- Add find -->
<script src="node_modules/findinnw/dist/find-in-nw.js"></script>
<script src="extend_find-in-nw.js"></script>
<script>
findInNw.initialize();
extendFindInNw(); //Make find-in-nw fit my purpose for graph and note
</script>
</body>
</html>