diff --git a/ui/src/components/PopoverConfirm.js b/ui/src/components/PopoverConfirm.js index a6e7e59d..8f4f8a64 100644 --- a/ui/src/components/PopoverConfirm.js +++ b/ui/src/components/PopoverConfirm.js @@ -7,7 +7,7 @@ import React from "react"; import {Button, OverlayTrigger, Popover} from "react-bootstrap"; import {useSrsLanguage} from "./LanguageSwitch"; -export default function PopoverConfirm({onClick, trigger, children}) { +export default function PopoverConfirm({onClick, trigger, children, placement}) { const [startUpgrade, setStartUpgrade] = React.useState(); const language = useSrsLanguage(); @@ -46,7 +46,7 @@ export default function PopoverConfirm({onClick, trigger, children}) { ); return ( - + { e.preventDefault(); setStartUpgrade(!startUpgrade); diff --git a/ui/src/pages/Scenario.js b/ui/src/pages/Scenario.js index a5510ec6..2a05adfb 100644 --- a/ui/src/pages/Scenario.js +++ b/ui/src/pages/Scenario.js @@ -10,7 +10,6 @@ import {Clipboard, Token} from "../utils"; import axios from "axios"; import ScenarioLive from './ScenarioLive'; import useUrls from "../components/UrlGenerator"; -import ScenarioRecordVod from './ScenarioRecordVod'; import ScenarioForward from './ScenarioForward'; import {useErrorHandler} from 'react-error-boundary'; import {SrsErrorBoundary} from "../components/SrsErrorBoundary"; diff --git a/ui/src/pages/ScenarioRecord.js b/ui/src/pages/ScenarioRecord.js index f81c7ab1..dcef870b 100644 --- a/ui/src/pages/ScenarioRecord.js +++ b/ui/src/pages/ScenarioRecord.js @@ -18,10 +18,6 @@ import TutorialsText from "../components/TutorialsText"; export default function ScenarioRecord() { const language = useSrsLanguage(); - return language === 'zh' ? : ; -} - -function ScenarioRecordCn() { const recordStatus = useRecordStatus(); const [activeKey, setActiveKey] = React.useState(); @@ -37,14 +33,14 @@ function ScenarioRecordCn() { } }, [recordStatus]); - return ( - <> - { activeKey && } - - ); + if (!activeKey) return <>; + if (language === 'zh') { + return ; + } + return ; } -function ScenarioRecordImpl({activeKey, defaultApplyAll, recordHome}) { +function ScenarioRecordImplCn({activeKey, defaultApplyAll, recordHome}) { const [recordAll, setRecordAll] = React.useState(defaultApplyAll); const [recordFiles, setRecordFiles] = React.useState(); const [refreshNow, setRefreshNow] = React.useState(); @@ -206,7 +202,7 @@ function ScenarioRecordImpl({activeKey, defaultApplyAll, recordHome}) { copyToClipboard(e, file.location)} target='_blank' rel='noreferrer'>复制 预览   -