From b8f06507d8cb4dd0cdb6191d32b9d856195e2af7 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Thu, 20 Jun 2024 19:38:22 +0200 Subject: [PATCH] show delay in broadcast manager --- .../src/study/relay/relayManagerView.ts | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ui/analyse/src/study/relay/relayManagerView.ts b/ui/analyse/src/study/relay/relayManagerView.ts index 7cc2bd15db66..e9de014b60a2 100644 --- a/ui/analyse/src/study/relay/relayManagerView.ts +++ b/ui/analyse/src/study/relay/relayManagerView.ts @@ -57,20 +57,17 @@ function stateOn(ctrl: RelayCtrl) { 'div.state.on.clickable', { hook: bind('click', _ => ctrl.setSync(false)), attrs: dataIcon(licon.ChasingArrows) }, [ - h( - 'div', - url - ? [ - sync.delay ? `Connected with ${sync.delay}s delay` : 'Connected to source', - h('br'), - url.replace(/https?:\/\//, ''), - ] + h('div', [ + 'Connected ', + sync?.delay ? `with ${sync.delay}s delay ` : null, + ...(url + ? ['to source', h('br'), url.replace(/https?:\/\//, '')] : ids - ? ['Connected to', h('br'), ids.length, ' game(s)'] + ? ['to', h('br'), ids.length, ' game(s)'] : urls - ? ['Connected to', h('br'), urls.length, ' urls'] - : [], - ), + ? ['to', h('br'), urls.length, ' sources'] + : []), + ]), ], ); }