Skip to content

Commit f0cfebf

Browse files
committed
disable matomo necessary in settings
1 parent 4f6bccb commit f0cfebf

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"settings.analyticsDescription": "Control how Remix uses AI and analytics to improve your experience.",
5858
"settings.aiDescription": "The Remix AI Assistant enhances your coding experience with smart suggestions and automated insights. Manage how AI interacts with your code and data.",
5959
"settings.servicesDescription": "Configure the settings for connected services, including Github, IPFS, Swarm, Sindri and Etherscan.",
60-
"settings.matomoAnalyticsNoCookies": "Matomo Analytics (no cookies)",
60+
"settings.matomoAnalyticsNoCookies": "Matomo Analytics (necessary, no cookies)",
6161
"settings.matomoAnalyticsNoCookiesDescription": "Help improve Remix with anonymous usage data.",
6262
"settings.matomoAnalyticsWithCookies": "Matomo Analytics (with cookies)",
6363
"settings.matomoAnalyticsWithCookiesDescription": "Enable tracking with cookies for more detailed insights.",

libs/remix-ui/settings/src/lib/remix-ui-settings.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,9 @@ const settingsSections: SettingsSection[] = [
9696
{ options: [{
9797
name: 'matomo-analytics',
9898
label: 'settings.matomoAnalyticsNoCookies',
99+
headerClass: 'text-secondary',
99100
type: 'toggle',
100101
description: 'settings.matomoAnalyticsNoCookiesDescription',
101-
footnote: {
102-
text: 'Learn more about analytics',
103-
link: 'https://matomo.org/',
104-
styleClass: 'text-primary'
105-
}
106102
}, {
107103
name: 'matomo-perf-analytics',
108104
label: 'settings.matomoAnalyticsWithCookies',

libs/remix-ui/settings/src/lib/settings-section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ export const SettingsSectionUI: React.FC<SettingsSectionUIProps> = ({ plugin, se
9494
return (
9595
<div className={`card border-0 rounded-0 ${isLastOption ? 'pt-3 pb-0' : isFirstOption ? 'border-bottom pb-3' : 'border-bottom py-3'}`} key={optionIndex}>
9696
<div className="d-flex align-items-center">
97-
<h5 data-id={`settingsTab${option.name}Label`} className={`${isDark ? 'text-white' : 'text-black'} m-0`}>
97+
<h5 data-id={`settingsTab${option.name}Label`} className={`${option.headerClass || (isDark ? 'text-white' : 'text-black')} m-0`}>
9898
<FormattedMessage id={option.label} />
9999
{option.labelIconTooltip ?
100100
<CustomTooltip tooltipText={<FormattedMessage id={option.labelIconTooltip} />}><i className={option.labelIcon}></i></CustomTooltip> :
101101
option.labelIcon && <i className={option.labelIcon}></i>
102102
}
103103
</h5>
104104
<div className="ms-auto">
105-
{option.type === 'toggle' && <ToggleSwitch id={option.name} isOn={toggleValue} onClick={() => handleToggle(option.name)} />}
105+
{option.type === 'toggle' && <ToggleSwitch id={option.name} isOn={toggleValue} onClick={() => handleToggle(option.name)} disabled = {option.name === "matomo-analytics" ? true : false}/>}
106106
{option.type === 'select' && <div style={{ minWidth: '110px' }}><SelectDropdown value={selectValue} options={option.selectOptions} name={option.name} dispatch={dispatch as any} /></div>}
107107
{option.type === 'button' && <button className="btn btn-secondary btn-sm" onClick={() => handleButtonClick(option.buttonOptions)}><FormattedMessage id={option.buttonOptions.label} /></button>}
108108
</div>

libs/remix-ui/settings/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface SettingsSection {
4747
name: keyof SettingsState,
4848
label: string,
4949
labelIcon?: string,
50+
headerClass?: string,
5051
labelIconTooltip?: string,
5152
description?: string | JSX.Element,
5253
footnote?: {

0 commit comments

Comments
 (0)