去除多余代码
This commit is contained in:
parent
84bd0ba160
commit
6df9b3fa63
13
src/App.tsx
13
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 => {
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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('上传失败')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue