feat: Electron screen share picker, instance selector, and system audio loopback
- Custom screen share picker for Electron (ScreenSharePicker.tsx) with Aether Drift design: glass-bubble footer, adaptive grid, pill tabs, border-based selection (avoids overflow clipping), hover brightness - Instance URL picker so Electron connects to any Backspace server - System audio loopback on Windows/Linux via desktopCapturer callback - macOS: video-only callback (OS blocks system audio capture) - IPC bridge for screen source enumeration and selection - Purge stale service worker caches on Electron launch
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
import { useRegisterSW } from 'virtual:pwa-register/react';
|
||||
import { useEffect } from 'react';
|
||||
import { isElectron } from '../../platform/platform';
|
||||
|
||||
export function SwAutoUpdate() {
|
||||
const inElectron = isElectron();
|
||||
|
||||
useRegisterSW({
|
||||
onRegisteredSW(_swUrl, registration) {
|
||||
if (!registration || inElectron) return;
|
||||
if (!registration) return;
|
||||
setInterval(() => {
|
||||
registration.update();
|
||||
}, 60_000);
|
||||
@@ -15,12 +12,11 @@ export function SwAutoUpdate() {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (inElectron) return;
|
||||
if (!navigator.serviceWorker) return;
|
||||
const onControllerChange = () => window.location.reload();
|
||||
navigator.serviceWorker.addEventListener('controllerchange', onControllerChange);
|
||||
return () => navigator.serviceWorker.removeEventListener('controllerchange', onControllerChange);
|
||||
}, [inElectron]);
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user