@@ -10,15 +10,11 @@ declare global {
10
10
}
11
11
const _paq = ( window . _paq = window . _paq || [ ] )
12
12
13
- interface ManagePreferencesDialogProps {
14
- }
15
-
16
13
const ManagePreferencesSwitcher = ( prop : {
17
14
setParentState : ( state : any ) => void
18
15
} ) => {
19
16
const [ remixAISwitch , setRemixAISwitch ] = useState ( true )
20
17
const [ matPerfSwitch , setMatPerfSwitch ] = useState ( true )
21
-
22
18
23
19
useEffect ( ( ) => {
24
20
prop . setParentState ( {
@@ -28,92 +24,92 @@ const ManagePreferencesSwitcher = (prop: {
28
24
} , [ remixAISwitch , matPerfSwitch ] )
29
25
30
26
return (
31
- < >
32
- < div data-id = "matomoAnonAnalytics" className = 'justify-content-between d-flex' >
33
- < div className = 'mt-2' >
34
- < h6 className = 'text-secondary' > < FormattedMessage id = "remixApp.mpOp1Title" /> </ h6 >
35
- < p className = 'form-check-label text-secondary' > < FormattedMessage id = "remixApp.mpOp1Details" /> </ p >
36
- </ div >
37
- < div >
38
- < CustomTooltip
27
+ < >
28
+ < div data-id = "matomoAnonAnalytics" className = 'justify-content-between d-flex' >
29
+ < div className = 'mt-2' >
30
+ < h6 className = 'text-secondary' > < FormattedMessage id = "remixApp.mpOp1Title" /> </ h6 >
31
+ < p className = 'form-check-label text-secondary' > < FormattedMessage id = "remixApp.mpOp1Details" /> </ p >
32
+ </ div >
33
+ < div >
34
+ < CustomTooltip
39
35
placement = { "auto" }
40
36
tooltipId = "matomoAnonAnalyticsTooltip"
41
37
tooltipClasses = "text-nowrap"
42
38
tooltipText = { < FormattedMessage id = "remixApp.mpOp1Tooltip" /> }
43
- >
44
- < button
45
- data-id = "matomoAnonAnalyticsSwitch"
46
- id = 'matomoAnonAnalyticsSwitch'
47
- className = "btn text-ai"
48
- disabled
49
- >
50
- < i className = "fas fa-toggle-on fa-2xl" > </ i >
51
- </ button >
52
- </ CustomTooltip >
53
- </ div >
54
- </ div >
55
- < div data-id = "matomoPerfAnalytics" className = 'justify-content-between d-flex' >
56
- < div className = 'mt-3' >
57
- < h6 > < FormattedMessage id = "remixApp.mpOp2Title" /> </ h6 >
58
- < p className = 'form-check-label' > < FormattedMessage id = "remixApp.mpOp2Details" /> </ p >
59
- < p className = 'mt-1' > < FormattedMessage
60
- id = "remixApp.mpOp2Link"
61
- values = { {
62
- a : ( chunks ) => (
63
- < a className = "text-primary" href = "https://matomo.org" target = "_blank" rel = "noreferrer" >
64
- { chunks }
65
- </ a >
66
- ) ,
67
- } }
68
- /> </ p >
69
- </ div >
70
- < div >
71
- < button
72
- data-id = "matomoPerfAnalyticsSwitch"
73
- id = 'matomoPerfAnalyticsSwitch'
74
- className = "btn text-ai mt-1"
75
- onClick = { ( ) => setMatPerfSwitch ( ! matPerfSwitch ) }
76
- >
77
- { matPerfSwitch ? < i className = "fas fa-toggle-on fa-2xl" > </ i > : < i className = "fas fa-toggle-off fa-2xl" > </ i > }
78
- </ button >
79
- </ div >
80
- </ div >
81
- < div data-id = "remixAI" className = 'justify-content-between d-flex' >
82
- < div className = 'mt-2' >
83
- < h6 > < FormattedMessage id = "remixApp.mpOp3Title" /> </ h6 >
84
- < p className = 'form-check-label' > < FormattedMessage id = "remixApp.mpOp3Details" /> </ p >
85
- < p className = 'mt-1' > < FormattedMessage
86
- id = "remixApp.mpOp3Link"
87
- values = { {
88
- a : ( chunks ) => (
89
- < a className = "text-primary" href = "https://remix-ide.readthedocs.io/en/latest/ai.html" target = "_blank" rel = "noreferrer" >
90
- { chunks }
91
- </ a >
92
- ) ,
93
- } }
94
- /> </ p >
95
- </ div >
96
- < div >
39
+ >
97
40
< button
98
- data-id = "remixAISwitch "
99
- id = 'remixAISwitch '
41
+ data-id = "matomoAnonAnalyticsSwitch "
42
+ id = 'matomoAnonAnalyticsSwitch '
100
43
className = "btn text-ai"
101
- onClick = { ( ) => setRemixAISwitch ( ! remixAISwitch ) }
44
+ disabled
102
45
>
103
- { remixAISwitch ? < i className = "fas fa-toggle-on fa-2xl" > </ i > : < i className = "fas fa-toggle-off fa-2xl" > </ i > }
46
+ < i className = "fas fa-toggle-on fa-2xl" > </ i >
104
47
</ button >
105
- </ div >
48
+ </ CustomTooltip >
49
+ </ div >
50
+ </ div >
51
+ < div data-id = "matomoPerfAnalytics" className = 'justify-content-between d-flex' >
52
+ < div className = 'mt-3' >
53
+ < h6 > < FormattedMessage id = "remixApp.mpOp2Title" /> </ h6 >
54
+ < p className = 'form-check-label' > < FormattedMessage id = "remixApp.mpOp2Details" /> </ p >
55
+ < p className = 'mt-1' > < FormattedMessage
56
+ id = "remixApp.mpOp2Link"
57
+ values = { {
58
+ a : ( chunks ) => (
59
+ < a className = "text-primary" href = "https://matomo.org" target = "_blank" rel = "noreferrer" >
60
+ { chunks }
61
+ </ a >
62
+ ) ,
63
+ } }
64
+ /> </ p >
65
+ </ div >
66
+ < div >
67
+ < button
68
+ data-id = "matomoPerfAnalyticsSwitch"
69
+ id = 'matomoPerfAnalyticsSwitch'
70
+ className = "btn text-ai mt-1"
71
+ onClick = { ( ) => setMatPerfSwitch ( ! matPerfSwitch ) }
72
+ >
73
+ { matPerfSwitch ? < i className = "fas fa-toggle-on fa-2xl" > </ i > : < i className = "fas fa-toggle-off fa-2xl" > </ i > }
74
+ </ button >
106
75
</ div >
107
- </ >
108
- )
76
+ </ div >
77
+ < div data-id = "remixAI" className = 'justify-content-between d-flex' >
78
+ < div className = 'mt-2' >
79
+ < h6 > < FormattedMessage id = "remixApp.mpOp3Title" /> </ h6 >
80
+ < p className = 'form-check-label' > < FormattedMessage id = "remixApp.mpOp3Details" /> </ p >
81
+ < p className = 'mt-1' > < FormattedMessage
82
+ id = "remixApp.mpOp3Link"
83
+ values = { {
84
+ a : ( chunks ) => (
85
+ < a className = "text-primary" href = "https://remix-ide.readthedocs.io/en/latest/ai.html" target = "_blank" rel = "noreferrer" >
86
+ { chunks }
87
+ </ a >
88
+ ) ,
89
+ } }
90
+ /> </ p >
91
+ </ div >
92
+ < div >
93
+ < button
94
+ data-id = "remixAISwitch"
95
+ id = 'remixAISwitch'
96
+ className = "btn text-ai"
97
+ onClick = { ( ) => setRemixAISwitch ( ! remixAISwitch ) }
98
+ >
99
+ { remixAISwitch ? < i className = "fas fa-toggle-on fa-2xl" > </ i > : < i className = "fas fa-toggle-off fa-2xl" > </ i > }
100
+ </ button >
101
+ </ div >
102
+ </ div >
103
+ </ >
104
+ )
109
105
}
110
106
111
- const ManagePreferencesDialog = ( props : ManagePreferencesDialogProps ) => {
107
+ const ManagePreferencesDialog = ( ) => {
112
108
const { modal } = useDialogDispatchers ( )
113
- let { settings } = useContext ( AppContext )
109
+ const { settings } = useContext ( AppContext )
114
110
const [ visible , setVisible ] = useState < boolean > ( true )
115
- let switcherState = useRef < Record < string , any > > ( null )
116
-
111
+ const switcherState = useRef < Record < string , any > > ( null )
112
+
117
113
useEffect ( ( ) => {
118
114
if ( visible ) {
119
115
modal ( {
0 commit comments