Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Optional `show_confirmation_toasts` setting (YAML / visual editor / in-card Settings panel). Default is `true` (existing behavior). Set to `false` to suppress routine confirmation toasts (info + success variants — "Player Selected", "Added to liked", etc.) that briefly cover other UI controls. Error toasts always show so genuine failures stay visible. The in-card Settings toggle is persisted per browser in `localStorage` and takes precedence over the YAML default, so the user can opt out without editing config. Addresses #54.
- Danish (`da`) localization. Adds `src/localization/da.js` with all 925 keys translated via DeepL using a glossary that locks brand names (HOMEii Flow, Music Assistant, Sendspin, Spotify, etc.) and music-domain terms (Library, Queue, Playlist, etc.) to consistent renderings. Registered in `src/localization/index.js` and exposed as "Dansk" in the language picker. Native Danish speaker review by submitter (Danish household using the card daily for kids' room dashboards).

## 5.8.1 - 2026-05-31
Expand Down
6 changes: 6 additions & 0 deletions dist/config/editor-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function getBaseCardConfigForm() {
language: homeiiEditorI18n("ui.language"),
theme_mode: homeiiEditorI18n("ui.theme_mode"),
hotel_mode: homeiiEditorI18n("ui.hotel_mode", {}, "Hotel Mode"),
show_confirmation_toasts: homeiiEditorI18n("ui.show_confirmation_toasts", {}, "Show confirmation messages"),
performance_profile: homeiiEditorI18n("ui.performance_profile"),
performance_mode: homeiiEditorI18n("ui.performance_mode_for_weak_devices"),
night_mode: homeiiEditorI18n("ui.night_mode"),
Expand All @@ -74,6 +75,7 @@ export function getBaseCardConfigForm() {
cache_ttl: homeiiEditorI18n("ui.cache_duration_in_milliseconds_for_selected_data_requests"),
music_assistant_timeout_ms: "Maximum milliseconds to wait for Music Assistant service responses before showing an error.",
hotel_mode: homeiiEditorI18n("ui.hotel_mode_helper", {}, "Minimal hotel-safe UI: player controls, volume, search, artwork browsing, and player selection only."),
show_confirmation_toasts: homeiiEditorI18n("ui.show_confirmation_toasts_helper", {}, "Show brief confirmation messages after actions like selecting a player or adding to liked. Disable to suppress these; error messages still appear regardless."),
performance_profile: homeiiEditorI18n("ui.performance_profile_helper"),
performance_mode: homeiiEditorI18n("ui.disables_blur_animations_dynamic_backgrounds_and_heavy_shadows_recommend"),
main_opacity: homeiiEditorI18n("ui.opacity_for_the_main_card_background"),
Expand Down Expand Up @@ -108,6 +110,7 @@ export function getBaseCardConfigForm() {
] } } },
{ name: "rtl", selector: { boolean: {} } },
{ name: "hotel_mode", selector: { boolean: {} } },
{ name: "show_confirmation_toasts", selector: { boolean: {} } },
{ name: "main_opacity", selector: { number: { min: 0.3, max: 1, step: 0.02, mode: "box" } } },
{ name: "popup_opacity", selector: { number: { min: 0.4, max: 1, step: 0.02, mode: "box" } } },
],
Expand Down Expand Up @@ -237,6 +240,7 @@ export function getMobileEditorTexts() {
mobile_home_shortcut: homeiiEditorI18n("ui.home_shortcut"),
mobile_home_shortcut_path: homeiiEditorI18n("ui.home_shortcut_path"),
hotel_mode: homeiiEditorI18n("ui.hotel_mode", {}, "Hotel Mode"),
show_confirmation_toasts: homeiiEditorI18n("ui.show_confirmation_toasts", {}, "Show confirmation messages"),
mobile_volume_mode: homeiiEditorI18n("ui.volume_mode"),
mobile_volume_step_buttons: homeiiEditorI18n("ui.volume_step_buttons"),
mobile_volume_step_percent: homeiiEditorI18n("ui.volume_step_percent"),
Expand Down Expand Up @@ -313,6 +317,7 @@ export function getMobileEditorTexts() {
night_mode_days: homeiiEditorI18n("ui.choose_which_days_the_auto_night_mode_window_applies_to"),
mobile_show_up_next: homeiiEditorI18n("ui.show_or_hide_the_inline_next_track_row_in_now_playing"),
hotel_mode: homeiiEditorI18n("ui.hotel_mode_helper", {}, "Minimal hotel-safe UI with only player controls, volume, search, artwork browsing, and player selection."),
show_confirmation_toasts: homeiiEditorI18n("ui.show_confirmation_toasts_helper", {}, "Show brief confirmation messages after actions like selecting a player or adding to liked. Disable to suppress these; error messages still appear regardless."),
mobile_dynamic_theme_mode: homeiiEditorI18n("ui.extract_colors_from_the_current_artwork_and_apply_them_to_the_interface"),
mobile_background_motion_mode: homeiiEditorI18n("ui.control_whether_the_card_background_moves_gently_and_how_strong_the_moti"),
performance_profile: homeiiEditorI18n("ui.performance_profile_helper"),
Expand Down Expand Up @@ -587,6 +592,7 @@ export function getMobileCardConfigForm() {
{ name: "mobile_show_up_next", selector: { boolean: {} } },
{ name: "rtl", selector: { boolean: {} } },
{ name: "hotel_mode", selector: { boolean: {} } },
{ name: "show_confirmation_toasts", selector: { boolean: {} } },
{ name: "mobile_compact_mode", selector: { boolean: {} } },
{ name: "mobile_layout_mode", selector: { select: { mode: "dropdown", options: t.options.mobile_layout_mode } } },
{ name: "mobile_compact_widget_mode", selector: { select: { mode: "dropdown", options: t.options.mobile_compact_widget_mode } } },
Expand Down
1 change: 1 addition & 0 deletions dist/config/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function validateBaseCardEditorConfig(config) {
assertValueInList(config.theme_mode, "theme_mode", ["auto", "dark", "light", "custom"]);
assertBooleanIfDefined(config.rtl, "rtl");
assertBooleanIfDefined(config.hotel_mode, "hotel_mode");
assertBooleanIfDefined(config.show_confirmation_toasts, "show_confirmation_toasts");
assertBooleanIfDefined(config.performance_mode, "performance_mode");
assertValueInList(config.performance_profile, "performance_profile", ["full", "high", "low", "ultra_lite"]);
assertBooleanIfDefined(config.show_ma_button, "show_ma_button");
Expand Down
17 changes: 17 additions & 0 deletions dist/core/base-music-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13664,6 +13664,23 @@ export function createHomeiiBaseMusicCard({
const text = String(message ?? "").trim();
if (!text) return;
const safeVariant = ["success", "error", "info"].includes(variant) ? variant : "info";
// Honor `show_confirmation_toasts: false` (default true): suppress
// info / success toasts so only routine confirmation feedback is
// silenced. Errors always show, so connection failures and action
// failures stay visible. The in-card Settings UI sets
// `_state.showConfirmationToasts` and takes precedence over the
// YAML / visual-editor default.
//
// Inlined here because `_toast()` lives in the base class and
// cannot call the subclass's `_showConfirmationToasts()` helper —
// the helper duplicates this precedence in homeii-music-flow.js
// for use by the Settings pill. If you change the precedence in
// one place, change it in both.
const stateChoice = this._state?.showConfirmationToasts;
const suppress =
stateChoice === false ||
(stateChoice !== true && this._config?.show_confirmation_toasts === false);
if (suppress && safeVariant !== "error") return;
const now = Date.now();
const key = `${safeVariant}:${text}`;
const lastShown = this._toastHistory?.get(key) || 0;
Expand Down
Loading