From 2222a2b71c7e8d9e04916946bc10d1c0053cdf73 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Wed, 9 Dec 2020 05:31:13 -0800 Subject: [PATCH] Add option to wipe local storage Summary: This diff adds an option to wipe local storage to the settings dialog, to reset all preferences, table column widths, changelog and Nux state, etc. etc. in one go. This is primarily an self-fixing mechanism in case we mess up in the future, but useful during development / testing as well. Reviewed By: passy Differential Revision: D25421722 fbshipit-source-id: 3b69653b2142a7178ef83e01d35309f3a971e2cf --- desktop/app/src/chrome/SettingsSheet.tsx | 25 ++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/desktop/app/src/chrome/SettingsSheet.tsx b/desktop/app/src/chrome/SettingsSheet.tsx index 7e7756404..1c0fea0b4 100644 --- a/desktop/app/src/chrome/SettingsSheet.tsx +++ b/desktop/app/src/chrome/SettingsSheet.tsx @@ -27,7 +27,7 @@ import restartFlipper from '../utils/restartFlipper'; import LauncherSettingsPanel from '../fb-stubs/LauncherSettingsPanel'; import SandySettingsPanel from '../fb-stubs/SandySettingsPanel'; import {reportUsage} from '../utils/metrics'; -import {Modal} from 'antd'; +import {Modal, message} from 'antd'; import {Layout, withTrackingScope, _NuxManagerContext} from 'flipper-plugin'; const Container = styled(FlexColumn)({ @@ -143,7 +143,7 @@ class SettingsSheet extends Component { isEqual(this.props.launcherSettings, this.state.updatedLauncherSettings); const contents = ( - <> + { Reset all new user tooltips - + + Reset all local storage based state + + + ); const footer = ( @@ -375,7 +379,20 @@ function ResetTooltips() { onClick={() => { nuxManager.resetHints(); }}> - Reset + Reset hints + + ); +} + +function ResetLocalState() { + return ( + ); }