WTC-26: показывать подсказку «Рецепта нет» на пустом экране

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Peppa 2026-11-16 06:28:45 +05:00
parent 7b978cfa8c
commit da935dc541

View File

@ -53,7 +53,7 @@ function render() {
$("addExample").textContent = example === null ? "" : t.addExample.replace("{name}", example);
$("addExample").dataset.name = example ?? "";
$("noRecipeHint").textContent = t.noRecipeHint;
$("noRecipeHint").hidden = !hasNoRecipe(state.dishes, findRecipe);
$("noRecipeHint").hidden = n !== 0 && !hasNoRecipe(state.dishes, findRecipe);
const ul = $("list");
ul.replaceChildren(...state.dishes.map((d) => {
const li = document.createElement("li");