diff --git a/.gitignore b/.gitignore index 0a587cc44..6fd2a0956 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ cypress.env.json /apps/**/cypress/reports/ /apps/**/cypress/downloads/ /apps/**/fixtures/wallet/node** +.nx/ diff --git a/apps/trading/components/settings/settings.tsx b/apps/trading/components/settings/settings.tsx index 0d5f5eb43..f0ac6f764 100644 --- a/apps/trading/components/settings/settings.tsx +++ b/apps/trading/components/settings/settings.tsx @@ -1,12 +1,19 @@ import { t } from '@vegaprotocol/i18n'; -import { Switch, ToastPositionSetter } from '@vegaprotocol/ui-toolkit'; +import { + Dialog, + Intent, + Switch, + ToastPositionSetter, + TradingButton, +} from '@vegaprotocol/ui-toolkit'; import { useThemeSwitcher } from '@vegaprotocol/react-helpers'; import { useTelemetryApproval } from '../../lib/hooks/use-telemetry-approval'; -import type { ReactNode } from 'react'; +import { useState, type ReactNode } from 'react'; export const Settings = () => { const { theme, setTheme } = useThemeSwitcher(); const [isApproved, setIsApproved] = useTelemetryApproval(); + const [open, setOpen] = useState(false); return (
@@ -31,6 +38,47 @@ export const Settings = () => { + + { + setOpen(true); + }} + > + {t('Reset')} + + +
+

+ {t('Are you sure you want to reset all settings to default?')} +

+ +
+ { + localStorage.clear(); + window.location.reload(); + }} + > + {t('Yes, clear cache and refresh')} + + { + setOpen(false); + }} + > + {t('No, keep settings')} + +
+
+
+
); };