diff --git a/custom_components/bahmcloud_store/panel/panel.js b/custom_components/bahmcloud_store/panel/panel.js index 9ac4440..5a37b25 100644 --- a/custom_components/bahmcloud_store/panel/panel.js +++ b/custom_components/bahmcloud_store/panel/panel.js @@ -389,10 +389,29 @@ class BahmcloudStorePanel extends HTMLElement { } this._update(); + this._loadRepoDetails(repoId); this._loadReadme(repoId); this._loadVersions(repoId); } + + async _loadRepoDetails(repoId) { + if (!this._hass || !repoId) return; + try { + const resp = await this._hass.callApi("get", `bcs/repo?repo_id=${encodeURIComponent(repoId)}`); + if (resp?.ok && resp.repo) { + this._detailRepo = resp.repo; + // Also update the cached list item if present + const repos = Array.isArray(this._data?.repos) ? this._data.repos : []; + const idx = repos.findIndex((r) => this._safeId(r?.id) === repoId); + if (idx >= 0) repos[idx] = resp.repo; + this._update(); + } + } catch (e) { + // ignore: details are optional + } + } + async _loadVersions(repoId) { if (!this._hass) return; if (!repoId) return;