yangjie #22

Merged
yangqiang merged 99 commits from yangjie into master 2024-10-22 16:11:46 +08:00
4 changed files with 87 additions and 44 deletions
Showing only changes of commit 3e31304d43 - Show all commits

View File

@ -126,6 +126,7 @@ const App: React.FC = () => {
closeSetting: 'hide', //关闭按钮设置 closeSetting: 'hide', //关闭按钮设置
isAINoiseReduction: true, //是否开启ai降噪 isAINoiseReduction: true, //是否开启ai降噪
aINoiseReduction: 1, // 降噪模式 aINoiseReduction: 1, // 降噪模式
isRecordingTips: true, //是否开启录制提示
})) }))
} }
if (!storage.getItem('openChildWindow')) { if (!storage.getItem('openChildWindow')) {

View File

@ -176,6 +176,9 @@
} }
.recordingComponents { .recordingComponents {
>div {
margin-bottom: 20px;
>span { >span {
color: #bfbfbf; color: #bfbfbf;
font-size: 16px; font-size: 16px;
@ -191,6 +194,7 @@
white-space: nowrap; white-space: nowrap;
} }
} }
}
} }
.fileComponents { .fileComponents {

View File

@ -464,6 +464,7 @@ const AudioComponents = () => {
} }
const RecordingComponents = () => { const RecordingComponents = () => {
const [filePath, setFilePath] = useState('') const [filePath, setFilePath] = useState('')
const [isRecordingTips, setIsRecordingTips] = useState(false)
const setting = JSON.parse(storage.getItem('setting') as string) const setting = JSON.parse(storage.getItem('setting') as string)
useEffect(() => { useEffect(() => {
if (!setting.recordingFilesPath) { if (!setting.recordingFilesPath) {
@ -472,10 +473,14 @@ const RecordingComponents = () => {
const parentDirectory = path.resolve(currentDirectory, '../../Downloads') + '\\'; const parentDirectory = path.resolve(currentDirectory, '../../Downloads') + '\\';
setting.recordingFilesPath = parentDirectory; setting.recordingFilesPath = parentDirectory;
setFilePath(setting.recordingFilesPath) setFilePath(setting.recordingFilesPath)
storage.setItem('setting', JSON.stringify(setting))
} else { } else {
setFilePath(setting.recordingFilesPath); setFilePath(setting.recordingFilesPath);
} }
if (setting.isRecordingTips === undefined) {
setting.isRecordingTips = true;
}
storage.setItem('setting', JSON.stringify(setting))
setIsRecordingTips(setting.isRecordingTips)
window.addEventListener('customStorageChange', handleCustomStorageChange); window.addEventListener('customStorageChange', handleCustomStorageChange);
return () => { return () => {
window.removeEventListener('customStorageChange', handleCustomStorageChange); window.removeEventListener('customStorageChange', handleCustomStorageChange);
@ -492,6 +497,7 @@ const RecordingComponents = () => {
<div> <div>
<span></span> <span></span>
<div className={styles.recordingComponents}> <div className={styles.recordingComponents}>
<div>
<span></span> <span></span>
<div> <div>
<span></span> <span></span>
@ -529,6 +535,17 @@ const RecordingComponents = () => {
}} style={{ backgroundColor: '#31353A' }}></Button> }} style={{ backgroundColor: '#31353A' }}></Button>
</div> </div>
</div> </div>
<div>
<span></span>
<div>
<Checkbox onChange={async (e) => {
setting.isRecordingTips = e.target.checked;
storage.setItem('setting', JSON.stringify(setting))
setIsRecordingTips(e.target.checked)
}} checked={isRecordingTips}></Checkbox>
</div>
</div>
</div>
</div> </div>
</> </>
) )

View File

@ -337,6 +337,27 @@ const Meeting: React.FC = () => {
time: changeCurrentSeconds(), time: changeCurrentSeconds(),
}); });
}, 1000) }, 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(() => { // getDesktopCapturerVideoTime = setInterval(() => {
// setSharedScreenItem((i: any) => { // setSharedScreenItem((i: any) => {
// if (i && i.type === 0) { // if (i && i.type === 0) {