yangjie #22
|
|
@ -126,6 +126,7 @@ const App: React.FC = () => {
|
|||
closeSetting: 'hide', //关闭按钮设置
|
||||
isAINoiseReduction: true, //是否开启ai降噪
|
||||
aINoiseReduction: 1, // 降噪模式
|
||||
isRecordingTips: true, //是否开启录制提示
|
||||
}))
|
||||
}
|
||||
if (!storage.getItem('openChildWindow')) {
|
||||
|
|
|
|||
|
|
@ -176,19 +176,23 @@
|
|||
}
|
||||
|
||||
.recordingComponents {
|
||||
>span {
|
||||
color: #bfbfbf;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
>span {
|
||||
color: #878787;
|
||||
white-space: nowrap;
|
||||
color: #bfbfbf;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
|
||||
>span {
|
||||
color: #878787;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -464,6 +464,7 @@ const AudioComponents = () => {
|
|||
}
|
||||
const RecordingComponents = () => {
|
||||
const [filePath, setFilePath] = useState('')
|
||||
const [isRecordingTips, setIsRecordingTips] = useState(false)
|
||||
const setting = JSON.parse(storage.getItem('setting') as string)
|
||||
useEffect(() => {
|
||||
if (!setting.recordingFilesPath) {
|
||||
|
|
@ -472,10 +473,14 @@ const RecordingComponents = () => {
|
|||
const parentDirectory = path.resolve(currentDirectory, '../../Downloads') + '\\';
|
||||
setting.recordingFilesPath = parentDirectory;
|
||||
setFilePath(setting.recordingFilesPath)
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
} else {
|
||||
setFilePath(setting.recordingFilesPath);
|
||||
}
|
||||
if (setting.isRecordingTips === undefined) {
|
||||
setting.isRecordingTips = true;
|
||||
}
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
setIsRecordingTips(setting.isRecordingTips)
|
||||
window.addEventListener('customStorageChange', handleCustomStorageChange);
|
||||
return () => {
|
||||
window.removeEventListener('customStorageChange', handleCustomStorageChange);
|
||||
|
|
@ -492,41 +497,53 @@ const RecordingComponents = () => {
|
|||
<div>
|
||||
<span>录制</span>
|
||||
<div className={styles.recordingComponents}>
|
||||
<span>本地录制</span>
|
||||
<div>
|
||||
<span>本地录制文件路径</span>
|
||||
<Input
|
||||
disabled={true}
|
||||
placeholder="请填入文件路径"
|
||||
style={{ margin: '0 14px', flexGrow: 1 }}
|
||||
value={filePath}
|
||||
onChange={async (e) => {
|
||||
setting.recordingFilesPath = e.target.value;
|
||||
<span>本地录制</span>
|
||||
<div>
|
||||
<span>本地录制文件路径</span>
|
||||
<Input
|
||||
disabled={true}
|
||||
placeholder="请填入文件路径"
|
||||
style={{ margin: '0 14px', flexGrow: 1 }}
|
||||
value={filePath}
|
||||
onChange={async (e) => {
|
||||
setting.recordingFilesPath = e.target.value;
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
setFilePath(e.target.value)
|
||||
}}
|
||||
/>
|
||||
<Button type="primary" onClick={() => {
|
||||
window.electron.selectFilePath({
|
||||
key: 'recordingFilesPath',
|
||||
})
|
||||
}} style={{ backgroundColor: '#31353A', marginRight: '10px' }}>选择保存目录</Button>
|
||||
<Button type="primary" onClick={async () => {
|
||||
try {
|
||||
await fs.access(filePath, fs.constants.F_OK);
|
||||
if (process.platform === 'win32') {
|
||||
exec(`explorer "${filePath}"`);
|
||||
} else if (process.platform === 'darwin') {
|
||||
exec(`open "${filePath}"`);
|
||||
}
|
||||
} catch (error: any) {
|
||||
if (error.code === 'ENOENT') {
|
||||
message.error('文件夹不存在!')
|
||||
} else {
|
||||
message.error(error)
|
||||
}
|
||||
}
|
||||
}} style={{ backgroundColor: '#31353A' }}>打开</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span>录制设置</span>
|
||||
<div>
|
||||
<Checkbox onChange={async (e) => {
|
||||
setting.isRecordingTips = e.target.checked;
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
setFilePath(e.target.value)
|
||||
}}
|
||||
/>
|
||||
<Button type="primary" onClick={() => {
|
||||
window.electron.selectFilePath({
|
||||
key: 'recordingFilesPath',
|
||||
})
|
||||
}} style={{ backgroundColor: '#31353A', marginRight: '10px' }}>选择保存目录</Button>
|
||||
<Button type="primary" onClick={async () => {
|
||||
try {
|
||||
await fs.access(filePath, fs.constants.F_OK);
|
||||
if (process.platform === 'win32') {
|
||||
exec(`explorer "${filePath}"`);
|
||||
} else if (process.platform === 'darwin') {
|
||||
exec(`open "${filePath}"`);
|
||||
}
|
||||
} catch (error: any) {
|
||||
if (error.code === 'ENOENT') {
|
||||
message.error('文件夹不存在!')
|
||||
} else {
|
||||
message.error(error)
|
||||
}
|
||||
}
|
||||
}} style={{ backgroundColor: '#31353A' }}>打开</Button>
|
||||
setIsRecordingTips(e.target.checked)
|
||||
}} checked={isRecordingTips}>开启入会录制提示</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -337,6 +337,27 @@ const Meeting: React.FC = () => {
|
|||
time: changeCurrentSeconds(),
|
||||
});
|
||||
}, 1000)
|
||||
setTimeout(async () => {
|
||||
const setting = await JSON.parse(storage.getItem('setting') as string);
|
||||
const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);
|
||||
if (stateInfo && setting.isRecordingTips && !recorder) {
|
||||
confirm({
|
||||
title: '提示',
|
||||
icon: <ExclamationCircleFilled />,
|
||||
content: `是否录制本次会议?`,
|
||||
centered: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
async onOk() {
|
||||
changeStatusList({
|
||||
title: '录制'
|
||||
}, 1, 3)
|
||||
},
|
||||
onCancel() {
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 10000);
|
||||
// getDesktopCapturerVideoTime = setInterval(() => {
|
||||
// setSharedScreenItem((i: any) => {
|
||||
// if (i && i.type === 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue