forked from oliverschwendener/ueli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
548 lines (534 loc) · 39.9 KB
/
main.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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>ueli</title>
</head>
<body>
<div id="vue-root">
<link rel="stylesheet" href="./styles/app.css">
<link rel="stylesheet" :href="colorTheme()">
<link rel="stylesheet" v-if="userStylesheetIsAvailable" :href="userStylesheet">
<div class="container">
<div class="user-input-container" :style="userInputContainerStyle()">
<input id="user-input" class="user-input" :style="userInputStyle()" type="text" v-model="userInput" :autofocus="{ 'autofocus' : autoFocus }"
v-on:keyDown="handleUserInputKeyPress">
<div class="search-icon-container" :style="searchResultWidth()" v-html="config.iconSet.searchIcon"></div>
</div>
<div class="output-container" id="output-container" :style="outputContainerHeight()">
<div class="command-line-output-container" v-if="commandLineOutput.length > 0">
<pre v-for="line in commandLineOutput">{{ line }}</pre>
</div>
<div class="search-results-container" v-if="searchResults.length > 0">
<div :id="searchResult.id" class="search-result" :style="searchResultStyle()" :class="{ 'active' : searchResult.active }"
v-for="(searchResult, searchIndex) in searchResults" v-on:click="handleClick" v-on:mouseenter="handleMouseEnter(searchIndex)">
<div class="search-result-icon">
<div class="search-result-icon-container" :style="searchResultIconStyle()" :class="{ 'active' : searchResult.active }" v-html="searchResult.icon"></div>
</div>
<div class="search-result-information">
<span class="search-result-name" :style="searchResultNameStyle()" :class="{ 'active' : searchResult.active }">
{{ searchResult.name }}
</span>
<span class="search-result-description" :style="searchResultDescriptionStyle()" :class="{ 'active' : searchResult.active } ">
{{ searchResult.description }}
</span>
</div>
</div>
</div>
<div class="settings-container" v-if="settingsVisible">
<svg v-on:click="handleCloseSettingsIconClick" class="close-settings-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" version="1.1">
<g id="surface1">
<path d="M 7.21875 5.78125 L 5.78125 7.21875 L 14.5625 16 L 5.78125 24.78125 L 7.21875 26.21875 L 16 17.4375 L 24.78125 26.21875 L 26.21875 24.78125 L 17.4375 16 L 26.21875 7.21875 L 24.78125 5.78125 L 16 14.5625 Z "></path>
</g>
</svg>
<h1 class="setting-section-title">App Settings</h1>
<div class="setting-group">
<div class="setting-title">Info</div>
<div class="setting">
<div>ueli: {{ version }}</div>
<div>Electron: {{ process.versions.electron }}</div>
<div>Chrome: {{ process.versions.chrome }}</div>
<div>Node: {{ process.versions.node }}</div>
<div>V8: {{ process.versions.v8 }}</div>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Update</div>
<div class="setting">
<div v-if="(updateAvailable || noUpdateFound) === false" class="sub-setting">
<button v-on:click="handleCheckForUpdateButtonClick" class="setting-button">Check for update</button>
<span v-if="errorOnUpdateCheck" class="message text-error">There was an error while checking for updates :(</span>
</div>
<div v-if="updateAvailable" class="sub-setting">
<button v-if="updateAvailable && !downloadingUpdate" v-on:click="handleDownloadUpdateButtonClick" class="setting-button">Download & install update</button>
<button v-if="updateAvailable && downloadingUpdate" class="setting-button">Downloading...</button>
</div>
<div v-if="noUpdateFound">Your are running the latest version</div>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Config file path</div>
<div class="setting">
<input class="setting-text-input" type="text" v-model="appConfig.userSettingsFilePath" v-on:blur="updateAppConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Reset app settings to default</div>
<div class="setting">
<button class="setting-button" v-on:click="resetAppConfigToDefault">Reset</button>
</div>
</div>
<h1 class="setting-section-title">User Settings</h1>
<div class="setting-group">
<div class="setting-title">Allow mouse interaction</div>
<div class="setting">
<input type="checkbox" v-model="config.allowMouseInteraction" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Always show on primary display</div>
<div class="setting">
<input type="checkbox" v-model="config.alwaysShowOnPrimaryDisplay" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Application file extensions</div>
<div class="setting">
<div class="sub-setting" v-for="(applicationFileExtension, index) in config.applicationFileExtensions">
<input class="setting-text-input" type="text" v-model="config.applicationFileExtensions[index]" v-on:blur="updateUserConfig">
<svg v-on:click="settingsActionRemoveApplicationFileExtension(applicationFileExtension)" class="setting-action-icon sub-setting-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</div>
<div class="sub-setting">
<input class="setting-text-input" v-model="configEdit.newApplicationFileExtension" type="text" placeholder="Add more application file extensions">
<svg class="setting-action-icon sub-setting-icon" v-on:click="settingsActionAddApplicationFileExtension(configEdit.newApplicationFileExtension)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</div>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Application folders</div>
<div class="setting">
<div class="sub-setting" v-for="(applicationFolder, index) in config.applicationFolders">
<input class="setting-text-input" type="text" v-model="config.applicationFolders[index]" v-on:blur="updateUserConfig">
<svg v-on:click="settingsActionRemoveApplicationFolder(applicationFolder)" class="setting-action-icon sub-setting-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</div>
<div class="sub-setting">
<input class="setting-text-input" v-model="configEdit.newApplicationFolder" type="text" placeholder="Add more application folders">
<svg class="setting-action-icon sub-setting-icon" v-on:click="settingsActionAddApplicationFolder(configEdit.newApplicationFolder)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</div>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Autostart app</div>
<div class="setting">
<input type="checkbox" v-model="config.autoStartApp" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Color theme</div>
<div class="setting">
<select class="setting-select" v-model="config.colorTheme" v-on:change="updateUserConfig">
<option v-for="availableColorTheme in availableColorThemes" :value="availableColorTheme">{{ availableColorTheme }}</option>
</select>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Custom commands</div>
<div class="setting">
<table class="setting-table">
<thead>
<tr>
<th>Name</th>
<th>ExecutionArgument</th>
<th>Prefix</th>
<th>Icon</th>
<th class="text-center">Preview</th>
<th class="text-center">+/-</th>
</tr>
</thead>
<tbody>
<tr v-for="customCommand in config.customCommands">
<td><input class="setting-text-input" type="text" v-model="customCommand.name" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="customCommand.executionArgument" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="customCommand.prefix" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="customCommand.icon" v-on:blur="updateUserConfig"></td>
<td class="text-center" v-html="customCommand.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionRemoveCustomCommand(customCommand)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</td>
</tr>
<tr>
<td><input class="setting-text-input" v-model="configEdit.newCustomCommand.name" type="text" placeholder="Name"></td>
<td><input class="setting-text-input" v-model="configEdit.newCustomCommand.executionArgument" type="text" placeholder="Execution argument"></td>
<td><input class="setting-text-input" v-model="configEdit.newCustomCommand.prefix" type="text" placeholder="Prefix"></td>
<td class="slim"><input class="setting-text-input" v-model="configEdit.newCustomCommand.icon" type="text" placeholder="Icon"></td>
<td class="text-center" v-html="configEdit.newCustomCommand.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionAddCustomCommand(configEdit.newCustomCommand)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Fallback web searches</div>
<div class="setting">
<div class="sub-setting" v-for="fallbackWebSearch in config.fallbackWebSearches">
<input disabled class="setting-text-input" type="text" v-model="fallbackWebSearch">
<svg class="setting-action-icon sub-setting-icon" v-on:click="settingsActionRemoveFallbackWebSearch(fallbackWebSearch)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</div>
<div v-if="config.fallbackWebSearches.length !== config.webSearches.length" class="sub-setting">
<select class="setting-select" v-model="configEdit.newFallbackWebSearch" v-on:change="settingsActionAddFallbackWebSearch(configEdit.newFallbackWebSearch)">
<option selected value="">Select a web search engine</option>
<option v-for="webSearch in getUnusedFallbackWebSearches()" :value="webSearch.name">{{ webSearch.name }}</option>
</select>
</div>
</div>
</div>
<div class="setting-group" v-if="config.searchFiles">
<div class="setting-title">File search options</div>
<div class="setting">
<table class="setting-table">
<thead>
<tr>
<th>Folder path</th>
<th class="text-center">Recursive</th>
<th class="text-center">+/-</th>
</tr>
</thead>
<tbody>
<tr v-for="fileSearchOption in config.fileSearchOptions">
<td><input class="setting-text-input" type="text" v-model="fileSearchOption.folderPath" v-on:blur="updateUserConfig"></td>
<td class="text-center slim"><input type="checkbox" v-model="fileSearchOption.recursive" v-on:change="updateUserConfig"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionRemoveFileSearchOption(fileSearchOption)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</td>
</tr>
<tr>
<td><input class="setting-text-input" type="text" v-model="configEdit.newFileSearchOption.folderPath" placeholder="Add a folder path"></td>
<td class="text-center"><input type="checkbox" v-model="configEdit.newFileSearchOption.recursive"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionAddFileSearchOption(configEdit.newFileSearchOption)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Hotkey</div>
<div class="setting">
<input class="setting-text-input" type="text" v-model="config.hotKey" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Icon set</div>
<div class="setting">
<table class="setting-table">
<thead>
<tr>
<th>Description</th>
<th class="text-center">Preview</th>
<th>HTML</th>
</tr>
</thead>
<tbody>
<tr>
<td>App icon</td>
<td class="text-center" v-html="config.iconSet.appIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.appIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Commandline icon</td>
<td class="text-center" v-html="config.iconSet.commandLineIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.commandLineIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Email icon</td>
<td class="text-center" v-html="config.iconSet.emailIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.emailIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Environment variable icon</td>
<td class="text-center" v-html="config.iconSet.environmentVariableIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.environmentVariableIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>File icon</td>
<td class="text-center" v-html="config.iconSet.fileIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.fileIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Folder icon</td>
<td class="text-center" v-html="config.iconSet.folderIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.folderIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Operating system settings icon</td>
<td class="text-center" v-html="config.iconSet.operatingSystemSettingsIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.operatingSystemSettingsIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Search icon</td>
<td class="text-center" v-html="config.iconSet.searchIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.searchIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>Shortcut icon</td>
<td class="text-center" v-html="config.iconSet.shortcutIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.shortcutIcon" v-on:blur="updateUserConfig"></td>
</tr>
<tr>
<td>URL icon</td>
<td class="text-center" v-html="config.iconSet.urlIcon"></td>
<td><input class="setting-text-input" type="text" v-model="config.iconSet.urlIcon" v-on:blur="updateUserConfig"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Log execution</div>
<div class="setting">
<input type="checkbox" v-model="config.logExecution" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Maximum search result count</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.maxSearchResultCount" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Maximum window height</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.maxWindowHeight" min="config.userInputHeight" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Rescan interval (in seconds)</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.rescanInterval" min="5" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search engine threshold</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.searchEngineThreshold" min="0" max="1" step="0.1" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search environment variables</div>
<div class="setting">
<input type="checkbox" v-model="config.searchEnvironmentVariables" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search files</div>
<div class="setting">
<input type="checkbox" v-model="config.searchFiles" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search operating system settings</div>
<div class="setting">
<input type="checkbox" v-model="config.searchOperatingSystemSettings" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search operating system commands</div>
<div class="setting">
<input type="checkbox" v-model="config.searchOperatingSystemCommands" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search programs</div>
<div class="setting">
<input type="checkbox" v-model="config.searchPrograms" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search result description font size</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.searchResultDescriptionFontSize" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search result height</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.searchResultHeight" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Search result name font size</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.searchResultNameFontSize" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Shortcuts</div>
<div class="setting">
<table class="setting-table">
<thead>
<tr>
<th>Name</th>
<th>Execution argument</th>
<th>Icon</th>
<th class="text-center">Preview</th>
<th class="text-center">+/-</th>
</tr>
</thead>
<tbody>
<tr v-for="shortcut in config.shortcuts">
<td><input class="setting-text-input" type="text" v-model="shortcut.name" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="shortcut.executionArgument" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="shortcut.icon"></td>
<td class="text-center" v-html="shortcut.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionRemoveShortcut(shortcut)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</td>
</tr>
<tr>
<td><input class="setting-text-input" type="text" v-model="configEdit.newShortcut.name" placeholder="Name"></td>
<td><input class="setting-text-input" type="text" v-model="configEdit.newShortcut.executionArgument" placeholder="Execution argument"></td>
<td><input class="setting-text-input" type="text" v-model="configEdit.newShortcut.icon" placeholder="Icon"></td>
<td class="text-center" v-html="configEdit.newShortcut.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionAddShortcut(configEdit.newShortcut)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Show tray icon</div>
<div class="setting">
<input type="checkbox" v-model="config.showTrayIcon" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Smooth scrolling</div>
<div class="setting">
<input type="checkbox" v-model="config.smoothScrolling" v-on:change="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">User input font size</div>
<div class="setting">
<input class="setting-text-input" type="nubmer" v-model="config.userInputFontSize" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">User input height</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.userInputHeight" min="0" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">User stylesheet</div>
<div class="setting">
<input class="setting-text-input" type="text" v-model="config.userStylesheet" placeholder="Add a file path to your custom stylesheet" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Web search engines</div>
<div class="setting">
<table class="setting-table">
<thead>
<tr>
<th>Name</th>
<th>Prefix</th>
<th>Url</th>
<th>Icon</th>
<th class="text-center">Preview</th>
<th class="text-center">+/-</th>
</tr>
</thead>
<tbody>
<tr v-for="webSearch in config.webSearches">
<td><input class="setting-text-input" type="text" v-model="webSearch.name" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="webSearch.prefix" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="webSearch.url" v-on:blur="updateUserConfig"></td>
<td><input class="setting-text-input" type="text" v-model="webSearch.icon" v-on:blur="updateUserConfig"></td>
<td class="text-center" v-html="webSearch.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionRemoveWebSearch(webSearch)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 26 26" version="1.1">
<g id="surface1">
<path d="M 13.5 3.1875 C 7.804688 3.1875 3.1875 7.804688 3.1875 13.5 C 3.1875 19.195313 7.804688 23.8125 13.5 23.8125 C 19.195313 23.8125 23.8125 19.195313 23.8125 13.5 C 23.8125 7.804688 19.195313 3.1875 13.5 3.1875 Z M 19 15 L 8 15 L 8 12 L 19 12 Z "></path>
</g>
</svg>
</td>
</tr>
<tr>
<td><input type="text" class="setting-text-input" v-model="configEdit.newWebSearch.name" placeholder="Name"></td>
<td><input type="text" class="setting-text-input" v-model="configEdit.newWebSearch.prefix" placeholder="Prefix"></td>
<td><input type="text" class="setting-text-input" v-model="configEdit.newWebSearch.url" placeholder="URL"></td>
<td><input type="text" class="setting-text-input" v-model="configEdit.newWebSearch.icon" placeholder="Icon"></td>
<td class="text-center" v-html="configEdit.newWebSearch.icon"></td>
<td class="text-center">
<svg class="setting-action-icon" v-on:click="settingsActionAddWebSearch(configEdit.newWebSearch)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M13.5,3.188C7.805,3.188,3.188,7.805,3.188,13.5S7.805,23.813,13.5,23.813S23.813,19.195,23.813,13.5 S19.195,3.188,13.5,3.188z M19,15h-4v4h-3v-4H8v-3h4V8h3v4h4V15z"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="setting-group">
<div class="setting-title">Window width</div>
<div class="setting">
<input class="setting-text-input" type="number" v-model="config.windowWidth" v-on:blur="updateUserConfig">
</div>
</div>
<div class="setting-group">
<div class="setting-title">Reset user settings to default</div>
<div class="setting">
<button class="setting-button" v-on:click="resetUserConfigToDefault">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
require('./bundle/renderer.js');
</script>
</body>
</html>