diff --git a/src/App.tsx b/src/App.tsx index f6aa7d6..60179bc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,7 +9,7 @@ import Meeting from '@/page/Meeting/index' import NotFound from '@/page/NotFound/index' import { storage } from '@/utils' import { message, Spin } from "antd"; -import { onOtherSignalr, onReconnected, onStart, onStop, startSignalr } from "@/utils/package/signalr"; +import { onOtherSignalr, onReconnected, onStop, startSignalr } from "@/utils/package/signalr"; import JoinMeetingModal from "@/components/JoinMeetingModal"; import UpdateModal from "@/components/UpdateModal"; import * as CryptoJS from 'crypto-js'; @@ -160,13 +160,10 @@ const App: React.FC = () => { width: window.innerWidth, height: window.innerHeight, }); - try { - window.electron.getIsMaximized().then((res: boolean) => { - const dom = document.getElementById('root') as HTMLElement; - dom.style.borderRadius = res ? '0px' : '10px' - }) - } catch { - } + window.electron.getIsMaximized().then((res: boolean) => { + const dom = document.getElementById('root') as HTMLElement; + dom.style.borderRadius = res ? '0px' : '10px' + }) }; const onEventSignalr = (): void => { diff --git a/src/components/Operation/index.tsx b/src/components/Operation/index.tsx index 4bd1986..2ebc3dd 100644 --- a/src/components/Operation/index.tsx +++ b/src/components/Operation/index.tsx @@ -66,11 +66,9 @@ const Operation: React.FC = () => { }, []); const getIsMaximized = (): void => { - try { - window.electron.getIsMaximized().then((res: boolean) => { - changeOperationList(res ? 'maximize' : 'unmaximize') - }) - } catch { } + window.electron.getIsMaximized().then((res: boolean) => { + changeOperationList(res ? 'maximize' : 'unmaximize') + }) } const changeOperationList = (str: OperationKeyType): void => { diff --git a/src/components/SharedFilesModel/index.tsx b/src/components/SharedFilesModel/index.tsx index 097e9fa..7288ff1 100644 --- a/src/components/SharedFilesModel/index.tsx +++ b/src/components/SharedFilesModel/index.tsx @@ -196,7 +196,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { setIsUpFile(false) setUploadProgress(100) message.success('上传成功') - }).catch(error => { + }).catch(_error => { setIsUpFile(false) message.error('上传失败') }); diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index 7b288c7..90da6f0 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -40,15 +40,11 @@ const Login: React.FC = () => { const [nameModal, setNameModal] = useState(false) useEffect(() => { - try { - window.electron.setMainWindowSize({ - width: 752, - height: 520, - key: 'login' - }) - } catch { - - } + window.electron.setMainWindowSize({ + width: 752, + height: 520, + key: 'login' + }) if (storage.getItem('login')) { const login = JSON.parse(storage.getItem('login') as string); const data = {