feat: integrate kitchen tabs bar into meals, recipes, shopping
This commit is contained in:
@@ -10,6 +10,7 @@ import { stagger } from '/utils/ux.js';
|
|||||||
import { t, formatDate, dateInputPlaceholder, formatDateInput, parseDateInput, isDateInputValid } from '/i18n.js';
|
import { t, formatDate, dateInputPlaceholder, formatDateInput, parseDateInput, isDateInputValid } from '/i18n.js';
|
||||||
import { esc } from '/utils/html.js';
|
import { esc } from '/utils/html.js';
|
||||||
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
||||||
|
import { renderKitchenTabsBar } from '/utils/kitchen-tabs.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -163,6 +164,7 @@ export async function render(container, { user }) {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
if (window.lucide) lucide.createIcons();
|
if (window.lucide) lucide.createIcons();
|
||||||
|
renderKitchenTabsBar(container, '/meals');
|
||||||
|
|
||||||
const today = new Date().toISOString().slice(0, 10);
|
const today = new Date().toISOString().slice(0, 10);
|
||||||
const monday = getMondayOf(today);
|
const monday = getMondayOf(today);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { api } from '/api.js';
|
|||||||
import { t } from '/i18n.js';
|
import { t } from '/i18n.js';
|
||||||
import { openModal as openSharedModal, closeModal as closeSharedModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal as closeSharedModal } from '/components/modal.js';
|
||||||
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
||||||
|
import { renderKitchenTabsBar } from '/utils/kitchen-tabs.js';
|
||||||
|
|
||||||
let _container = null;
|
let _container = null;
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ export async function render(container) {
|
|||||||
|
|
||||||
page.append(header, list, fab);
|
page.append(header, list, fab);
|
||||||
container.replaceChildren(page);
|
container.replaceChildren(page);
|
||||||
|
renderKitchenTabsBar(container, '/recipes');
|
||||||
|
|
||||||
if (window.lucide) window.lucide.createIcons();
|
if (window.lucide) window.lucide.createIcons();
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { t } from '/i18n.js';
|
|||||||
import { esc } from '/utils/html.js';
|
import { esc } from '/utils/html.js';
|
||||||
import { promptModal } from '/components/modal.js';
|
import { promptModal } from '/components/modal.js';
|
||||||
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
import { DEFAULT_CATEGORY_NAME, categoryLabel } from '/utils/shopping-categories.js';
|
||||||
|
import { renderKitchenTabsBar } from '/utils/kitchen-tabs.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -839,6 +840,7 @@ export async function render(container, { user }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
renderKitchenTabsBar(container, '/shopping');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all([loadCategories(), loadLists()]);
|
await Promise.all([loadCategories(), loadLists()]);
|
||||||
|
|||||||
Reference in New Issue
Block a user