Skip to content

Commit

Permalink
Website: Support setting title for popout. v5.14.10
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 22, 2024
1 parent 8d45d8c commit 0d07699
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ The following are the update records for the SRS Stack server.
* Room: Enable dictation mode for AI-Talk. v5.14.7
* Dubbing: Refine download button with comments. v5.14.8
* Room: AI-Talk support post processing. v5.14.9
* Website: Support setting title for popout. v5.14.10
* v5.13:
* Fix bug for vlive and transcript. v5.13.1
* Support AWS Lightsail install script. v5.13.2
Expand Down
9 changes: 9 additions & 0 deletions ui/src/pages/Popouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function Popouts() {
const location = useLocation();
const {i18n} = useTranslation();
const [initialized, setInitialized] = React.useState(false);
const handleError = useErrorHandler();

// Switch language for popout, because it does not use navigator, so there is no
// LanguageSwitch to do this.
Expand All @@ -40,6 +41,14 @@ export default function Popouts() {
setInitialized(true);
}, [setInitialized, i18n, location]);

React.useEffect(() => {
axios.get('/terraform/v1/mgmt/beian/query')
.then(res => {
document.title = res.data.data.title || 'SRS Stack';
console.log(`Beian: query ${JSON.stringify(res.data.data)}`);
}).catch(handleError);
}, [handleError]);

return (
<Container fluid>
<p></p>
Expand Down

0 comments on commit 0d07699

Please sign in to comment.