Add reset button to hide a player logo (datarhei/restreamer#431)

This commit is contained in:
Jan Stabenow 2022-10-19 20:39:33 +02:00
parent b5967f24e6
commit 24b14a2d75
No known key found for this signature in database
GPG Key ID: 9C22DD65A9AAF133
3 changed files with 53 additions and 6 deletions

View File

@ -1,10 +1,14 @@
# Restreamer-UI
### v1.4.1 > v1.5.0
- Add reset button to hide a player logo (datarhei/restreamer#431)
### v1.4.0 > v1.4.1
- Fix videojs-overlay logo size (now responsive)
- Fix videojs-overlay logo size (datarhei/restreamer#431)
- Fix use of TLS for input from local RTMP server
- Fix Icecast publication service settings
- Fix Icecast publication service settings (datarhei/restreamer#429)
- Fix removes SRT bitstream on tee (OBS > RTMP > SRT is faulty)
### v1.3.0 > v1.4.0

View File

@ -1,6 +1,6 @@
{
"name": "restreamer-ui",
"version": "1.4.1",
"version": "1.5.0",
"bundle": "restreamer-v2.3.0",
"private": false,
"license": "Apache-2.0",

View File

@ -238,6 +238,42 @@ export default function Edit(props) {
});
};
const handleLogoReset = (event) => {
// For the cleanup of the core, we need to check the following:
// 1. is the image on the core or external?
// 2. is the image used somewhere else?
// 3. OK via dialog
handleChange(
'image',
'logo'
)({
target: {
value: '',
},
});
handleChange(
'position',
'logo'
)({
target: {
value: 'top-left',
},
});
handleChange(
'link',
'logo'
)({
target: {
value: '',
},
});
setSaving(false);
};
const handleDone = async () => {
setSaving(true);
@ -453,9 +489,16 @@ export default function Edit(props) {
</Button>
}
buttonsRight={
<Button variant="outlined" color="primary" onClick={handleDone}>
<Trans>Save</Trans>
</Button>
<React.Fragment>
<Button variant="outlined" color="primary" onClick={handleDone}>
<Trans>Save</Trans>
</Button>
{$settings.logo.image && $tab === 'logo' && (
<Button variant="outlined" color="secondary" onClick={handleLogoReset}>
<Trans>Reset logo</Trans>
</Button>
)}
</React.Fragment>
}
/>
</Paper>