build fix
This commit is contained in:
15
src/main.js
15
src/main.js
@@ -1050,6 +1050,17 @@ function setupEventListeners() {
|
||||
await appWindow.close();
|
||||
});
|
||||
|
||||
// Listen for cast device discovery events from backend
|
||||
if (runningInTauri && window.__TAURI__ && window.__TAURI__.event) {
|
||||
window.__TAURI__.event.listen('cast-device-discovered', (event) => {
|
||||
console.log('Cast device discovered:', event.payload);
|
||||
// If cast overlay is currently open, refresh the device list
|
||||
if (!castOverlay.classList.contains('hidden')) {
|
||||
refreshCastDeviceList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Menu button - explicit functionality or placeholder?
|
||||
// Menu removed — header click opens stations via artwork placeholder
|
||||
|
||||
@@ -1353,6 +1364,10 @@ async function openCastOverlay() {
|
||||
castOverlay.setAttribute('aria-hidden', 'false');
|
||||
// ensure cast overlay shows linear list style
|
||||
deviceListEl.classList.remove('stations-grid');
|
||||
await refreshCastDeviceList();
|
||||
}
|
||||
|
||||
async function refreshCastDeviceList() {
|
||||
deviceListEl.innerHTML = '<li class="device"><div class="device-main">Scanning...</div><div class="device-sub">Searching for speakers</div></li>';
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user