Skip to content

Commit 4f5e657

Browse files
committed
feat: full screen stuff.
1 parent 9910ca8 commit 4f5e657

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/components/CommandPalette.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ const CommandPalette = ({ isOpen, setIsOpen, openGenericModal, toggleDigitalRain
181181
}
182182
break;
183183
}
184+
case 'toggleFullScreen':
185+
if (!document.fullscreenElement) {
186+
document.documentElement.requestFullscreen();
187+
addToast({ title: 'Full Screen', message: 'Entered full screen mode.', duration: 2000 });
188+
} else if (document.exitFullscreen) {
189+
document.exitFullscreen();
190+
addToast({ title: 'Full Screen', message: 'Exited full screen mode.', duration: 2000 });
191+
}
192+
break;
184193
default:
185194
break;
186195
}

src/hooks/useSearchableData.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const useSearchableData = () => {
8585
{ title: 'Clear Local Storage', type: 'command', commandId: 'clearLocalStorage' },
8686
{ title: 'Reload Page', type: 'command', commandId: 'reloadPage' },
8787
{ title: 'Go to Random App', type: 'command', commandId: 'randomApp' },
88+
{ title: 'Toggle Full Screen', type: 'command', commandId: 'toggleFullScreen' },
8889
{ title: 'Her Daim', type: 'command', commandId: 'herDaim' },
8990
];
9091

0 commit comments

Comments
 (0)