minor: heavily simplify server and app content. unify styling (#4)
All checks were successful
ci/woodpecker/push/push Pipeline was successful
All checks were successful
ci/woodpecker/push/push Pipeline was successful
Co-authored-by: Madison Grubb <madison@elastiflow.com> Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
12
app/composables/useAutoCloseLiveSession.js
Normal file
12
app/composables/useAutoCloseLiveSession.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/** Auto-closes selectedCamera when the selected live session disappears from liveSessions. */
|
||||
export function useAutoCloseLiveSession(selectedCamera, liveSessions) {
|
||||
watch(
|
||||
[() => selectedCamera.value, () => liveSessions.value],
|
||||
([sel, sessions]) => {
|
||||
if (!sel || typeof sel.hasStream === 'undefined') return
|
||||
const stillActive = (sessions ?? []).some(s => s.id === sel.id)
|
||||
if (!stillActive) selectedCamera.value = null
|
||||
},
|
||||
{ deep: true },
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user