From aba6ef024fd9c9a199353fcf69f35286c32def92 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 6 Dec 2025 21:44:50 +0100 Subject: [PATCH] feat(ui): enable XC refresh only in Electron environment Add an isElectron flag to PlaylistItemComponent and conditionally render the refresh button only when running inside Electron. This prevents exposing the server refresh action in non-Electron (environments like the browser) where window.electron is unavailable and the feature is not supported. Update ensures safer behavior by checking !!window.electron in the component and using that value in the template to guard the UI. --- .../recent-playlists/playlist-item/playlist-item.component.html | 2 +- .../recent-playlists/playlist-item/playlist-item.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.html b/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.html index 17a9365c5..57aa8269f 100644 --- a/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.html +++ b/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.html @@ -111,7 +111,7 @@ sync } - @if (item.serverUrl) { + @if (item.serverUrl && isElectron) {