mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-05-11 12:33:32 -04:00
feat: Improve new shopping list UI (#7600)
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -377,20 +377,22 @@ const { store: allUnits } = useUnitStore();
|
||||
const { store: allFoods } = useFoodStore();
|
||||
|
||||
function itemCheckedToast(item: ShoppingListItemOut) {
|
||||
alert.info(
|
||||
i18n.t("shopping-list.item-checked-off", { item: item.food?.name || item.note || i18n.t("recipe.ingredient") }),
|
||||
undefined,
|
||||
{
|
||||
timeout: 4000,
|
||||
action: {
|
||||
message: i18n.t("general.undo"),
|
||||
onClick: () => {
|
||||
item.checked = false;
|
||||
shoppingListPage.saveListItem(item);
|
||||
setTimeout(() => {
|
||||
alert.info(
|
||||
i18n.t("shopping-list.item-checked-off", { item: item.food?.name || item.note || i18n.t("recipe.ingredient") }),
|
||||
undefined,
|
||||
{
|
||||
timeout: 4000,
|
||||
action: {
|
||||
message: i18n.t("general.undo"),
|
||||
onClick: () => {
|
||||
item.checked = false;
|
||||
shoppingListPage.saveListItem(item);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user