Hide viewer count when offline (#1091)
* Hide viewer count when offline * cleanup
This commit is contained in:
parent
e396207c08
commit
2659dc3646
@ -227,6 +227,11 @@ export default class VideoOnly extends Component {
|
||||
|
||||
const { logo = TEMP_IMAGE, customStyles } = configData;
|
||||
|
||||
const viewerCountMessage =
|
||||
streamOnline && viewerCount > 0
|
||||
? html`${viewerCount} ${pluralize('viewer', viewerCount)}`
|
||||
: null;
|
||||
|
||||
const mainClass = playerActive ? 'online' : '';
|
||||
|
||||
const poster = isPlaying
|
||||
@ -257,9 +262,7 @@ export default class VideoOnly extends Component {
|
||||
class="flex text-center flex-row justify-between font-mono py-2 px-8 bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid"
|
||||
>
|
||||
<span>${streamStatusMessage}</span>
|
||||
<span id="stream-viewer-count"
|
||||
>${viewerCount} ${pluralize('viewer', viewerCount)}.</span
|
||||
>
|
||||
<span id="stream-viewer-count">${viewerCountMessage}</span>
|
||||
</section>
|
||||
</main>
|
||||
`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user