3
3
4
4
const browser = require ( 'webextension-polyfill' )
5
5
const html = require ( 'choo/html' )
6
+ const switchToggle = require ( '../../pages/components/switch-toggle' )
6
7
7
8
function experimentsForm ( {
8
9
displayNotifications,
@@ -35,7 +36,7 @@ function experimentsForm ({
35
36
< dd > ${ browser . i18n . getMessage ( 'option_displayNotifications_description' ) } </ dd >
36
37
</ dl >
37
38
</ label >
38
- < input id =" displayNotifications " type =" checkbox " onchange = ${ onDisplayNotificationsChange } checked = ${ displayNotifications } / >
39
+ < div > ${ switchToggle ( { id : ' displayNotifications' , checked : displayNotifications , onchange : onDisplayNotificationsChange } ) } </ div >
39
40
</ div >
40
41
< div >
41
42
< label for ="preloadAtPublicGateway ">
@@ -44,7 +45,7 @@ function experimentsForm ({
44
45
< dd > ${ browser . i18n . getMessage ( 'option_preloadAtPublicGateway_description' ) } </ dd >
45
46
</ dl >
46
47
</ label >
47
- < input type =" checkbox " id =" preloadAtPublicGateway " onchange = ${ onPreloadAtPublicGatewayChange } checked = ${ preloadAtPublicGateway } / >
48
+ < div > ${ switchToggle ( { id : ' preloadAtPublicGateway' , checked : preloadAtPublicGateway , onchange : onPreloadAtPublicGatewayChange } ) } </ div >
48
49
</ div >
49
50
< div >
50
51
< label for ="catchUnhandledProtocols ">
@@ -53,7 +54,7 @@ function experimentsForm ({
53
54
< dd > ${ browser . i18n . getMessage ( 'option_catchUnhandledProtocols_description' ) } </ dd >
54
55
</ dl >
55
56
</ label >
56
- < input type =" checkbox " id =" catchUnhandledProtocols " onchange = ${ onCatchUnhandledProtocolsChange } checked = ${ catchUnhandledProtocols } / >
57
+ < div > ${ switchToggle ( { id : ' catchUnhandledProtocols' , checked : catchUnhandledProtocols , onchange : onCatchUnhandledProtocolsChange } ) } </ div >
57
58
</ div >
58
59
< div >
59
60
< label for ="linkify ">
@@ -62,7 +63,7 @@ function experimentsForm ({
62
63
< dd > ${ browser . i18n . getMessage ( 'option_linkify_description' ) } </ dd >
63
64
</ dl >
64
65
</ label >
65
- < input type =" checkbox " id =" linkify " onchange = ${ onLinkifyChange } checked = ${ linkify } / >
66
+ < div > ${ switchToggle ( { id : ' linkify' , checked : linkify , onchange : onLinkifyChange } ) } </ div >
66
67
</ div >
67
68
< div >
68
69
< label for ="dnslinkPolicy ">
@@ -105,10 +106,10 @@ function experimentsForm ({
105
106
</ dd >
106
107
</ dl >
107
108
</ label >
108
- < input type =" checkbox " id =" detectIpfsPathHeader " onchange = ${ onDetectIpfsPathHeaderChange } checked = ${ detectIpfsPathHeader } / >
109
+ < div > ${ switchToggle ( { id : ' detectIpfsPathHeader' , checked : detectIpfsPathHeader , onchange : onDetectIpfsPathHeaderChange } ) } </ div >
109
110
</ div >
110
111
< div >
111
- < label for ="ipfs-proxy ">
112
+ < label for ="ipfsProxy ">
112
113
< dl >
113
114
< dt > ${ browser . i18n . getMessage ( 'option_ipfsProxy_title' ) } </ dt >
114
115
< dd >
@@ -124,7 +125,7 @@ function experimentsForm ({
124
125
</ dd >
125
126
</ dl >
126
127
</ label >
127
- < input type =" checkbox " id =" ipfs-proxy " onchange = ${ onIpfsProxyChange } checked = ${ ipfsProxy } / >
128
+ < div > ${ switchToggle ( { id : 'ipfsProxy' , checked : ipfsProxy , onchange : onIpfsProxyChange } ) } </ div >
128
129
</ div >
129
130
< div >
130
131
< label for ="resetAllOptions ">
@@ -133,7 +134,7 @@ function experimentsForm ({
133
134
< dd > ${ browser . i18n . getMessage ( 'option_resetAllOptions_description' ) } </ dd >
134
135
</ dl >
135
136
</ label >
136
- < span id ="resetAllOptions "> < button onclick =${ onOptionsReset } > ${ browser . i18n . getMessage ( 'option_resetAllOptions_title' ) } </ button > </ span >
137
+ < div > < button id ="resetAllOptions " onclick =${ onOptionsReset } > ${ browser . i18n . getMessage ( 'option_resetAllOptions_title' ) } </ button > </ div >
137
138
</ div >
138
139
</ fieldset >
139
140
</ form >
0 commit comments