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.
|
* @returns {ReactElement|null} Watermark element or null.
|
||||||
*/
|
*/
|
||||||
_renderBrandWatermark() {
|
_renderBrandWatermark() {
|
||||||
|
let reactElement = null;
|
||||||
|
|
||||||
if (this.state.showBrandWatermark) {
|
if (this.state.showBrandWatermark) {
|
||||||
return (
|
reactElement = ( // eslint-disable-line no-extra-parens
|
||||||
<a
|
|
||||||
href = { this.state.brandWatermarkLink }
|
|
||||||
target = '_new'>
|
|
||||||
<div
|
<div
|
||||||
className = 'watermark rightwatermark'
|
className = 'watermark rightwatermark'
|
||||||
style = { _RIGHT_WATERMARK_STYLE } />
|
style = { _RIGHT_WATERMARK_STYLE } />
|
||||||
|
);
|
||||||
|
|
||||||
|
const { brandWatermarkLink } = this.state;
|
||||||
|
|
||||||
|
if (brandWatermarkLink) {
|
||||||
|
reactElement = ( // eslint-disable-line no-extra-parens
|
||||||
|
<a
|
||||||
|
href = { brandWatermarkLink }
|
||||||
|
target = '_new'>
|
||||||
|
{ reactElement }
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return reactElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,19 +128,27 @@ class Watermarks extends Component {
|
||||||
* @returns {ReactElement|null}
|
* @returns {ReactElement|null}
|
||||||
*/
|
*/
|
||||||
_renderJitsiWatermark() {
|
_renderJitsiWatermark() {
|
||||||
|
let reactElement = null;
|
||||||
|
|
||||||
if (this.state.showJitsiWatermark
|
if (this.state.showJitsiWatermark
|
||||||
|| (APP.tokenData.isGuest
|
|| (APP.tokenData.isGuest
|
||||||
&& this.state.showJitsiWatermarkForGuests)) {
|
&& this.state.showJitsiWatermarkForGuests)) {
|
||||||
return (
|
reactElement = <div className = 'watermark leftwatermark' />;
|
||||||
|
|
||||||
|
const { jitsiWatermarkLink } = this.state;
|
||||||
|
|
||||||
|
if (jitsiWatermarkLink) {
|
||||||
|
reactElement = ( // eslint-disable-line no-extra-parens
|
||||||
<a
|
<a
|
||||||
href = { this.state.jitsiWatermarkLink }
|
href = { jitsiWatermarkLink }
|
||||||
target = '_new'>
|
target = '_new'>
|
||||||
<div className = 'watermark leftwatermark' />
|
{ reactElement }
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return reactElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue