mirror of
https://github.com/sipeed/NanoKVM-USB.git
synced 2026-11-09 17:04:27 -06:00
perf(desktop): delete the fullscreen button in the menu bar
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import { ReactElement, useState } from 'react'
|
||||
import { MaximizeIcon, MinimizeIcon } from 'lucide-react'
|
||||
|
||||
import { IpcEvents } from '@common/ipc-events'
|
||||
|
||||
export const Fullscreen = (): ReactElement => {
|
||||
const [isFullscreen, setIsFullscreen] = useState(false)
|
||||
|
||||
function handleFullscreen(): void {
|
||||
const fullscreen = !isFullscreen
|
||||
|
||||
window.electron.ipcRenderer.send(IpcEvents.SET_FULL_SCREEN, fullscreen)
|
||||
setIsFullscreen(fullscreen)
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex h-[28px] cursor-pointer items-center justify-center rounded px-2 text-white hover:bg-neutral-700/70"
|
||||
onClick={handleFullscreen}
|
||||
>
|
||||
{isFullscreen ? <MinimizeIcon size={18} /> : <MaximizeIcon size={18} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import Draggable from 'react-draggable'
|
||||
|
||||
import * as storage from '@renderer/libs/storage'
|
||||
|
||||
import { Fullscreen } from './fullscreen'
|
||||
import { Keyboard } from './keyboard'
|
||||
import { Mouse } from './mouse'
|
||||
import { Recorder } from './recorder'
|
||||
@@ -115,7 +114,6 @@ export const Menu = (): ReactElement => {
|
||||
|
||||
<Divider type="vertical" className="px-0.5" />
|
||||
|
||||
<Fullscreen />
|
||||
<Settings />
|
||||
<div
|
||||
className="flex h-[28px] cursor-pointer items-center justify-center rounded px-2 text-white hover:bg-neutral-700/70"
|
||||
|
||||
Reference in New Issue
Block a user