This repository has been archived by the owner on Apr 24, 2021. It is now read-only.
/
spark_polymer_ui.html
742 lines (671 loc) · 29.9 KB
/
spark_polymer_ui.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
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
<!DOCTYPE html>
<!-- Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.
All rights reserved. Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. -->
<link rel="import" href="packages/polymer/polymer.html">
<!-- NOTE: If you add any new Polymer imports here, don't forget to also add
matching Dart imports in spark_bootstrap.dart. -->
<link rel="import" href="packages/spark_widgets/spark_button/spark_button.html">
<link rel="import" href="packages/spark_widgets/spark_dialog/spark_dialog.html">
<link rel="import" href="packages/spark_widgets/spark_dialog_button/spark_dialog_button.html">
<link rel="import" href="packages/spark_widgets/spark_menu_button/spark_menu_button.html">
<link rel="import" href="packages/spark_widgets/spark_menu_item/spark_menu_item.html">
<link rel="import" href="packages/spark_widgets/spark_menu_separator/spark_menu_separator.html">
<link rel="import" href="packages/spark_widgets/spark_progress/spark_progress.html">
<link rel="import" href="packages/spark_widgets/spark_split_view/spark_split_view.html">
<link rel="import" href="packages/spark_widgets/spark_status/spark_status.html">
<link rel="import" href="packages/spark_widgets/spark_toolbar/spark_toolbar.html">
<link rel="import" href="lib/ui/commit_message_view/commit_message_view.html">
<link rel="import" href="lib/ui/goto_line_view/goto_line_view.html">
<polymer-element name="spark-polymer-ui" attributes="splitViewPosition">
<template>
<link rel="stylesheet" href="spark_polymer_ui.css">
<spark-split-view
id="splitView"
direction="left"
splitterSize="0"
splitterHandle="false"
targetSize="{{splitViewPosition}}"
minTargetSize="200"
maxTargetSize="600"
on-update="{{onSplitterUpdate}}">
<div beforeSplit>
<spark-toolbar class="toolbar"
horizontal
justify="spaced"
spacing="small">
<input type="fileFilter"
id="fileFilter"
placeholder="Filter"
spellcheck="false"
on-keydown="{{fileFilterKeydownHandler}}"
on-input="{{fileFilterInputHandler}}"
tabindex="0"/>
<spark-menu-button
id="moreSearch"
valueAttr="action-id"
arrow="none"
on-activate="{{onMenuSelected}}">
<spark-button highlight="false" style="width: 35px; height: 35px;">
<svg id="moreSearchArrow" width="18px" height="18px" viewBox="0 0 24 24">
<g><polygon points="7,10 12,15 17,10 "></polygon></g>
</svg>
</spark-button>
<spark-menu-item id="showFilesView"
action-id="show-files-view"
label="Filter"
checkmark="true">
</spark-menu-item>
<spark-menu-item id="showSearchView"
action-id="show-search-view"
label="Search in files">
</spark-menu-item>
</spark-menu-button>
<spark-button id="runButton" flat round tooltip="Run">
<svg width="24px" height="24px" viewBox="0 0 24 24">
<path d="M8 5v14l11-7z"/>
</svg>
</spark-button>
<spark-menu-button
id="mainMenu"
valueAttr="action-id"
arrow="none"
on-activate="{{onMenuSelected}}">
<spark-button menuButton flat round>
<svg width="24px" height="24px" viewBox="0 0 24 24">
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
</svg>
</spark-button>
<spark-menu-item action-id="project-new" label="New Project...">
</spark-menu-item>
<!-- TODO(devoncarew): Removed as per #2348. -->
<!-- spark-menu-item action-id="file-open" label="Open File...">
</spark-menu-item -->
<spark-menu-item action-id="folder-open" label="Open Folder...">
</spark-menu-item>
<spark-menu-item action-id="git-clone" label="Git Clone...">
</spark-menu-item>
<spark-menu-separator></spark-menu-separator>
<spark-menu-item action-id="application-push" label="Deploy to Mobile...">
</spark-menu-item>
<spark-menu-item action-id="webstore-publish" label="Publish to Chrome Web Store...">
</spark-menu-item>
<template if="{{developerMode}}">
<spark-menu-separator></spark-menu-separator>
<spark-menu-item action-id="run-tests" label="Run Tests">
</spark-menu-item>
<spark-menu-item action-id="run-python" label="Run Python">
</spark-menu-item>
</template>
<spark-menu-separator></spark-menu-separator>
<spark-menu-item action-id="send-feedback" label="Send Feedback...">
</spark-menu-item>
<spark-menu-item action-id="help-about" label="About Chrome Dev Editor">
</spark-menu-item>
</spark-menu-button>
</spark-toolbar>
<content select="#leftPanel"></content>
<spark-toolbar id="bottom-toolbar"
class="toolbar"
horizontal
justify="right"
spacing="small">
<spark-button id="settingsButton" flat round tooltip="Settings...">
<svg width="24px" height="24px" viewBox="0 0 24 24">
<path d="M19.4 13c0-.3.1-.6.1-1s0-.7-.1-1l2.1-1.7c.2-.2.2-.4.1-.6l-2-3.5c-.1-.1-.3-.2-.6-.1l-2.5 1c-.5-.4-1.1-.7-1.7-1l-.4-2.6c.1-.3-.2-.5-.4-.5h-4c-.2 0-.5.2-.5.4l-.4 2.7c-.6.2-1.1.6-1.7 1l-2.4-1c-.3-.1-.5 0-.7.2l-2 3.5c-.1.1 0 .4.2.6l2.1 1.6c0 .3-.1.6-.1 1s0 .7.1 1l-2.1 1.7c-.2.2-.2.4-.1.6l2 3.5c.1.1.3.2.6.1l2.5-1c.5.4 1.1.7 1.7 1l.4 2.6c0 .2.2.4.5.4h4c.2 0 .5-.2.5-.4l.4-2.6c.6-.3 1.2-.6 1.7-1l2.5 1c.2.1.5 0 .6-.2l2-3.5c.1-.2.1-.5-.1-.6l-2.3-1.6zm-7.4 2.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"/>
</svg>
</spark-button>
</spark-toolbar>
</div>
<div afterSplit>
<content select="#editorArea"></content>
<spark-toolbar id="navigationButtons" class="toolbar"
horizontal
justify="right"
spacing="small">
<spark-button id="leftNav" flat round tooltip="Back">
<svg width="24px" height="24px" viewBox="0 0 24 24">
<path d="M20 11h-12.2l5.6-5.6-1.4-1.4-8 8 8 8 1.4-1.4-5.6-5.6h12.2v-2z"/>
</svg>
</spark-button>
<spark-button id="rightNav" flat round tooltip="Forward">
<svg width="24px" height="24px" viewBox="0 0 24 24">
<path d="M12 4l-1.4 1.4 5.6 5.6h-12.2v2h12.2l-5.6 5.6 1.4 1.4 8-8z"/>
</svg>
</spark-button>
</spark-toolbar>
<div id="sparkStatusContainer">
<spark-status id="sparkStatus"></spark-status>
</div>
</div>
</spark-split-view>
<!-- =========================== DIALOGS =============================== -->
<!-- Error dialog -->
<spark-dialog id="errorDialog" headerTitle="">
<div id="errorMessage" class="help-block"></div>
<spark-dialog-button id="errorClose" dismiss focused>Close</spark-dialog-button>
</spark-dialog>
<!-- OK / Cancel dialog -->
<spark-dialog id="okCancelDialog" headerTitle="">
<p id="okCancelMessage"></p>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button id="okText" submit focused>OK</spark-dialog-button>
</spark-dialog>
<!-- Rename File dialog -->
<spark-dialog id="renameDialog" headerTitle="Rename">
<label for="renameFileName">New name</label>
<input id="renameFileName" type="text" class="form-control"
required pattern="[\w\.-]+"
spellcheck="false" autosave focused>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit>Rename</spark-dialog-button>
</spark-dialog>
<!-- New File dialog -->
<spark-dialog id="fileNewDialog" headerTitle="New File">
<label for="fileName">New file name</label>
<input id="fileName" type="text" class="form-control"
required pattern="[\w\.-]+"
spellcheck="false" focused>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit>Create</spark-dialog-button>
</spark-dialog>
<!-- New Folder dialog -->
<spark-dialog id="folderNewDialog" headerTitle="New Folder">
<label for="folderName">New folder name</label>
<input id="folderName" type="text" class="form-control"
required pattern="[\w\.-]+"
spellcheck="false" focused>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit>Create</spark-dialog-button>
</spark-dialog>
<!-- New Project dialog -->
<spark-dialog id="newProjectDialog" headerTitle="New Project">
<div class="form-group">
<label for="name">Project name</label>
<input id="name" type="text" class="form-control"
placeholder="HelloWorld" required pattern="[\w\.-]+"
spellcheck="false" autosave focused />
</div>
<div class="form-group">
<label for="type">Project type</label>
<!-- TODO(ussuri): This duplication is pretty ugly, but none of the
advertised ways worked: <template if...> around individual options
breaks dart2js ("'template if' within 'select'...");
<option template if...> doesn't work at least in Dartium.
-->
<template if="{{showWipProjectTemplates}}">
<!-- TODO(ussuri): Rename "type" - too generic => dangerous. -->
<select name="type" class="form-control" autosave>
<optgroup label="Default">
<option value="empty">
Blank project
</option>
</optgroup>
<optgroup label="Web apps">
<option value="web/web_app_dart">
Dart web app
</option>
<option value="web/web_app_js">
JavaScript web app
</option>
<option value="web/web_app_polymer_js">
JavaScript web app (using Polymer paper elements)
</option>
<option value="web/web_starter_kit">
Web Starter Kit
</option>
</optgroup>
<optgroup label="Chrome Apps">
<option value="chrome/chrome_app_dart">
Dart Chrome App
</option>
<option value="chrome/chrome_app_js">
JavaScript Chrome App
</option>
<!-- This one currently can't possibly work due to Polymer
JS breaking the CSP. BUG #1933. -->
<option value="chrome/chrome_app_polymer_js;polymer,core-elements">
JavaScript Chrome App using Polymer
</option>
<!-- This one works when installed in Chrome manually, but
launching via the 'Run' button is broken. BUG #1935. -->
<option value="chrome/chrome_extension_js">
JavaScript Chrome extension
</option>
</optgroup>
<optgroup label="Polymer elements">
<option value="polymer/polymer_element_js">
JavaScript Polymer custom element
</option>
<!-- This one just needs some additional work. -->
<option value="polymer/polymer_element_dart">
Dart Polymer custom element
</option>
<!-- This one is internal for now. -->
<option value="polymer/spark_widget">
Chrome Dev Editor widget
</option>
</optgroup>
</select>
</template>
<template if="{{!showWipProjectTemplates}}">
<select name="type" class="form-control" autosave>
<optgroup label="Default">
<option value="empty">
Blank project
</option>
</optgroup>
<optgroup label="Web apps">
<option value="web/web_app_dart">
Dart web app
</option>
<option value="web/web_app_js">
JavaScript web app
</option>
<option value="web/web_app_polymer_js">
JavaScript web app (using Polymer paper elements)
</option>
<option value="web/web_starter_kit">
Web Starter Kit
</option>
</optgroup>
<optgroup label="Chrome apps">
<option value="chrome/chrome_app_dart">
Dart Chrome App
</option>
<option value="chrome/chrome_app_js">
JavaScript Chrome App
</option>
</optgroup>
<optgroup label="Polymer elements">
<option value="polymer/polymer_element_js">
JavaScript Polymer custom element
</option>
</optgroup>
</select>
</template>
</div>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit>Create</spark-dialog-button>
</spark-dialog>
<!-- Deploy to Mobile dialog -->
<spark-dialog id="mobileDeployDialog" headerTitle="Deploy to Mobile">
<div class="form-group">
<div class="help-block">
Please start the
<a href="https://github.com/MobileChromeApps/chrome-app-developer-tool/releases"
on-click="{{handleAnchorClick}}">
Chrome App Developer Tool for Mobile (App Dev Tool)
</a>
application on your Android device.
</div>
</div>
<div class="form-group">
<div class="vert-align-box">
<input id="adb" type="radio" name="mobileDeployType" value="push-adb" checked>
<label for="adb">Deploy via USB</label>
</div>
</div>
<div class="form-group">
<div class="vert-align-box">
<input id="ip" type="radio" name="mobileDeployType" value="push-ip">
<label for="ip">Deploy to a network host with this IP:</label>
</div>
<div class="radio-button-dependency">
<!-- TODO(devoncarew): Also, support IPv6 name patterns. -->
<input id="pushUrl" type="text" class="form-control "
placeholder="e.g. 192.168.1.101"
pattern="(\d{1,3}\.){3}\d{1,3}"
spellcheck="false" autosave>
</div>
</div>
<div id="progressDescription"></div>
<div id='deployCheckDeviceMessage'>
Please check for a connection authorization dialog on your device.
</div>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit focused>Deploy</spark-dialog-button>
</spark-dialog>
<!-- Git Clone dialog -->
<spark-dialog id="gitCloneDialog" headerTitle="Clone Git Project">
<div class="form-group">
<label for="gitRepoUrl">Repository URL</label>
<!-- TODO(devoncarew): Swap this out for a sample application repo? -->
<input id="gitRepoUrl" type="url" class="form-control"
placeholder="https://github.com/dart-lang/chromedeveditor.git"
spellcheck="false" autosave focused>
<input id="gitRepoUrlCopyInBuffer"/>
</div>
<spark-dialog-button id="cloneClose" cancel>Cancel</spark-dialog-button>
<spark-dialog-button id="clone" submit>Clone</spark-dialog-button>
</spark-dialog>
<!-- Git Commit dialog -->
<spark-dialog id="gitCommitDialog" headerTitle="Git Commit">
<div class="form-group">
<div id="gitUserInfo">
<div class="input-label">
<label for="gitName">Your name</label>
<input id="gitName" type="text" class="form-control"
placeholder="John Doe" pattern=".+"
spellcheck="false" autosave>
</div>
<div class="input-label">
<label for="gitEmail">Email</label>
<input id="gitEmail" type="email" class="form-control"
placeholder="johndoe@gmail.com" spellcheck="false" autosave>
</div>
</div>
</div>
<div class="input-label">
<label id="changeLabel">Changes</label>
<div id="gitStatusDiv">
<span id="gitStatus"></span>
<a href="#" id="gitStatusDetail">Details...</a>
</div>
</div>
<div id="gitChangeList"></div>
<div class="form-group">
<label for="commitMessage">Commit message</label>
<textarea id="commitMessage" type="text" class="form-control"
rows="3" wrap="soft" spellcheck autosave focused></textarea>
<span class="help-block">
Enter a brief description of the changes.
</span>
</div>
<spark-dialog-button id="gitCommitCancel" cancel>Cancel</spark-dialog-button>
<spark-dialog-button id="gitCommit" submit>Commit</spark-dialog-button>
</spark-dialog>
<!-- Git Branch dialog -->
<spark-dialog id="gitBranchDialog" headerTitle="Create Branch">
<label for="gitBranchName">Create a new branch</label>
<input id="gitBranchName" type="text" class="form-control"
required pattern="[^~:?*\^\[\s]+" spellcheck="false" autosave focused>
<div class="form-group">
<label for="gitRemoteBranches">Checkout a branch</label>
<select id="gitRemoteBranches" class="form-control"></select>
</div>
<spark-dialog-button id="gitBranchCancel" cancel>Cancel</spark-dialog-button>
<spark-dialog-button id="gitBranch" submit>Create Branch</spark-dialog-button>
</spark-dialog>
<!-- Git Checkout dialog -->
<spark-dialog id="gitCheckoutDialog" headerTitle="Git Checkout">
<div class="form-group">
<label for="currentBranchName">Current branch</label>
<input id="currentBranchName" type="text" class="form-control"
spellcheck="false" disabled focused>
</div>
<div class="form-group">
<label for="gitCheckoutBranch">Switch to branch</label>
<select id="gitCheckoutBranch" class="form-control"></select>
</div>
<spark-dialog-button id="gitCheckoutCancel" cancel>Cancel</spark-dialog-button>
<spark-dialog-button id="gitCheckout" submit>Checkout</spark-dialog-button>
</spark-dialog>
<!-- Git Push dialog -->
<spark-dialog id="gitPushDialog" headerTitle="Git Push">
<div class="form-group">
<div id="gitCommitList"></div>
</div>
<spark-dialog-button id="gitPushClose">Cancel</spark-dialog-button>
<spark-dialog-button id="gitPush" submit focused>Push</spark-dialog-button>
</spark-dialog>
<!-- About dialog -->
<spark-dialog id="aboutDialog" headerTitle="About Chrome Dev Editor">
<div class="form-group">
<div class="vert-align-box">
<div id="aboutDialog-icon">
<img src="images/icon_48.png">
</div>
<div id="aboutDialog-text">
<div><label>Develop apps on the Chrome platform</label></div>
<div><label>Version {{appVersion}}</label></div>
</div>
</div>
</div>
<div id="analyticsOptIn" class="form-group">
<div class="top-align-box">
<span>
<input id="analyticsCheck" type="checkbox">
</span>
<label for="analyticsCheck">
Help make Chrome Dev Editor better by automatically sending usage statistics and
crash reports to Google
</label>
</div>
</div>
<spark-dialog-button submit focused>Done</spark-dialog-button>
</spark-dialog>
<!-- Settings dialog -->
<spark-dialog id="settingsDialog" headerTitle="Settings">
<div class="form-group">
<spark-toolbar class="settings-block"
horizontal justify="left" spacing="small">
<label class="settings-label">Whitespace:</label>
<span class="vert-align-box">
<input id="stripWhitespace" type="checkbox">
<label for="stripWhitespace">
Strip trailing whitespace on save
</label>
</span>
</spark-toolbar>
</div>
<template if="{{useAceThemes}}">
<div class="form-group" id="changeTheme">
<spark-toolbar class="settings-block"
horizontal justify="spaced" spacing="small">
<label class="settings-label">Editor theme:</label>
<span class="settings-value"></span>
<spark-button id="themeMinus" class="plus-minus-button"
flat round padding="none" on-click="{{onThemeMinus}}">
<!--TODO(ussuri): Use SVG <use> directives instead here and below.-->
<svg viewBox="0 0 24 24" width="24" height="24">
<polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "></polygon>
</svg>
</spark-button>
<spark-button id="themePlus" class="plus-minus-button"
flat round padding="none" on-click="{{onThemePlus}}">
<svg viewBox="0 0 24 24" width="24" height="24">
<polygon points="10,6 8.6,7.4 13.2,12 8.6,16.6 10,18 16,12 "></polygon>
</svg>
</spark-button>
</spark-toolbar>
</div>
</template>
<div class="form-group" id="changeFont">
<spark-toolbar class="settings-block"
horizontal justify="spaced" spacing="small">
<label class="settings-label">Editor font:</label>
<span class="settings-value"></span>
<spark-button id="fontMinus" class="plus-minus-button"
flat round padding="none" on-click="{{onFontSmaller}}">
<svg viewBox="0 0 24 24" width="24" height="24">
<path d="M19,13H5v-2h14V13z"></path>
</svg>
</spark-button>
<spark-button id="fontPlus" class="plus-minus-button"
flat round padding="none" on-click="{{onFontLarger}}">
<svg viewBox="0 0 24 24" width="24" height="24">
<path d="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"></path>
</svg>
</spark-button>
</spark-toolbar>
</div>
<div class="form-group" id="changeKeys">
<spark-toolbar class="settings-block"
horizontal justify="spaced" spacing="small">
<label class="settings-label">Key bindings:</label>
<span class="settings-value"></span>
<spark-button id="keysMinus" class="plus-minus-button"
flat round padding="none" on-click="{{onKeysMinus}}">
<svg viewBox="0 0 24 24" width="24" height="24">
<polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "></polygon>
</svg>
</spark-button>
<spark-button id="keysPlus" class="plus-minus-button"
flat round padding="none" on-click="{{onKeysPlus}}">
<svg viewBox="0 0 24 24" width="24" height="24">
<polygon points="10,6 8.6,7.4 13.2,12 8.6,16.6 10,18 16,12 "></polygon>
</svg>
</spark-button>
</spark-toolbar>
</div>
<!-- TODO(devoncarew): Always show this directory, even on chrome OS. -->
<!-- Re-examine when syncfs is re-enabled. -->
<!-- template if="{{!chromeOS}}" -->
<div class="form-group" id="rootDirectory">
<spark-toolbar class="settings-block"
horizontal justify="spaced" spacing="small">
<label class="settings-label">Root directory:</label>
<span id="directoryLabel" class="settings-value"></span>
<spark-button id="chooseDirectory" on-click="{{onClickRootDirectory}}"
class="choose-directory-button">...
</spark-button>
</spark-toolbar>
</div>
<!-- /template -->
<div class="form-group" id="gitCredentials">
<spark-toolbar class="settings-block"
horizontal justify="edges" spacing="small">
<label class="settings-label">Git credentials:</label>
<spark-button class="reset-setting-button"
flat on-click="{{onResetGit}}">
Clear Git Credentials
</spark-button>
</spark-toolbar>
<div id="gitResetSettingsDone" class="reset-setting-result">
Done
</div>
</div>
<template if="{{developerMode}}">
<div class="form-group" id="resetPreferences">
<spark-toolbar class="settings-block"
horizontal justify="edges" spacing="small">
<label class="settings-label">Preferences:</label>
<spark-button class="reset-setting-button"
flat on-click="{{onResetPreference}}">
Reset Preferences
</spark-button>
</spark-toolbar>
<div id="preferenceResetResult" class="reset-setting-result"></div>
</div>
</template>
<spark-dialog-button dismiss focused>Close</spark-dialog-button>
</spark-dialog>
<!-- Git authentication dialog -->
<spark-dialog id="gitAuthenticationDialog" headerTitle="Git Authentication">
<div id="gitUserInfo">
<div class="input-label">
<label for="gitUsername">User name</label>
<input id="gitUsername" type="text" class="form-control"
placeholder="johndoe" required pattern="\S+"
spellcheck="false" autosave focused>
</div>
<div class="input-label">
<label for="gitPassword">Password</label>
<input id="gitPassword" type="password" class="form-control"
placeholder="Required" required>
</div>
</div>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit>Login</spark-dialog-button>
</spark-dialog>
<!-- Spark Status dialog -->
<spark-dialog id="statusDialog" headerTitle="">
<div id="progressDescription"></div>
</spark-dialog>
<!-- Publish on webstore -->
<spark-dialog id="webStorePublishDialog" headerTitle="Publish to Chrome Web Store">
<div class="form-group">
<div class="vert-align-box">
<input type="radio" name="webStorePublishType" value="new" id="new-app-radio" checked>
<label for="new-app-radio">Create a new application</label>
</div>
</div>
<div class="form-group">
<div class="vert-align-box">
<input type="radio" name="webStorePublishType" value="existing" id="existing-app-radio">
<label for="existing-app-radio">Upload to an existing application with this ID:</label>
</div>
<div class="radio-button-dependency">
<input id="appID" type="text" class="form-control"
placeholder="abcdefghijklmnopqrstuvwxyzabcdef"
required pattern="[a-z]{32}"
spellcheck="false" autosave>
</div>
</div>
<spark-dialog-button cancel>Cancel</spark-dialog-button>
<spark-dialog-button submit focused>Publish</spark-dialog-button>
</spark-dialog>
<!-- Properties dialog -->
<spark-dialog id="propertiesDialog" headerTitle="Properties">
<div id="body">
</div>
<spark-dialog-button dismiss focused>Close</spark-dialog-button>
</spark-dialog>
<!-- Chrome WebStore published dialog -->
<spark-dialog id="webStorePublishedDialog" headerTitle="Application published">
<div class="help-block">
An updated version of your application has been uploaded and
published. You can now see it on the Chrome Web Store.
</div>
<spark-dialog-button id="webStorePublishedAction">
Open in Chrome Web Store
</spark-dialog-button>
<spark-dialog-button dismiss focused>
Close
</spark-dialog-button>
</spark-dialog>
<!-- Chrome WebStore first upload dialog -->
<spark-dialog id="webStoreUploadedDialog" headerTitle="Application uploaded">
<div class="help-block">
Your application has been uploaded to the Chrome Web Store.
You still need to fill out some additional information in the
Developer Dashboard before publishing it.
</div>
<spark-dialog-button id="webStoreUploadedAction">
Open in the Developer Dashboard
</spark-dialog-button>
<spark-dialog-button submit focused>
Close
</spark-dialog-button>
</spark-dialog>
<!-- Project remove dialog -->
<spark-dialog id="projectRemoveDialog" headerTitle="Remove Project">
<div class="help-block">
"DELETE" will permanently delete
"<span id="projectRemoveProjectName"></span>" from disk.<br>
"REMOVE REFERENCE" will remove the reference to it from
the list of projects in Chrome Dev Editor, but keep its files on disk.
</div>
<spark-dialog-button cancel>
Cancel
</spark-dialog-button>
<spark-dialog-button id="projectRemoveDeleteButton" submit secondary>
Delete
</spark-dialog-button>
<spark-dialog-button id="projectRemoveRemoveReferenceButton" submit>
Remove Reference
</spark-dialog-button>
</spark-dialog>
<!-- File remove dialog -->
<spark-dialog id="fileRemoveDialog" headerTitle="Remove File">
<div class="help-block">
"DELETE" will permanently delete
"<span id="fileRemoveFileName"></span>"
from disk.<br>
"REMOVE REFERENCE" will remove the reference to it from
Chrome Dev Editor, but keep it on disk.
</div>
<spark-dialog-button cancel>
Cancel
</spark-dialog-button>
<spark-dialog-button id="fileRemoveDeleteButton" submit primary="false">
Delete
</spark-dialog-button>
<spark-dialog-button id="fileRemoveRemoveReferenceButton" submit>
Remove Reference
</spark-dialog-button>
</spark-dialog>
</template>
<script type="application/dart" src="spark_polymer_ui.dart"></script>
</polymer-element>