From 8ad470aaf5434005db4c59106dcbcf4cbc8cf49b Mon Sep 17 00:00:00 2001 From: sowgro Date: Tue, 3 Dec 2024 00:02:21 -0500 Subject: Push drag and drop code so far --- extension/src/components/Body.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'extension/src/components/Body.tsx') diff --git a/extension/src/components/Body.tsx b/extension/src/components/Body.tsx index e575d89..07b0259 100644 --- a/extension/src/components/Body.tsx +++ b/extension/src/components/Body.tsx @@ -9,9 +9,15 @@ import {getBrowser} from "../main.tsx"; export const Settings = React.createContext<[ISettings, (arg0: ISettings) => void]>([ - defaultSettings, - () => {} -]); + defaultSettings, + () => {} + ]); + +export const ActiveDrag = + React.createContext<[boolean, (arg0: boolean) => void]>([ + false, + () => {} + ]) /** * A component for the full body of the application @@ -22,6 +28,7 @@ function Body() { const [settings, setSettings] = useState(defaultSettings); const [selectedBookmarkTree, setSelectedBookmarkTree] = useState([]) const [fullBookmarkTree, setFullBookmarkTree] = useState([]) + const [activeDrag, setActiveDrag] = useState(false); useEffect(() => { loadSettings().then(r => { @@ -47,6 +54,7 @@ function Body() { return ( + {(() => {switch (settings.backgroundMode) { case "color": return () case "image": return () @@ -63,6 +71,7 @@ function Body() { {selectedBookmarkTree[0] && ()} + ) } -- cgit v1.2.3