Fix: Auto-Join via ?viewStream= URL-Parameter funktioniert jetzt
App.tsx wechselt automatisch zum Streaming-Tab wenn ?viewStream= in der URL steht. StreamingTab nutzt ref-basierten Ansatz: Stream-ID wird beim Mount gespeichert, Passwort-Modal oeffnet sich sobald die Stream-Liste vom Server geladen ist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
470bef62e4
commit
59ebfc91a9
4 changed files with 82 additions and 73 deletions
|
|
@ -40,6 +40,12 @@ export default function App() {
|
|||
.then(r => r.json())
|
||||
.then((list: PluginInfo[]) => {
|
||||
setPlugins(list);
|
||||
// If ?viewStream= is in URL, force switch to streaming tab
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
if (urlParams.has('viewStream') && list.some(p => p.name === 'streaming')) {
|
||||
setActiveTab('streaming');
|
||||
return;
|
||||
}
|
||||
const saved = localStorage.getItem('hub_activeTab');
|
||||
const valid = list.some(p => p.name === saved);
|
||||
if (list.length > 0 && !valid) setActiveTab(list[0].name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue