From c8d90028ae71e2fc3f7df10968776412b2f46a55 Mon Sep 17 00:00:00 2001 From: xcv58 Date: Tue, 14 Feb 2023 23:38:07 -0500 Subject: [PATCH] feat: Add option to toggle popup lite mode (#2314) --- packages/extension/src/js/components/Main.tsx | 9 ++++++--- .../src/js/components/Tab/TabContent.tsx | 2 +- .../js/components/Toolbar/SettingsDialog.tsx | 12 ++++++++++++ .../extension/src/js/stores/UserStore.tsx | 10 +++++++++- ...r-popup-mode-based-on-url-query-1-snap.png | Bin 130528 -> 31502 bytes ...r-popup-mode-based-on-url-query-2-snap.png | Bin 36478 -> 28184 bytes ...-support-search-browser-history-1-snap.png | Bin 34587 -> 31502 bytes 7 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packages/extension/src/js/components/Main.tsx b/packages/extension/src/js/components/Main.tsx index 5a0652b10..b8b40bbdc 100644 --- a/packages/extension/src/js/components/Main.tsx +++ b/packages/extension/src/js/components/Main.tsx @@ -19,6 +19,8 @@ export default observer(() => { const query = useQuery() const isPopup = !query.has(NOT_POPUP) const { windowStore, shortcutStore, userStore } = useStore() + const { toolbarAutoHide, litePopupMode } = userStore + const liteMode = isPopup && litePopupMode useEffect(() => { windowStore.didMount() shortcutStore.didMount() @@ -28,12 +30,13 @@ export default observer(() => {
- {isPopup && } - {!isPopup && ( + {liteMode ? ( + + ) : ( <> diff --git a/packages/extension/src/js/components/Tab/TabContent.tsx b/packages/extension/src/js/components/Tab/TabContent.tsx index 01fc40af5..0d369b5bd 100644 --- a/packages/extension/src/js/components/Tab/TabContent.tsx +++ b/packages/extension/src/js/components/Tab/TabContent.tsx @@ -32,7 +32,7 @@ const TabContent = observer( ) return ( - +