diff --git a/webclient/src/App.js b/webclient/src/App.js index b3abdeb..ea16c7e 100644 --- a/webclient/src/App.js +++ b/webclient/src/App.js @@ -41,63 +41,6 @@ function App() { cache.current[key] = value; }, []); - const light = () => { - setTheme(''); - localStorage.setItem('theme', ''); - }; - - const dark = () => { - setTheme('dark'); - localStorage.setItem('theme', 'dark'); - }; - - const black = () => { - setTheme('black'); - localStorage.setItem('theme', 'black'); - }; - - const red = () => { - setTheme('red'); - localStorage.setItem('theme', 'red'); - }; - - const handleFilterChange = e => { - const isChecked = e.target.checked; - setFilterSmallweb(isChecked); - localStorage.setItem('filterSmallweb', isChecked); - }; - - const handleFeedSourceChange = (source) => { - setFeedSources(prevSources => { - const newSources = { ...prevSources, [source]: !prevSources[source] }; - localStorage.setItem('feedSources', JSON.stringify(newSources)); - return newSources; - }); - }; - - const changeBodyFont = (font) => { - setBodyFont(font); - localStorage.setItem('bodyFont', font); - }; - - const changeArticleFont = (font) => { - setArticleFont(font); - localStorage.setItem('articleFont', font); - }; - - const changeBodyFontSize = (amount) => { - const newSize = bodyFontSize + amount; - setBodyFontSize(parseFloat(newSize.toFixed(2))); - localStorage.setItem('bodyFontSize', newSize.toFixed(2)); - }; - - const resetBodyFontSize = () => { - setBodyFontSize(defaultBodyFontSize); - localStorage.removeItem('bodyFontSize'); - }; - - const bodyFontSettingsChanged = bodyFontSize !== defaultBodyFontSize; - useEffect(() => { const onSWUpdate = e => { setWaitingWorker(e.detail.waiting); @@ -116,17 +59,6 @@ function App() { } }, [updateCache]); - const goFullScreen = () => { - if ('wakeLock' in navigator) { - navigator.wakeLock.request('screen'); - } - document.body.requestFullscreen({ navigationUI: 'hide' }); - }; - - const exitFullScreen = () => { - document.exitFullscreen(); - }; - useEffect(() => { const onFullScreenChange = () => setIsFullScreen(!!document.fullscreenElement); document.addEventListener('fullscreenchange', onFullScreenChange); @@ -171,104 +103,26 @@ function App() { }, [articleFont]); - const fullScreenAvailable = document.fullscreenEnabled || - document.mozFullscreenEnabled || - document.webkitFullscreenEnabled || - document.msFullscreenEnabled; - return (