File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,28 @@ body {
30
30
padding : 0 ;
31
31
user-select : none ;
32
32
33
+ .handle {
34
+ display : inline-block ;
35
+ overflow : hidden ;
36
+ width : 16px ;
37
+ height : 20px ;
38
+ margin-top : -0.7em ;
39
+ margin-right : 0.3em ;
40
+ padding : 3px 4px ;
41
+ content : ' ....' ;
42
+ cursor : move ;
43
+ vertical-align : middle ;
44
+ letter-spacing : 2px ;
45
+ color : #aaaaaa ;
46
+ font-size : 12px ;
47
+ font-weight : bold ;
48
+ line-height : 5px ;
49
+
50
+ & :after {
51
+ content : ' .. .. .. ..' ;
52
+ }
53
+ }
54
+
33
55
> li {
34
56
position : relative ;
35
57
display : flex ;
Original file line number Diff line number Diff line change 9
9
10
10
< body id ="preferences ">
11
11
12
- < ul id ="browserList "> < li > Loading..< li > </ ul >
12
+ < ul id ="browserList ">
13
+ < li > Loading…
14
+ < li >
15
+ </ ul >
13
16
14
17
</ body >
15
18
16
19
< script >
17
- require ( './preferencesRenderer.js' )
20
+ require ( './preferencesRenderer.js' )
18
21
</ script >
19
22
20
- </ html >
23
+ </ html >
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ function populatePreferences(installedBrowsers) {
69
69
const li = document . createElement ( 'li' )
70
70
li . classList . add ( 'browserItem' )
71
71
72
+ const handle = document . createElement ( 'span' )
73
+ handle . classList . add ( 'handle' )
74
+ li . appendChild ( handle )
75
+
72
76
const logo = document . createElement ( 'img' )
73
77
logo . classList . add ( 'browserLogo' )
74
78
logo . src = `images/browser-logos/${ browser . name } .png`
@@ -114,6 +118,7 @@ function populatePreferences(installedBrowsers) {
114
118
115
119
Sortable . create ( browserList , {
116
120
draggable : '.browserItem' ,
121
+ handle : '.handle' ,
117
122
onEnd : e => sortBrowser ( e . oldIndex , e . newIndex )
118
123
} )
119
124
} else {
You can’t perform that action at this time.
0 commit comments