去除多余代码
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 NotFound from '@/page/NotFound/index'
|
||||||
import { storage } from '@/utils'
|
import { storage } from '@/utils'
|
||||||
import { message, Spin } from "antd";
|
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 JoinMeetingModal from "@/components/JoinMeetingModal";
|
||||||
import UpdateModal from "@/components/UpdateModal";
|
import UpdateModal from "@/components/UpdateModal";
|
||||||
import * as CryptoJS from 'crypto-js';
|
import * as CryptoJS from 'crypto-js';
|
||||||
|
|
@ -160,13 +160,10 @@ const App: React.FC = () => {
|
||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
});
|
});
|
||||||
try {
|
window.electron.getIsMaximized().then((res: boolean) => {
|
||||||
window.electron.getIsMaximized().then((res: boolean) => {
|
const dom = document.getElementById('root') as HTMLElement;
|
||||||
const dom = document.getElementById('root') as HTMLElement;
|
dom.style.borderRadius = res ? '0px' : '10px'
|
||||||
dom.style.borderRadius = res ? '0px' : '10px'
|
})
|
||||||
})
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onEventSignalr = (): void => {
|
const onEventSignalr = (): void => {
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,9 @@ const Operation: React.FC = () => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getIsMaximized = (): void => {
|
const getIsMaximized = (): void => {
|
||||||
try {
|
window.electron.getIsMaximized().then((res: boolean) => {
|
||||||
window.electron.getIsMaximized().then((res: boolean) => {
|
changeOperationList(res ? 'maximize' : 'unmaximize')
|
||||||
changeOperationList(res ? 'maximize' : 'unmaximize')
|
})
|
||||||
})
|
|
||||||
} catch { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeOperationList = (str: OperationKeyType): void => {
|
const changeOperationList = (str: OperationKeyType): void => {
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
||||||
setIsUpFile(false)
|
setIsUpFile(false)
|
||||||
setUploadProgress(100)
|
setUploadProgress(100)
|
||||||
message.success('上传成功')
|
message.success('上传成功')
|
||||||
}).catch(error => {
|
}).catch(_error => {
|
||||||
setIsUpFile(false)
|
setIsUpFile(false)
|
||||||
message.error('上传失败')
|
message.error('上传失败')
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -40,15 +40,11 @@ const Login: React.FC = () => {
|
||||||
const [nameModal, setNameModal] = useState(false)
|
const [nameModal, setNameModal] = useState(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
try {
|
window.electron.setMainWindowSize({
|
||||||
window.electron.setMainWindowSize({
|
width: 752,
|
||||||
width: 752,
|
height: 520,
|
||||||
height: 520,
|
key: 'login'
|
||||||
key: 'login'
|
})
|
||||||
})
|
|
||||||
} catch {
|
|
||||||
|
|
||||||
}
|
|
||||||
if (storage.getItem('login')) {
|
if (storage.getItem('login')) {
|
||||||
const login = JSON.parse(storage.getItem('login') as string);
|
const login = JSON.parse(storage.getItem('login') as string);
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue