From 5f28d4dbac4f6488afb85aebc770d9c40a8df966 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Sun, 31 Jul 2022 16:51:29 +0200 Subject: [PATCH] sessionStorage is back --- src/renderer/App.tsx | 3 +++ src/renderer/pages/WelcomePage.js | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index d1f1bd11..f9b82876 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -87,6 +87,9 @@ export default function App() { }, }); + + + return ( { }, [mode]); useEffect(() => { -// const settingsStorage = localStorage.getItem('settings_emudeck'); -// -// if (!!settingsStorage) { -// setState(JSON.parse(settingsStorage)); -// setStatePage({ ...statePage, disabledNext: false }); -// } + const settingsStorage = JSON.parse(localStorage.getItem('settings_emudeck')); + if (!!settingsStorage) { + setState({...state, ...settingsStorage}); + setStatePage({ ...statePage, disabledNext: false }); + } if (cloned == false) { ipcChannel.sendMessage('bash', [ 'clone|||mkdir -p ~/emudeck/backend && git clone https://github.com/dragoonDorise/EmuDeck.git ~/emudeck/backend/ && cd ~/emudeck/backend && git checkout '+branch+' && touch ~/emudeck/.cloned && printf "\ec" && echo true', @@ -73,7 +72,6 @@ const WelcomePage = () => { 'pull|||cd ~/emudeck/backend && git reset --hard && git clean -fd && git checkout '+branch+' && git pull', ]); ipcChannel.on('pull', (stdout) => { - console.log(stdout); setStatePage({ ...statePage, downloadComplete: true }); }); } @@ -81,7 +79,7 @@ const WelcomePage = () => { return (