diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/files-app.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/files-app.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js index d2f0727..ab7e254 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js @@ -27,7 +27,7 @@ function FilesPanel({ groupId, transportRef, gekRef, status, entries, nodeDirs, nodeRoots, setEntries, setNodeDirs, setNodeRoots, applyIndex, isNodeAdmin, operatorPaired, mayUpload, userId, setError, onPreview, - showGroup, readOnly, getTransport, onRefreshIndex, + showGroup, readOnly, getTransport, onRefreshIndex, showRefresh, }) { const [selecting, setSelecting] = useState(false); const [selected, setSelected] = useState(() => new Set()); @@ -37,9 +37,10 @@ function FilesPanel({ const [currentPath, setCurrentPath] = useState(''); const [refreshing, setRefreshing] = useState(false); - // Force a re-fetch of the group index from the node — the client's file - // list is a view over a cached copy, and there is no other way to pull a - // fresh one on demand. + // Only the cross-group Search page shows this (`showRefresh`): it has no + // live node connection pushing index deltas, so its file list really is + // a one-shot cached fetch. In a real group the node streams every change + // as it happens, so a manual re-fetch would just duplicate that. const doRefresh = useCallback(async () => { if (refreshing || !onRefreshIndex) return; setRefreshing(true); @@ -339,7 +340,7 @@ function FilesPanel({ </div> <div class="breadcrumbs"> - ${onRefreshIndex && html` + ${showRefresh && onRefreshIndex && html` <button class="crumb crumb-refresh ${refreshing ? 'spinning' : ''}" onClick=${doRefresh} disabled=${refreshing} title=${t('group.refresh_index')}> |