Merge branch 'mealie-next' into test-v-show-for-login-inputs

This commit is contained in:
Kuchenpirat
2025-07-19 22:08:31 +02:00
committed by GitHub
20 changed files with 2539 additions and 2541 deletions

View File

@@ -269,13 +269,17 @@ export default defineNuxtComponent({
recipeName: props.name,
loading: false,
menuItems: [] as ContextMenuItem[],
newMealdate: new Date(Date.now() - new Date().getTimezoneOffset() * 60000),
newMealdate: new Date(),
newMealType: "dinner" as PlanEntryType,
pickerMenu: false,
});
const newMealdateString = computed(() => {
return state.newMealdate.toISOString().substring(0, 10);
// Format the date to YYYY-MM-DD in the same timezone as newMealdate
const year = state.newMealdate.getFullYear();
const month = String(state.newMealdate.getMonth() + 1).padStart(2, "0");
const day = String(state.newMealdate.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
});
const i18n = useI18n();

View File

@@ -1005,7 +1005,7 @@
"webhooks-enabled": "Webhooks aktiviert",
"you-are-not-allowed-to-create-a-user": "Du bist nicht berechtigt, einen Benutzer anzulegen",
"you-are-not-allowed-to-delete-this-user": "Du bist nicht berechtigt, diesen Benutzer zu entfernen",
"enable-advanced-content": "Erweiterten Inhalt aktivieren",
"enable-advanced-content": "Erweiterte Inhalte aktivieren",
"enable-advanced-content-description": "Aktiviert zusätzliche Funktionen wie Rezept-Skalierung, API-Schlüssel, Webhooks und Datenverwaltung. Keine Sorge, das kann später noch geändert werden.",
"favorite-recipes": "Favoriten",
"email-or-username": "E-Mail oder Benutzername",

View File

@@ -45,7 +45,7 @@
"category-filter": "סינון קטגוריות",
"category-update-failed": "עדכון קטגוריה נכשל",
"category-updated": "קטגוריה עודכנה",
"uncategorized-count": "{count} לא קיבלו קטגוריה",
"uncategorized-count": "{count} ללא קטגוריה",
"create-a-category": "יצירת קטגוריה",
"category-name": "שם קטגוריה",
"category": "קטגוריה"

View File

@@ -5,7 +5,6 @@
:close-on-content-click="false"
transition="scale-transition"
offset-y
max-width="290px"
min-width="auto"
>
<template #activator="{ props }">
@@ -20,29 +19,26 @@
{{ $d(weekRange.start, "short") }} - {{ $d(weekRange.end, "short") }}
</v-btn>
</template>
<v-date-picker
v-model="state.range"
hide-header
:multiple="'range'"
:first-day-of-week="firstDayOfWeek"
:local="$i18n.locale"
>
<v-text-field
v-model="numberOfDays"
type="number"
:label="$t('meal-plan.numberOfDays-label')"
:hint="$t('meal-plan.numberOfDays-hint')"
persistent-hint
<v-card>
<v-date-picker
v-model="state.range"
hide-header
:multiple="'range'"
:first-day-of-week="firstDayOfWeek"
:local="$i18n.locale"
/>
<v-spacer />
<v-btn
variant="text"
color="primary"
@click="state.picker = false"
>
{{ $t("general.ok") }}
</v-btn>
</v-date-picker>
<v-card-text>
<v-text-field
v-model="numberOfDays"
type="number"
:label="$t('meal-plan.numberOfDays-label')"
:hint="$t('meal-plan.numberOfDays-hint')"
persistent-hint
/>
</v-card-text>
</v-card>
</v-menu>
<div class="d-flex flex-wrap align-center justify-space-between mb-2">
@@ -115,15 +111,11 @@ export default defineNuxtComponent({
const weekRange = computed(() => {
const sorted = [...state.value.range].sort((a, b) => a.getTime() - b.getTime());
if (sorted.length === 2) {
return {
start: sorted[0],
end: sorted[1],
};
// return {
// start: parseYYYYMMDD(sorted[0]),
// end: parseYYYYMMDD(sorted[1]),
// };
const start = sorted[0];
const end = sorted[sorted.length - 1];
if (start && end) {
return { start, end };
}
return {
start: new Date(),