Non-clickable watermarks without links
Watermarks can be used to link to an external site by configuring a URL. However, the URL is optional. When it is not set, the watermark should not be clickable. This prevents users from reloading the room by clicking on a watermark (caused by an HTML anchor element without an href).
This commit is contained in:
parent
7836fd1990
commit
00b4176bf8
|
@ -96,19 +96,29 @@ class Watermarks extends Component {
|
|||
* @returns {ReactElement|null} Watermark element or null.
|
||||
*/
|
||||
_renderBrandWatermark() {
|
||||
let reactElement = null;
|
||||
|
||||
if (this.state.showBrandWatermark) {
|
||||
return (
|
||||
<a
|
||||
href = { this.state.brandWatermarkLink }
|
||||
target = '_new'>
|
||||
reactElement = ( // eslint-disable-line no-extra-parens
|
||||
<div
|
||||
className = 'watermark rightwatermark'
|
||||
style = { _RIGHT_WATERMARK_STYLE } />
|
||||
);
|
||||
|
||||
const { brandWatermarkLink } = this.state;
|
||||
|
||||
if (brandWatermarkLink) {
|
||||
reactElement = ( // eslint-disable-line no-extra-parens
|
||||
<a
|
||||
href = { brandWatermarkLink }
|
||||
target = '_new'>
|
||||
{ reactElement }
|
||||
</a>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return reactElement;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,19 +128,27 @@ class Watermarks extends Component {
|
|||
* @returns {ReactElement|null}
|
||||
*/
|
||||
_renderJitsiWatermark() {
|
||||
let reactElement = null;
|
||||
|
||||
if (this.state.showJitsiWatermark
|
||||
|| (APP.tokenData.isGuest
|
||||
&& this.state.showJitsiWatermarkForGuests)) {
|
||||
return (
|
||||
reactElement = <div className = 'watermark leftwatermark' />;
|
||||
|
||||
const { jitsiWatermarkLink } = this.state;
|
||||
|
||||
if (jitsiWatermarkLink) {
|
||||
reactElement = ( // eslint-disable-line no-extra-parens
|
||||
<a
|
||||
href = { this.state.jitsiWatermarkLink }
|
||||
href = { jitsiWatermarkLink }
|
||||
target = '_new'>
|
||||
<div className = 'watermark leftwatermark' />
|
||||
{ reactElement }
|
||||
</a>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return reactElement;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue