chore: release v0.25.3

This commit is contained in:
Ulas Kalayci
2026-04-26 18:24:27 +02:00
parent 1cc1b63745
commit 9fba1d7ae4
26 changed files with 242 additions and 120 deletions
+25 -17
View File
@@ -8,7 +8,7 @@ import { api } from '/api.js';
import { stagger, vibrate } from '/utils/ux.js';
import { t } from '/i18n.js';
import { esc } from '/utils/html.js';
import { promptModal, confirmModal } from '/components/modal.js';
import { promptModal } from '/components/modal.js';
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
// --------------------------------------------------------
@@ -781,23 +781,31 @@ function wireListContentEvents(container) {
// ---- Liste löschen ----
if (action === 'delete-list') {
if (!await confirmModal(t('shopping.deleteListConfirm', { name: state.activeList?.name }), { danger: true, confirmLabel: t('common.delete') })) return;
try {
await api.delete(`/shopping/${state.activeListId}`);
state.lists = state.lists.filter((l) => l.id !== state.activeListId);
state.activeListId = state.lists[0]?.id ?? null;
if (state.activeListId) {
await switchList(state.activeListId, container);
} else {
state.items = [];
state.activeList = null;
renderTabs(container);
renderListContent(container);
const deletedListId = state.activeListId;
let undone = false;
window.oikos.showToast(t('shopping.deletedListToast'), 'default', 5000, () => {
undone = true;
});
setTimeout(async () => {
if (undone) return;
try {
await api.delete(`/shopping/${deletedListId}`);
state.lists = state.lists.filter((l) => l.id !== deletedListId);
state.activeListId = state.lists[0]?.id ?? null;
if (state.activeListId) {
await switchList(state.activeListId, container);
} else {
state.items = [];
state.activeList = null;
renderTabs(container);
renderListContent(container);
}
} catch (err) {
window.oikos.showToast(err.message ?? t('common.unknownError'), 'danger');
}
window.oikos.showToast(t('shopping.deletedListToast'));
} catch (err) {
window.oikos.showToast(err.message, 'danger');
}
}, 5000);
}
});