This commit is contained in:
yj 2024-08-14 14:06:53 +08:00
parent 7ad3970e4e
commit 4f0997bfc1
4 changed files with 7 additions and 8 deletions

10
main.js
View File

@ -255,11 +255,11 @@ app.on('ready', () => {
}
// 设置窗口尺寸
mainWindow.setSize(config.width, config.height)
// 设置窗口位置使其居中于当前屏幕
const display = screen.getDisplayMatching({...mainWindow.getBounds()});
const x = Math.round((display.workArea.width - mainWindow.getSize()[0]) / 2);
const y = Math.round((display.workArea.height - mainWindow.getSize()[1]) / 2);
mainWindow.setPosition(x, y);
// // 设置窗口位置使其居中于当前屏幕
// const display = screen.getDisplayMatching({...mainWindow.getBounds()});
// const x = Math.round((display.workArea.width - mainWindow.getSize()[0]) / 2);
// const y = Math.round((display.workArea.height - mainWindow.getSize()[1]) / 2);
// mainWindow.setPosition(x, y);
});
});

View File

@ -7,7 +7,7 @@ import { useState, useImperativeHandle, forwardRef } from "react";
import { PostRefresh } from '@/api/Login';
import Avatar from '@/components/Avatar';
import { useNavigate } from 'react-router-dom';
const JoinSetting = forwardRef((props: any, ref: any) => {
const JoinSetting = forwardRef((_props: any, ref: any) => {
useImperativeHandle(ref, () => ({
changeModal: (roomNum: string = '') => {
let userInfo = JSON.parse(storage.getItem('user') as string)

View File

@ -72,7 +72,6 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
centered
width={'800px'}
onCancel={() => setIsSharedFilesModel(false)}
maskClosable
>
<div>
<div className={styles.sharedFilesModel}>

View File

@ -52,7 +52,7 @@ const UpdateModal = forwardRef((props: any, ref: any) => {
centered
width={'338px'}
className='modal-padding'
maskClosable={true}
maskClosable={false}
>
<div className={styles.isUpdateModal} style={{ backgroundImage: `url(${ImageUrl.icon7})` }}>
<div className={styles.remarks}>