|
429 | 429 | _versionedAssetUrl(url) { |
430 | 430 | const value = String(url || "").trim(); |
431 | 431 | if (!value || /^data:/i.test(value) || /[?&]v=/.test(value)) return value; |
432 | | - const version = typeof HOMEII_CARD_VERSION === "string" ? HOMEII_CARD_VERSION : "5.1.5"; |
| 432 | + const version = typeof HOMEII_CARD_VERSION === "string" ? HOMEII_CARD_VERSION : "5.1.6"; |
433 | 433 | return `${value}${value.includes("?") ? "&" : "?"}v=${encodeURIComponent(version)}`; |
434 | 434 | } |
435 | 435 |
|
@@ -9685,9 +9685,9 @@ function ensureHaEditorComponents() { |
9685 | 9685 | } catch (_) {} |
9686 | 9686 | } |
9687 | 9687 |
|
9688 | | -const HOMEII_CARD_VERSION = "5.1.5"; |
9689 | | -const HOMEII_BROWSER_EDITOR_TAG = "homeii-music-flow-browser-editor-v5150"; |
9690 | | -const HOMEII_MOBILE_EDITOR_TAG = "homeii-music-flow-editor-v5150"; |
| 9688 | +const HOMEII_CARD_VERSION = "5.1.6"; |
| 9689 | +const HOMEII_BROWSER_EDITOR_TAG = "homeii-music-flow-browser-editor-v5160"; |
| 9690 | +const HOMEII_MOBILE_EDITOR_TAG = "homeii-music-flow-editor-v5160"; |
9691 | 9691 |
|
9692 | 9692 | const HomeiiEditorLocale = Object.freeze({ |
9693 | 9693 | isHebrewLanguageTag(value) { |
@@ -9942,7 +9942,9 @@ const HomeiiMobileSettingsFoundation = Object.freeze({ |
9942 | 9942 | .filter((item) => !(usesVisualSettings && item === "settings")) |
9943 | 9943 | .filter((item) => !(hidePlayers && item === "players")); |
9944 | 9944 | const normalizedFallback = fallback.filter((item) => !(hidePlayers && item === "players")); |
9945 | | - return cleaned.length ? cleaned : normalizedFallback; |
| 9945 | + const normalized = cleaned.length ? cleaned : normalizedFallback; |
| 9946 | + if (!usesVisualSettings && !normalized.includes("settings")) normalized.push("settings"); |
| 9947 | + return normalized; |
9946 | 9948 | }, |
9947 | 9949 | normalizeMobileQuickActions(items, fallbackItems = []) { |
9948 | 9950 | const allowed = new Set(["timer", "like", "lyrics", "queue", "radio", "history", "info"]); |
@@ -23195,6 +23197,27 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard { |
23195 | 23197 | margin:0; |
23196 | 23198 | accent-color:var(--ma-accent); |
23197 | 23199 | } |
| 23200 | + .settings-check-pill.is-locked { |
| 23201 | + cursor:default; |
| 23202 | + opacity:.94; |
| 23203 | + } |
| 23204 | + .settings-check-pill.is-locked input { |
| 23205 | + opacity:.78; |
| 23206 | + } |
| 23207 | + .settings-fixed-badge { |
| 23208 | + margin-inline-start:auto; |
| 23209 | + padding:3px 8px; |
| 23210 | + border-radius:999px; |
| 23211 | + background:rgba(245,166,35,.16); |
| 23212 | + color:var(--ma-accent); |
| 23213 | + font-size:11px; |
| 23214 | + font-weight:900; |
| 23215 | + letter-spacing:0; |
| 23216 | + } |
| 23217 | + .rtl .settings-fixed-badge { |
| 23218 | + margin-inline-start:0; |
| 23219 | + margin-inline-end:auto; |
| 23220 | + } |
23198 | 23221 | .rtl .settings-check-pill { |
23199 | 23222 | direction:rtl; |
23200 | 23223 | justify-content:flex-start; |
@@ -26972,6 +26995,7 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard { |
26972 | 26995 | const playerOptions = (this._state.players || []).map((player) => [player.entity_id, player.attributes?.friendly_name || player.entity_id]); |
26973 | 26996 | const visibleMainBarOptions = mainBarOptions; |
26974 | 26997 | const showStudioMainBarOption = this._controlRoomEnabled(); |
| 26998 | + const settingsMainBarLocked = !this._usesVisualSettings(); |
26975 | 26999 | return ` |
26976 | 27000 | <div class="settings-shell"> |
26977 | 27001 | <div class="settings-group"> |
@@ -27081,11 +27105,15 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard { |
27081 | 27105 | <span>${this._esc(this._controlRoomLabel())}</span> |
27082 | 27106 | </label> |
27083 | 27107 | ` : ``} |
27084 | | - ${visibleMainBarOptions.map(([value, label]) => ` |
27085 | | - <label class="settings-check-pill"> |
27086 | | - <input type="checkbox" data-setting-main-bar-item="${this._esc(value)}" ${selectedMainBar.has(value) ? "checked" : ""}> |
| 27108 | + ${visibleMainBarOptions.map(([value, label]) => { |
| 27109 | + const locked = settingsMainBarLocked && value === "settings"; |
| 27110 | + return ` |
| 27111 | + <label class="settings-check-pill ${locked ? "is-locked" : ""}"> |
| 27112 | + <input type="checkbox" data-setting-main-bar-item="${this._esc(value)}" ${selectedMainBar.has(value) || locked ? "checked" : ""} ${locked ? "disabled" : ""}> |
27087 | 27113 | <span>${this._esc(label)}</span> |
27088 | | - </label>`).join("")} |
| 27114 | + ${locked ? `<span class="settings-fixed-badge">${this._esc(this._m("Fixed", "קבוע"))}</span>` : ""} |
| 27115 | + </label>`; |
| 27116 | + }).join("")} |
27089 | 27117 | </div> |
27090 | 27118 | <div class="settings-label">${this._m("Volume control (large screen only)", "בקרת ווליום (זמין רק במסך גדול)")}</div> |
27091 | 27119 | <div class="settings-pills"> |
@@ -29056,6 +29084,10 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard { |
29056 | 29084 | const mainBarCheckbox = e.target?.closest?.("input[data-setting-main-bar-item]"); |
29057 | 29085 | if (mainBarCheckbox) { |
29058 | 29086 | const item = mainBarCheckbox.dataset.settingMainBarItem; |
| 29087 | + if (!this._usesVisualSettings() && item === "settings") { |
| 29088 | + mainBarCheckbox.checked = true; |
| 29089 | + return; |
| 29090 | + } |
29059 | 29091 | const current = new Set(this._mobileMainBarItems()); |
29060 | 29092 | if (mainBarCheckbox.checked) current.add(item); else current.delete(item); |
29061 | 29093 | const next = Array.from(current); |
|
0 commit comments