fix: Optimize Recipe Favorites/Ratings (#6075)

This commit is contained in:
Michael Genson
2025-09-03 09:56:38 -05:00
committed by GitHub
parent 1cdf43c599
commit 461e51bd22
12 changed files with 142 additions and 28 deletions

View File

@@ -36,8 +36,9 @@ import AppHeader from "@/components/Layout/LayoutParts/AppHeader.vue";
import AppSidebar from "@/components/Layout/LayoutParts/AppSidebar.vue";
import TheSnackbar from "~/components/Layout/LayoutParts/TheSnackbar.vue";
import type { SidebarLinks } from "~/types/application-types";
import { useGlobalI18n } from "~/composables/use-global-i18n";
const i18n = useI18n();
const i18n = useGlobalI18n();
const display = useDisplay();
const { $globals } = useNuxtApp();

View File

@@ -13,11 +13,10 @@
</v-app>
</template>
<script lang="ts">
<script setup lang="ts">
import TheSnackbar from "~/components/Layout/LayoutParts/TheSnackbar.vue";
import AppHeader from "@/components/Layout/LayoutParts/AppHeader.vue";
import { useGlobalI18n } from "~/composables/use-global-i18n";
export default defineNuxtComponent({
components: { TheSnackbar, AppHeader },
});
useGlobalI18n(); // ensure i18n is initialized
</script>

View File

@@ -24,6 +24,7 @@
<script lang="ts">
import TheSnackbar from "~/components/Layout/LayoutParts/TheSnackbar.vue";
import { useAppInfo } from "~/composables/api";
import { useGlobalI18n } from "~/composables/use-global-i18n";
export default defineNuxtComponent({
components: { TheSnackbar },
@@ -32,7 +33,7 @@ export default defineNuxtComponent({
const isDemo = computed(() => appInfo?.value?.demoStatus || false);
const i18n = useI18n();
const i18n = useGlobalI18n();
const version = computed(() => appInfo?.value?.version || i18n.t("about.unknown-version"));
return {

View File

@@ -2,10 +2,9 @@
<DefaultLayout />
</template>
<script lang="ts">
<script setup lang="ts">
import DefaultLayout from "@/components/Layout/DefaultLayout.vue";
import { useGlobalI18n } from "~/composables/use-global-i18n";
export default defineNuxtComponent({
components: { DefaultLayout },
});
useGlobalI18n(); // ensure i18n is initialized
</script>

View File

@@ -46,6 +46,8 @@
</template>
<script lang="ts">
import { useGlobalI18n } from "~/composables/use-global-i18n";
export default defineNuxtComponent({
props: {
error: {
@@ -58,7 +60,7 @@ export default defineNuxtComponent({
layout: "basic",
});
const i18n = useI18n();
const i18n = useGlobalI18n();
const $auth = useMealieAuth();
const { $globals } = useNuxtApp();
const ready = ref(false);