diff --git a/apps/remix-ide/src/app/tabs/locales/en/settings.json b/apps/remix-ide/src/app/tabs/locales/en/settings.json index 85223986235..f473da1e0a1 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/settings.json +++ b/apps/remix-ide/src/app/tabs/locales/en/settings.json @@ -57,9 +57,9 @@ "settings.analyticsDescription": "Control how Remix uses AI and analytics to improve your experience.", "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.", "settings.servicesDescription": "Configure the settings for connected services, including Github, IPFS, Swarm, Sindri and Etherscan.", - "settings.matomoAnalyticsNoCookies": "Matomo Analytics (no cookies)", + "settings.matomoAnalyticsNoCookies": "Matomo Analytics (necessary, no cookies)", "settings.matomoAnalyticsNoCookiesDescription": "Help improve Remix with anonymous usage data.", - "settings.matomoAnalyticsWithCookies": "Matomo Analytics (with cookies)", + "settings.matomoAnalyticsWithCookies": "Matomo Performance Analytics (with cookies)", "settings.matomoAnalyticsWithCookiesDescription": "Enable tracking with cookies for more detailed insights.", "settings.aiCopilot": "AI Copilot", "settings.aiCopilotDescription": "AI Copilot assists with code suggestions and improvements.", diff --git a/apps/remix-ide/src/app/tabs/settings-tab.tsx b/apps/remix-ide/src/app/tabs/settings-tab.tsx index df531f04f61..abf6995a9d8 100644 --- a/apps/remix-ide/src/app/tabs/settings-tab.tsx +++ b/apps/remix-ide/src/app/tabs/settings-tab.tsx @@ -15,7 +15,7 @@ const _paq = (window._paq = window._paq || []) const profile = { name: 'settings', displayName: 'Settings', - methods: ['get', 'updateCopilotChoice', 'getCopilotSetting'], + methods: ['get', 'updateCopilotChoice', 'getCopilotSetting', 'updateMatomoPerfAnalyticsChoice'], events: [], icon: 'assets/img/settings.webp', description: 'Remix-IDE settings', diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index 409c7a9dcc7..014985de496 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -96,13 +96,9 @@ const settingsSections: SettingsSection[] = [ { options: [{ name: 'matomo-analytics', label: 'settings.matomoAnalyticsNoCookies', + headerClass: 'text-secondary', type: 'toggle', description: 'settings.matomoAnalyticsNoCookiesDescription', - footnote: { - text: 'Learn more about analytics', - link: 'https://matomo.org/', - styleClass: 'text-primary' - } }, { name: 'matomo-perf-analytics', label: 'settings.matomoAnalyticsWithCookies', diff --git a/libs/remix-ui/settings/src/lib/settings-section.tsx b/libs/remix-ui/settings/src/lib/settings-section.tsx index 7f23db9b36b..6079e0f4611 100644 --- a/libs/remix-ui/settings/src/lib/settings-section.tsx +++ b/libs/remix-ui/settings/src/lib/settings-section.tsx @@ -39,10 +39,8 @@ export const SettingsSectionUI: React.FC = ({ plugin, se const handleToggle = (name: string) => { if (state[name]) { const newValue = !state[name].value - dispatch({ type: 'SET_LOADING', payload: { name: name } }) dispatch({ type: 'SET_VALUE', payload: { name: name, value: newValue } }) - // _paq.push(['disableCookies']) if (!newValue && formUIData[name]) { Object.keys(formUIData[name]).forEach((key) => { dispatch({ type: 'SET_VALUE', payload: { name: key, value: '' } }) @@ -50,6 +48,7 @@ export const SettingsSectionUI: React.FC = ({ plugin, se dispatch({ type: 'SET_TOAST_MESSAGE', payload: { value: 'Credentials removed' } }) } if (name === 'copilot/suggest/activate') plugin.emit('copilotChoiceUpdated', newValue) + if (name === 'matomo-perf-analytics') plugin.call('settings', 'updateMatomoPerfAnalyticsChoice', newValue) if (name === 'text-wrap') plugin.emit('textWrapChoiceUpdated', newValue) } else { console.error('Setting does not exist: ', name) @@ -94,7 +93,7 @@ export const SettingsSectionUI: React.FC = ({ plugin, se return (
-
+
{option.labelIconTooltip ? }> : @@ -102,7 +101,7 @@ export const SettingsSectionUI: React.FC = ({ plugin, se }
- {option.type === 'toggle' && handleToggle(option.name)} />} + {option.type === 'toggle' && handleToggle(option.name)} disabled = {option.name === "matomo-analytics" ? true : false}/>} {option.type === 'select' &&
} {option.type === 'button' && }
diff --git a/libs/remix-ui/settings/src/types/index.ts b/libs/remix-ui/settings/src/types/index.ts index 03e938aab22..9106fddd571 100644 --- a/libs/remix-ui/settings/src/types/index.ts +++ b/libs/remix-ui/settings/src/types/index.ts @@ -47,6 +47,7 @@ export interface SettingsSection { name: keyof SettingsState, label: string, labelIcon?: string, + headerClass?: string, labelIconTooltip?: string, description?: string | JSX.Element, footnote?: {