From 3e31304d439ba49180850411b02254bbfe9510a7 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 15 Oct 2024 15:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E5=88=B6=E8=AE=BE=E7=BD=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 1 + src/components/StupWizard/index.module.scss | 24 +++--- src/components/StupWizard/index.tsx | 85 ++++++++++++--------- src/page/Meeting/index.tsx | 21 +++++ 4 files changed, 87 insertions(+), 44 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f7805ca..d39f593 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -126,6 +126,7 @@ const App: React.FC = () => { closeSetting: 'hide', //关闭按钮设置 isAINoiseReduction: true, //是否开启ai降噪 aINoiseReduction: 1, // 降噪模式 + isRecordingTips: true, //是否开启录制提示 })) } if (!storage.getItem('openChildWindow')) { diff --git a/src/components/StupWizard/index.module.scss b/src/components/StupWizard/index.module.scss index bd57960..5a760a6 100644 --- a/src/components/StupWizard/index.module.scss +++ b/src/components/StupWizard/index.module.scss @@ -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; + } } } } diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index 6dc22d6..38afd49 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -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 = () => {
录制
- 本地录制
- 本地录制文件路径 - { - setting.recordingFilesPath = e.target.value; + 本地录制 +
+ 本地录制文件路径 + { + setting.recordingFilesPath = e.target.value; + storage.setItem('setting', JSON.stringify(setting)) + setFilePath(e.target.value) + }} + /> + + +
+
+
+ 录制设置 +
+ { + setting.isRecordingTips = e.target.checked; storage.setItem('setting', JSON.stringify(setting)) - setFilePath(e.target.value) - }} - /> - - + setIsRecordingTips(e.target.checked) + }} checked={isRecordingTips}>开启入会录制提示 +
diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index c7184f4..2b32883 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -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: , + content: `是否录制本次会议?`, + centered: true, + okText: '确定', + cancelText: '取消', + async onOk() { + changeStatusList({ + title: '录制' + }, 1, 3) + }, + onCancel() { + } + }) + } + }, 10000); // getDesktopCapturerVideoTime = setInterval(() => { // setSharedScreenItem((i: any) => { // if (i && i.type === 0) {