diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-29 11:15:54 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-29 11:15:54 +0200 |
| commit | b7733e812fadd6007976d262bd1d793572a36ba7 (patch) | |
| tree | 52e2ac07c9ba4929fa50b6ba8d19f94f86e8b304 /packages/meshbay-hub/src/meshbay_hub/static/group-settings.js | |
| parent | 09a007937f03fad04a390323f3817f1ae7d7c2a9 (diff) | |
| download | meshbay-b7733e812fadd6007976d262bd1d793572a36ba7.tar.gz | |
feat: node workflow redesign — wizard auto-config, reset, MusicBrainz contact
Wizard (Electron):
- Auto-provisions node config (hub URL + username) from logged-in user
- node:start handles both cold start and restart of misconfigured daemon
- Waits for daemon to reach 'running', auto-links node key on hub
- probeNode accepts intermediate states for wizard progress feedback
Reset (meshbay-node reset):
- Unlinks node key from hub (DELETE /me/node_key, best-effort)
- Stops and disables daemon (systemctl --user disable --now)
- Erases ~/.config/meshbay, ~/.local/share/meshbay, ~/.local/state/meshbay
MusicBrainz contact:
- Resolved from owner's hub email instead of per-node roster config
- Removed musicbrainz_contact UI and WebRTC handshake field
- Removed set_musicbrainz_contact/musicbrainz_contact from roster
Node pairing:
- Added operator pairing banner on NodePage
- Added operator_paired flag to list_groups
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-settings.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/group-settings.js | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js b/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js index 59d1456..4f55dfb 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js @@ -191,7 +191,7 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef, enabledApps, onEnabledApps, scanSettings, onScanSettings, tmdbConfig, onTmdbConfig, onTmdbEnabled, - musicbrainzConfig, onMusicbrainzConfig, onMusicbrainzEnabled, + musicbrainzConfig, onMusicbrainzEnabled, entries, nodeDirs, videoRoot, onVideoRoot, audioRoot, onAudioRoot, photoRoots, onPhotoRoots, onRefreshIndex, @@ -548,9 +548,7 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef, saveTmdbConfig(); }, [isNodeAdmin, connected, tmdbConfig, saveTmdbConfig]); - const [mbBusy, setMbBusy] = useState(false); const [mbMsg, setMbMsg] = useState(''); - const [mbContactDraft, setMbContactDraft] = useState(''); const [mbEnabledBusy, setMbEnabledBusy] = useState(false); const mbEnabled = musicbrainzConfig ? musicbrainzConfig.enabled : true; @@ -579,43 +577,6 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef, } }, [transportRef, onMusicbrainzEnabled]); - /** - * The node-wide MusicBrainz contact string (docs/musicbay.md §3.2) — not - * a secret, unlike TMDB's token, but still cleared from the draft field - * after a save: the node never echoes it back - * (musicbrainz_config_ack carries only whether one is set), so there is - * nothing to keep showing. - */ - const saveMusicbrainzConfig = useCallback(async () => { - const transport = transportRef && transportRef.current; - setMbMsg(''); - setMbBusy(true); - try { - if (!transport || !transport.connected) { - throw new Error('Not connected to the node'); - } - const sk = transport.sessionKeys && transport.sessionKeys.skEdB64; - const signFn = (sk && window.MeshBayKeys) - ? (transcript) => window.MeshBayKeys.signBytes(sk, transcript) - : null; - const contact = mbContactDraft.trim(); - await transport.setMusicbrainzConfig(contact || undefined, signFn); - setMbContactDraft(''); - if (onMusicbrainzConfig) { - onMusicbrainzConfig({ - contactConfigured: contact - ? true - : (musicbrainzConfig ? musicbrainzConfig.contactConfigured : false), - }); - } - setMbMsg(t('settings_node.scan_saved')); - } catch (err) { - setMbMsg(err.message); - } finally { - setMbBusy(false); - } - }, [transportRef, onMusicbrainzConfig, mbContactDraft, musicbrainzConfig]); - // Every folder anywhere in the group's shared index, deepest included — // `entries[].path` is each file's containing directory (files-app.js's own // convention), so every ancestor prefix of it is a real folder, and @@ -1033,23 +994,6 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef, onChange=${(v) => saveMusicbrainzEnabled(v)} label=${mbEnabled ? t('settings_node.musicbrainz_enabled') : t('settings_node.musicbrainz_disabled')} /> </div> - <div class="settings-row"> - <label class="settings-label"> - ${t('settings_node.musicbrainz_contact_label')} - <input type="text" placeholder=${t('settings_node.musicbrainz_contact_placeholder')} - value=${mbContactDraft} disabled=${mbBusy} - onInput=${e => setMbContactDraft(e.target.value)} /> - </label> - <p class="settings-hint"> - ${musicbrainzConfig && musicbrainzConfig.contactConfigured - ? t('settings_node.musicbrainz_contact_set') - : t('settings_node.musicbrainz_contact_unset')} - </p> - </div> - <button class="btn btn-small btn-secondary" style="margin-top:8px" - disabled=${mbBusy} onClick=${() => saveMusicbrainzConfig()}> - ${mbBusy ? t('settings_node.scan_saving') : t('settings_node.musicbrainz_save')} - </button> ${mbMsg && html`<p class="settings-hint">${mbMsg}</p>`} </${CollapsibleSection}> `} |