mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-28 13:57:51 +00:00
remove full screen on double click
This commit is contained in:
parent
9a227e4e53
commit
3c242a688c
22
src/App.tsx
22
src/App.tsx
@ -102,7 +102,6 @@ import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil';
|
||||
import {
|
||||
canSaveSettingToQdnAtom,
|
||||
enabledDevModeAtom,
|
||||
fullScreenAtom,
|
||||
groupsPropertiesAtom,
|
||||
hasSettingsChangedAtom,
|
||||
isDisabledEditorEnterAtom,
|
||||
@ -115,7 +114,6 @@ import {
|
||||
settingsQDNLastUpdatedAtom,
|
||||
sortablePinnedAppsAtom,
|
||||
} from './atoms/global';
|
||||
import { useAppFullScreen } from './useAppFullscreen';
|
||||
import { NotAuthenticated } from './ExtStates/NotAuthenticated';
|
||||
import { handleGetFileFromIndexedDB } from './utils/indexedDB';
|
||||
import { Wallets } from './Wallets';
|
||||
@ -407,12 +405,10 @@ function App() {
|
||||
const qortalRequestCheckbox1Ref = useRef(null);
|
||||
useRetrieveDataLocalStorage(userInfo?.address);
|
||||
useQortalGetSaveSettings(userInfo?.name, extState === 'authenticated');
|
||||
const [fullScreen, setFullScreen] = useRecoilState(fullScreenAtom);
|
||||
const [isEnabledDevMode, setIsEnabledDevMode] =
|
||||
useRecoilState(enabledDevModeAtom);
|
||||
const setIsDisabledEditorEnter = useSetRecoilState(isDisabledEditorEnterAtom);
|
||||
const [isOpenMinting, setIsOpenMinting] = useState(false);
|
||||
const { toggleFullScreen } = useAppFullScreen(setFullScreen);
|
||||
const generatorRef = useRef(null);
|
||||
|
||||
const exportSeedphrase = () => {
|
||||
@ -456,24 +452,6 @@ function App() {
|
||||
}
|
||||
}, [extState, walletToBeDownloaded, shownTutorialsInitiated]);
|
||||
|
||||
useEffect(() => {
|
||||
// Attach a global event listener for double-click
|
||||
const handleDoubleClick = () => {
|
||||
toggleFullScreen();
|
||||
};
|
||||
|
||||
// Add the event listener to the root HTML document
|
||||
document.documentElement.addEventListener('dblclick', handleDoubleClick);
|
||||
|
||||
// Clean up the event listener on unmount
|
||||
return () => {
|
||||
document.documentElement.removeEventListener(
|
||||
'dblclick',
|
||||
handleDoubleClick
|
||||
);
|
||||
};
|
||||
}, [toggleFullScreen]);
|
||||
|
||||
//resets for recoil
|
||||
const resetAtomSortablePinnedAppsAtom = useResetRecoilState(
|
||||
sortablePinnedAppsAtom
|
||||
|
Loading…
x
Reference in New Issue
Block a user