diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-07 10:35:09 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-07 10:35:09 +0200 |
| commit | 2c0903c648e24b4e2adf20492398e8b67d033b49 (patch) | |
| tree | 0435f298010f0f946362f28baebbe88337ca8768 /packages/meshbay-hub/src/meshbay_hub/static/photos-app.js | |
| parent | 0ed078c92cabab1dab0f70f321562032ea549ce6 (diff) | |
| parent | eeda274d751c537f4ecef3087994a16a9517478f (diff) | |
| download | meshbay-2c0903c648e24b4e2adf20492398e8b67d033b49.tar.gz | |
Merge branch 'refactor/groups-phase1'
Groups refactor, phases 1-3.
The root model replaces the old `upload` flag and group-wide `member_upload`
with per-root `writable`/`removable`/`ejected`, carried by a `RootSet` that
both front doors — the loopback API and signed MNP — reach through the same
`ops` functions. MNP goes to 1.1, additively: the roots table now rides on
`index_delta`, so a root added, removed, ejected or plugged reaches every
connected client instead of only whoever reloaded.
The group UI becomes a plugin architecture: an application is a registry
entry in `apps.js` plus its own files, with directories stored generically
by `ops.set_app_directories` under whatever the app is called. A reference
application, hidden behind `?dev=1`, is what makes that claim testable —
adding it is what found the two places still naming apps by hand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pvMdvLBG92jyhvD5pD6us
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/photos-app.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/photos-app.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/photos-app.js b/packages/meshbay-hub/src/meshbay_hub/static/photos-app.js index e6f3482..a58af8c 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/photos-app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/photos-app.js @@ -322,7 +322,8 @@ function AlbumView({ album, entries, transportRef, gekRef, setError, onBack, rea // ── shell ──────────────────────────────────────────────────────────────────── function PhotosApp({ - groupId, transportRef, gekRef, status, entries, photoRoots, setError, + groupId, transportRef, gekRef, status, entries, availableEntries, + photoDirectories, setError, hideFilter, readOnly, }) { const [openDir, setOpenDir] = useState(null); @@ -330,8 +331,10 @@ function PhotosApp({ useEffect(() => { setOpenDir(null); setFilter(''); }, [groupId]); + const photoEntries = availableEntries || entries; const albums = useMemo( - () => groupPhotoAlbums(entries, photoRoots), [entries, photoRoots]); + () => groupPhotoAlbums(photoEntries, photoDirectories), + [photoEntries, photoDirectories]); const needle = filter.trim().toLowerCase(); const filteredAlbums = useMemo(() => (!needle ? albums : albums.filter( @@ -346,10 +349,10 @@ function PhotosApp({ ${status === 'offline' && html` <p class="page-message">${t('group.offline_title')} ${t('group.offline_hint')}</p> `} - ${status === 'connected' && (!photoRoots || photoRoots.length === 0) && html` + ${status === 'connected' && (photoDirectories || []).length === 0 && html` <p class="page-message">${t('photo.no_roots_configured')}</p> `} - ${status === 'connected' && photoRoots && photoRoots.length > 0 && !openAlbum && html` + ${status === 'connected' && (photoDirectories || []).length > 0 && !openAlbum && html` <div class="photo-toolbar"> ${!hideFilter && html`<div class="tb-search"> <${Icon} name="search" /> |