aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-page.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
index ab9dcc5..cdbe612 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
@@ -89,6 +89,10 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
const [videoRoot, setVideoRoot] = useState('');
// Same shape — the Music app's own entry point.
const [audioRoot, setAudioRoot] = useState('');
+ // The Photos app's entry points — a *list*, unlike videoRoot/audioRoot
+ // above (docs/photos.md §2.1: a photo library is routinely scattered
+ // across several folders). Empty means nothing configured yet.
+ const [photoRoots, setPhotoRoots] = useState([]);
// MusicBrainz on/off (per-group) + whether a contact string is configured
// (node-wide) — docs/musicbay.md §3.2, same shape as tmdbConfig above.
const [musicbrainzConfig, setMusicbrainzConfig] = useState(null);
@@ -241,6 +245,7 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
});
setVideoRoot(ack.video_root || '');
setAudioRoot(ack.audio_root || '');
+ setPhotoRoots(ack.photo_roots || []);
setMusicbrainzConfig({
enabled: ack.musicbrainz_enabled !== false,
contactConfigured: !!ack.musicbrainz_contact_configured,
@@ -259,6 +264,7 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
transport.onTmdbEnabled = (enabled) => setTmdbConfig((prev) => ({ ...(prev || {}), enabled }));
transport.onVideoRoot = (path) => setVideoRoot(path);
transport.onAudioRoot = (path) => setAudioRoot(path);
+ transport.onPhotoRoots = (roots) => setPhotoRoots(roots);
transport.onMusicbrainzConfig = (cfg) =>
setMusicbrainzConfig((prev) => ({ ...(prev || {}), ...cfg }));
transport.onMusicbrainzEnabled = (enabled) =>
@@ -472,6 +478,7 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
onRefreshIndex: refreshIndex, onActivity: touchActivity,
videoRoot, onVideoRoot: (path) => setVideoRoot(path),
audioRoot, onAudioRoot: (path) => setAudioRoot(path),
+ photoRoots, onPhotoRoots: (roots) => setPhotoRoots(roots),
tmdbConfig,
musicbrainzConfig, onPlayQueue,
};
@@ -598,6 +605,8 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
onVideoRoot=${(path) => setVideoRoot(path)}
audioRoot=${audioRoot}
onAudioRoot=${(path) => setAudioRoot(path)}
+ photoRoots=${photoRoots}
+ onPhotoRoots=${(roots) => setPhotoRoots(roots)}
onRefreshIndex=${refreshIndex}
onLeft=${onLeft}
onPaired=${() => setOperatorPaired(true)} />