diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/index-dock.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/index-dock.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/index-dock.js b/packages/meshbay-hub/src/meshbay_hub/static/index-dock.js index 47a5818..3a9a539 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/index-dock.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/index-dock.js @@ -7,6 +7,7 @@ import { useStickyBand } from './sticky.js'; import { Icon } from './icon.js'; import { fromLoopback, fromPush, mergeActivity, dockRows, hideRow, pauseRow, percent, queuedCount, + baseName, } from './index-dock-model.js'; // ── Indexing dock ─────────────────────────────────────────────────────────── @@ -117,9 +118,14 @@ function DockRow({ row, error, onOpen, onPause, onHide }) { : t(`indexdock.kind_${row.kind || 'scan'}`); const where = row.root ? `${row.groupName} › ${row.root}` : row.groupName; + // A scan that sits still says what it is sitting on. It used to show a bar + // that had stopped, and the name of a folder. + const slow = !done && !error && row.slowPath; let meta = ''; if (error) { meta = error; + } else if (slow) { + meta = t('indexdock.slow', { secs: number(row.slowSecs), file: baseName(row.slowPath) }); } else if (listing) { meta = t('indexdock.listing'); } else if (!done && !waiting) { @@ -144,7 +150,8 @@ function DockRow({ row, error, onOpen, onPause, onHide }) { onClick=${onOpen}> <span class="index-dock-head"> <span class="index-dock-title"><strong>${status}</strong> ${where}</span> - ${meta && html`<span class="index-dock-meta ${error ? 'index-dock-error' : ''}" + ${meta && html`<span class="index-dock-meta ${error || slow ? 'index-dock-error' : ''}" + title=${slow ? row.slowPath : null} role=${error ? 'alert' : null}>${meta}</span>`} </span> <span class="index-progress-bar index-dock-bar"> |