Skip to content

Commit 3cb087a

Browse files
committed
update switcher position
1 parent 3eb083f commit 3cb087a

File tree

2 files changed

+43
-47
lines changed

2 files changed

+43
-47
lines changed

apps/remix-ide/src/app/tabs/locales/en/remixApp.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
"remixApp.matomoText1": "Remix features an AI coding assistant called RemixAI, that needs your approval to use.",
1212
"remixApp.matomoText2": "We also use <a>Matomo</a>, an open-source analytics platform, that helps us improve your experience.",
1313
"remixApp.matomoTitle": "AI and Analytics Preferences",
14-
"remixApp.accept": "Accept All",
14+
"remixApp.accept": "Accept",
1515
"remixApp.managePreferences": "Manage Preferences",
1616
"remixApp.savePreferences": "Save Preferences",
1717
"remixApp.declineCookies": "Decline Cookies",
1818
"remixApp.decline": "Decline",
1919

20-
"remixApp.mpOp1Title": "RemixAI",
21-
"remixApp.mpOp1Details": "RemixAI helps by offering code suggestions and improvements",
22-
"remixApp.mpOp1Link": "<a>Learn more about RemixAI Copilot</a>",
20+
"remixApp.mpOp1Title": "Matomo Anonymous Analytics (Necessary)",
21+
"remixApp.mpOp1Details": "Our use of anonymous analytics data helps us improve your experience by identifying bug and important UX improvements. This data can also be used in overall statistics on Remix use in the wider Web3 ecosystem",
2322

24-
"remixApp.mpOp2Title": "Matomo Anonymous Analytics",
25-
"remixApp.mpOp2Details": "Our use of anonymous analytics data helps us improve your experience by identifying bug and important UX improvements. This data can also be used in overall statistics on Remix use in the wider Web3 ecosystem",
23+
"remixApp.mpOp2Title": "Matomo Performance Analytics",
24+
"remixApp.mpOp2Details": "Remix believes your privacy is of primary importance. Your help in making Remix the best possible open source public good toolset is also very important. Approval of performance analytics tracking greatly helps us refine and improve the toolset. Rest assured, we will never share this data with any third parties.",
2625
"remixApp.mpOp2Link": "<a>Learn more about analytics</a>",
2726

28-
"remixApp.mpOp3Title": "Matomo Performance Analytics",
29-
"remixApp.mpOp3Details": "Remix believes your privacy is of primary importance. Your help in making Remix the best possible open source public good toolset is also very important. Approval of performance analytics tracking greatly helps us refine and improve the toolset. Rest assured, we will never share this data with any third parties."
27+
"remixApp.mpOp3Title": "RemixAI",
28+
"remixApp.mpOp3Details": "RemixAI helps by offering code suggestions and improvements",
29+
"remixApp.mpOp3Link": "<a>Learn more about RemixAI Copilot</a>"
3030
}

libs/remix-ui/app/src/lib/remix-app/components/modals/managePreferences.tsx

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,36 @@ const ManagePreferencesSwitcher = (prop: {
1515
setParentState: (state: any) => void
1616
}) => {
1717
const [remixAISwitch, setRemixAISwitch] = useState(true)
18-
const [matPerfSwitch, setMatPerfSwitch] = useState(false)
19-
const [matAnonSwitch, setMatAnonSwitch] = useState(false)
18+
const [matPerfSwitch, setMatPerfSwitch] = useState(true)
2019

2120

2221
useEffect(() => {
2322
prop.setParentState({
2423
remixAISwitch,
25-
matPerfSwitch,
26-
matAnonSwitch
24+
matPerfSwitch
2725
})
28-
}, [remixAISwitch, matPerfSwitch, matAnonSwitch])
26+
}, [remixAISwitch, matPerfSwitch])
2927

3028
return (
3129
<>
32-
<div data-id="remixAI" className='justify-content-between d-flex'>
30+
<div data-id="matomoAnonAnalytics" className='justify-content-between d-flex'>
3331
<div className='mt-2'>
34-
<h6><FormattedMessage id="remixApp.mpOp1Title" /></h6>
35-
<p className='form-check-label'><FormattedMessage id="remixApp.mpOp1Details" /></p>
36-
<p className='mt-1'><FormattedMessage
37-
id="remixApp.mpOp1Link"
38-
values={{
39-
a: (chunks) => (
40-
<a className="text-primary" href="https://matomo.org" target="_blank" rel="noreferrer">
41-
{chunks}
42-
</a>
43-
),
44-
}}
45-
/></p>
32+
<h6 className='text-secondary'><FormattedMessage id="remixApp.mpOp1Title" /></h6>
33+
<p className='form-check-label text-secondary'><FormattedMessage id="remixApp.mpOp1Details" /></p>
4634
</div>
4735
<div>
4836
<button
49-
data-id="remixAISwitch"
50-
id='remixAISwitch'
37+
data-id="matomoAnonAnalyticsSwitch"
38+
id='matomoAnonAnalyticsSwitch'
5139
className="btn text-ai"
52-
onClick={() => setRemixAISwitch(!remixAISwitch)}
40+
disabled
5341
>
54-
{ remixAISwitch ? <i className="fas fa-toggle-on fa-2xl"></i> : <i className="fas fa-toggle-off fa-2xl"></i> }
42+
<i className="fas fa-toggle-on fa-2xl"></i>
5543
</button>
5644
</div>
5745
</div>
58-
<div data-id="matomoAnonAnalytics" className='justify-content-between d-flex'>
59-
<div className='mt-2'>
46+
<div data-id="matomoPerfAnalytics" className='justify-content-between d-flex'>
47+
<div className='mt-3'>
6048
<h6><FormattedMessage id="remixApp.mpOp2Title" /></h6>
6149
<p className='form-check-label'><FormattedMessage id="remixApp.mpOp2Details" /></p>
6250
<p className='mt-1'><FormattedMessage
@@ -72,28 +60,38 @@ const ManagePreferencesSwitcher = (prop: {
7260
</div>
7361
<div>
7462
<button
75-
data-id="matomoAnonAnalyticsSwitch"
76-
id='matomoAnonAnalyticsSwitch'
77-
className="btn text-ai"
78-
onClick={() => setMatAnonSwitch(!matAnonSwitch)}
63+
data-id="matomoPerfAnalyticsSwitch"
64+
id='matomoPerfAnalyticsSwitch'
65+
className="btn text-ai mt-1"
66+
onClick={() => setMatPerfSwitch(!matPerfSwitch)}
7967
>
80-
{ matAnonSwitch ? <i className="fas fa-toggle-on fa-2xl"></i> : <i className="fas fa-toggle-off fa-2xl"></i> }
68+
{ matPerfSwitch ? <i className="fas fa-toggle-on fa-2xl"></i> : <i className="fas fa-toggle-off fa-2xl"></i> }
8169
</button>
8270
</div>
8371
</div>
84-
<div data-id="matomoPerfAnalytics" className='justify-content-between d-flex'>
72+
<div data-id="remixAI" className='justify-content-between d-flex'>
8573
<div className='mt-2'>
86-
<h6 className='text-secondary'><FormattedMessage id="remixApp.mpOp3Title" /></h6>
87-
<p className='form-check-label text-secondary'><FormattedMessage id="remixApp.mpOp3Details" /></p>
74+
<h6><FormattedMessage id="remixApp.mpOp3Title" /></h6>
75+
<p className='form-check-label'><FormattedMessage id="remixApp.mpOp3Details" /></p>
76+
<p className='mt-1'><FormattedMessage
77+
id="remixApp.mpOp3Link"
78+
values={{
79+
a: (chunks) => (
80+
<a className="text-primary" href="https://remix-ide.readthedocs.io/en/latest/ai.html" target="_blank" rel="noreferrer">
81+
{chunks}
82+
</a>
83+
),
84+
}}
85+
/></p>
8886
</div>
8987
<div>
9088
<button
91-
data-id="matomoPerfAnalyticsSwitch"
92-
id='matomoPerfAnalyticsSwitch'
93-
className="btn text-secondary"
94-
onClick={() => setMatPerfSwitch(!matPerfSwitch)}
89+
data-id="remixAISwitch"
90+
id='remixAISwitch'
91+
className="btn text-ai"
92+
onClick={() => setRemixAISwitch(!remixAISwitch)}
9593
>
96-
{ matPerfSwitch ? <i className="fas fa-toggle-on fa-2xl"></i> : <i className="fas fa-toggle-off fa-2xl"></i> }
94+
{ remixAISwitch ? <i className="fas fa-toggle-on fa-2xl"></i> : <i className="fas fa-toggle-off fa-2xl"></i> }
9795
</button>
9896
</div>
9997
</div>
@@ -116,8 +114,6 @@ const ManagePreferencesDialog = (props: ManagePreferencesDialogProps) => {
116114
}} />,
117115
okLabel: <FormattedMessage id="remixApp.savePreferences" />,
118116
okFn: savePreferences,
119-
cancelLabel: <FormattedMessage id="remixApp.declineCookies" />,
120-
cancelFn: () => {},
121117
showCancelIcon: true,
122118
preventBlur: true
123119
})

0 commit comments

Comments
 (0)