-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
292 lines (285 loc) · 19 KB
/
index.html
File metadata and controls
292 lines (285 loc) · 19 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<title>Differon</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Action Buttons -->
<div class="action-buttons-fixed">
<button id="compareBtn" class="action-btn" title="Compare Documents">
<svg width="32" height="32" viewBox="0 0 20 20" fill="currentColor">
<path d="M7 3H3a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2M3 4h4a1 1 0 0 1 1 1v1H2V5a1 1 0 0 1 1-1m4 12H3a1 1 0 0 1-1-1V7h6v8a1 1 0 0 1-1 1M17 3h-4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-4 1h4a1 1 0 0 1 1 1v5h-6V5a1 1 0 0 1 1-1m4 12h-4a1 1 0 0 1-1-1v-2h6v2a1 1 0 0 1-1 1"/>
</svg>
<span>Compare</span>
</button>
<button id="clearBtn" class="action-btn" title="Clear All Selections">
<svg width="32" height="32" viewBox="0 0 16 16" fill="currentColor">
<path d="M13 8a5 5 0 0 0-9.001-3h2a.5.5 0 1 1 0 1H3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 1 0v1.531a6 6 0 1 1-1.476 4.513a.5.5 0 0 1 .997-.089A5 5 0 0 0 13 8"/>
</svg>
<span>Clear</span>
</button>
</div>
<!-- Paragraph Algorithm Toolbar -->
<div class="toolbar algorithm-toolbar">
<label class="algorithm-checkbox">
<input type="checkbox" id="paragraphEnabled" checked>
<span>Paragraph:</span>
</label>
<div class="algorithm-controls">
<div class="radio-group">
<label class="radio-label">
<input type="radio" name="paragraphAlgorithm" value="thomas" checked>
<span>Thomas</span>
</label>
<label class="radio-label">
<input type="radio" name="paragraphAlgorithm" value="patience">
<span>Patience</span>
</label>
</div>
<div class="fuzz-controls">
<label class="toolbar-label">Fuzziness:</label>
<input type="range" id="paragraphFuzzSlider" min="0" max="10" value="0" class="fuzz-slider">
<span id="paragraphFuzzValue" class="fuzz-value">0.0</span>
</div>
</div>
</div>
<!-- Sentence Algorithm Toolbar -->
<div class="toolbar algorithm-toolbar">
<label class="algorithm-checkbox">
<input type="checkbox" id="sentenceEnabled" checked>
<span>Sentence:</span>
</label>
<div class="algorithm-controls">
<div class="radio-group">
<label class="radio-label">
<input type="radio" name="sentenceAlgorithm" value="thomas" checked>
<span>Thomas</span>
</label>
<label class="radio-label">
<input type="radio" name="sentenceAlgorithm" value="patience">
<span>Patience</span>
</label>
<label class="radio-label">
<input type="radio" name="sentenceAlgorithm" value="levenshtein" disabled>
<span>Levenshtein</span>
</label>
<label class="radio-label">
<input type="radio" name="sentenceAlgorithm" value="character">
<span>Character</span>
</label>
</div>
<div class="fuzz-controls">
<label class="toolbar-label">Fuzziness:</label>
<input type="range" id="sentenceFuzzSlider" min="0" max="10" value="0" class="fuzz-slider">
<span id="sentenceFuzzValue" class="fuzz-value">0.0</span>
</div>
</div>
</div>
<div class="container">
<div class="pane" id="leftPane">
<div class="tab-bar" id="leftTabBar">
<div class="tabs-container" id="leftTabsContainer">
<!-- Tabs will be dynamically inserted here -->
</div>
<button class="tab-move" id="leftMoveTab" title="Move to Revised">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zM11.5 7a4.5 4.5 0 1 1 0 9a4.5 4.5 0 0 1 0-9m2.353 4.854l.003-.003a.5.5 0 0 0 .144-.348v-.006a.5.5 0 0 0-.146-.35l-2-2a.5.5 0 0 0-.708.707L12.293 11H9.5a.5.5 0 0 0 0 1h2.793l-1.147 1.146a.5.5 0 0 0 .708.708z"/>
</svg>
</button>
<button class="tab-reload" id="leftReloadTab" title="Reload current document">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zm6 7a4.5 4.5 0 1 0 9 0a4.5 4.5 0 0 0-9 0m6.5-3a.5.5 0 0 1 .5.5v1.5a.5.5 0 0 1-.5.5H12a.5.5 0 0 1 0-1h.468a2 2 0 0 0-.933-.25a2 2 0 0 0-1.45.586a.5.5 0 0 1-.706-.707A3 3 0 0 1 13 9.152V9a.5.5 0 0 1 .5-.5m-.876 5.532A3 3 0 0 1 10 13.848V14a.5.5 0 0 1-1 0v-1.5a.5.5 0 0 1 .5-.5H11a.5.5 0 0 1 0 1h-.468q.075.042.155.077a2 2 0 0 0 2.227-.413a.5.5 0 0 1 .707.707c-.285.285-.624.51-.997.66"/>
</svg>
</button>
<button class="tab-new" id="leftNewTab" title="New document">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zm15 7a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-4-2a.5.5 0 0 0-1 0V11H9.5a.5.5 0 0 0 0 1H11v1.5a.5.5 0 0 0 1 0V12h1.5a.5.5 0 0 0 0-1H12z"/>
</svg>
</button>
</div>
<div class="pane-header">
<div class="pane-title">
<img class="doc-type-icon" id="leftDocIcon" src="" alt="" style="display: none;">
<strong>Original:</strong>
<span class="file-path" id="leftPath"></span>
</div>
</div>
<div class="pane-controls">
<div class="pane-controls-wrapper">
<div class="select-all-container">
<input type="checkbox" id="leftSelectAll" class="select-all-checkbox" title="Select/Deselect all paragraphs">
</div>
<span class="control-separator"></span>
<div class="color-controls">
<div class="color-control-group">
<label>BG:</label>
<input type="range" id="leftBgColor" min="0" max="360" value="0" class="color-slider">
<input type="range" id="leftBgIntensity" min="5" max="40" value="20" class="intensity-slider">
</div>
<div class="color-control-group">
<label>HL:</label>
<input type="range" id="leftHlColor" min="0" max="360" value="0" class="color-slider">
<input type="range" id="leftHlIntensity" min="20" max="60" value="40" class="intensity-slider">
</div>
<button id="leftColorReset" class="color-reset-btn" title="Reset colors to default">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="1 4 1 10 7 10"></polyline>
<path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>
</svg>
</button>
</div>
<span class="control-separator"></span>
<label class="strikethrough-control">
<input type="checkbox" id="leftStrikethrough" checked>
<span class="strikethrough-label">Strikethrough</span>
</label>
</div>
</div>
<div class="drop-zone" id="leftDrop">
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M7 10l5-5m0 0l5 5m-5-5v12M5 19h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2z"/>
</svg>
<p>Drop a file anywhere in this window, or use the buttons to browse for a file or paste from the clipboard.</p>
<div class="drop-zone-buttons">
<button class="drop-zone-btn" id="leftBrowseBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M3 9a2 2 0 0 1 2-2h1.586a1 1 0 0 0 .707-.293l1.414-1.414A1 1 0 0 1 9.414 5h5.172a1 1 0 0 1 .707.293l1.414 1.414a1 1 0 0 0 .707.293H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9z"/>
<circle cx="12" cy="13" r="3"/>
</svg>
Click to Browse for a File
</button>
<button class="drop-zone-btn" id="leftPasteBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
Click to Paste Clipboard Contents
</button>
</div>
</div>
<div class="editor-container" id="leftEditor" style="display: none;">
<div class="paragraph-numbers" id="leftParagraphNumbers"></div>
<div class="editor-content" id="leftContent"></div>
</div>
</div>
<div class="divider"></div>
<div class="pane" id="rightPane">
<div class="tab-bar" id="rightTabBar">
<div class="tabs-container" id="rightTabsContainer">
<!-- Tabs will be dynamically inserted here -->
</div>
<button class="tab-move" id="rightMoveTab" title="Move to Original">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zM11.5 16a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m-2.353-4.854l-.003.003a.5.5 0 0 0-.144.348v.006a.5.5 0 0 0 .146.35l2 2a.5.5 0 0 0 .708-.707L10.707 12H13.5a.5.5 0 0 0 0-1h-2.793l1.147-1.146a.5.5 0 0 0-.708-.708z"/>
</svg>
</button>
<button class="tab-reload" id="rightReloadTab" title="Reload current document">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zm6 7a4.5 4.5 0 1 0 9 0a4.5 4.5 0 0 0-9 0m6.5-3a.5.5 0 0 1 .5.5v1.5a.5.5 0 0 1-.5.5H12a.5.5 0 0 1 0-1h.468a2 2 0 0 0-.933-.25a2 2 0 0 0-1.45.586a.5.5 0 0 1-.706-.707A3 3 0 0 1 13 9.152V9a.5.5 0 0 1 .5-.5m-.876 5.532A3 3 0 0 1 10 13.848V14a.5.5 0 0 1-1 0v-1.5a.5.5 0 0 1 .5-.5H11a.5.5 0 0 1 0 1h-.468q.075.042.155.077a2 2 0 0 0 2.227-.413a.5.5 0 0 1 .707.707c-.285.285-.624.51-.997.66"/>
</svg>
</button>
<button class="tab-new" id="rightNewTab" title="New document">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path d="M2 4.5V6h3.586a.5.5 0 0 0 .353-.146L7.293 4.5L5.939 3.146A.5.5 0 0 0 5.586 3H3.5A1.5 1.5 0 0 0 2 4.5m-1 0A2.5 2.5 0 0 1 3.5 2h2.086a1.5 1.5 0 0 1 1.06.44L8.207 4H12.5A2.5 2.5 0 0 1 15 6.5v.757a5.5 5.5 0 0 0-1-.657v-.1A1.5 1.5 0 0 0 12.5 5H8.207l-1.56 1.56A1.5 1.5 0 0 1 5.585 7H2v4.5A1.5 1.5 0 0 0 3.5 13h2.707q.149.524.393 1H3.5A2.5 2.5 0 0 1 1 11.5zm15 7a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-4-2a.5.5 0 0 0-1 0V11H9.5a.5.5 0 0 0 0 1H11v1.5a.5.5 0 0 0 1 0V12h1.5a.5.5 0 0 0 0-1H12z"/>
</svg>
</button>
</div>
<div class="pane-header">
<div class="pane-title">
<img class="doc-type-icon" id="rightDocIcon" src="" alt="" style="display: none;">
<strong>Revised:</strong>
<span class="file-path" id="rightPath"></span>
</div>
</div>
<div class="pane-controls">
<div class="pane-controls-wrapper">
<div class="select-all-container">
<input type="checkbox" id="rightSelectAll" class="select-all-checkbox" title="Select/Deselect all paragraphs">
</div>
<span class="control-separator"></span>
<div class="color-controls">
<div class="color-control-group">
<label>BG:</label>
<input type="range" id="rightBgColor" min="0" max="360" value="120" class="color-slider">
<input type="range" id="rightBgIntensity" min="5" max="40" value="20" class="intensity-slider">
</div>
<div class="color-control-group">
<label>HL:</label>
<input type="range" id="rightHlColor" min="0" max="360" value="120" class="color-slider">
<input type="range" id="rightHlIntensity" min="20" max="60" value="40" class="intensity-slider">
</div>
<button id="rightColorReset" class="color-reset-btn" title="Reset colors to default">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="1 4 1 10 7 10"></polyline>
<path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>
</svg>
</button>
</div>
</div>
</div>
<div class="drop-zone" id="rightDrop">
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M7 10l5-5m0 0l5 5m-5-5v12M5 19h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2z"/>
</svg>
<p>Drop a file anywhere in this window, or use the buttons to browse for a file or paste from the clipboard.</p>
<div class="drop-zone-buttons">
<button class="drop-zone-btn" id="rightBrowseBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M3 9a2 2 0 0 1 2-2h1.586a1 1 0 0 0 .707-.293l1.414-1.414A1 1 0 0 1 9.414 5h5.172a1 1 0 0 1 .707.293l1.414 1.414a1 1 0 0 0 .707.293H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9z"/>
<circle cx="12" cy="13" r="3"/>
</svg>
Click to Browse for a File
</button>
<button class="drop-zone-btn" id="rightPasteBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
Click to Paste Clipboard Contents
</button>
</div>
</div>
<div class="editor-container" id="rightEditor" style="display: none;">
<div class="paragraph-numbers" id="rightParagraphNumbers"></div>
<div class="editor-content" id="rightContent"></div>
</div>
</div>
</div>
<div class="status-bar">
<div class="status-left">
<span id="appInfo"></span>
</div>
<div class="status-center">
<span id="dateTime"></span>
</div>
<div class="status-right">
<div class="zoom-controls">
<button id="zoomOutBtn" class="zoom-btn" title="Zoom Out (Ctrl+-)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35M8 11h6"></path>
</svg>
</button>
<span id="zoomLevel" class="zoom-level">100%</span>
<button id="zoomInBtn" class="zoom-btn" title="Zoom In (Ctrl++)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35M11 8v6M8 11h6"></path>
</svg>
</button>
<button id="zoomResetBtn" class="zoom-btn" title="Reset Zoom (Ctrl+0)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="1 4 1 10 7 10"></polyline>
<path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>
</svg>
</button>
</div>
</div>
</div>
<script src="dialogs.js"></script>
<script src="renderer.js"></script>
</body>
</html>