mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-14 20:03:14 -05:00
committed by
GitHub
parent
5aafb56c4f
commit
904e6b7d82
@@ -159,7 +159,7 @@ export default defineNuxtComponent({
|
||||
title: i18n.t("cookbook.cookbooks"),
|
||||
});
|
||||
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const { store: allCookbooks, actions, updateAll } = useCookbookStore();
|
||||
|
||||
// Make a local reactive copy of myCookbooks
|
||||
@@ -169,7 +169,7 @@ export default defineNuxtComponent({
|
||||
(cookbooks) => {
|
||||
myCookbooks.value
|
||||
= cookbooks?.filter(
|
||||
cookbook => cookbook.householdId === $auth.user.value?.householdId,
|
||||
cookbook => cookbook.householdId === auth.user.value?.householdId,
|
||||
).sort((a, b) => a.position > b.position) ?? [];
|
||||
},
|
||||
{ immediate: true },
|
||||
|
||||
@@ -16,7 +16,7 @@ import { usePublicExploreApi } from "~/composables/api/api-client";
|
||||
import { useRecipe } from "~/composables/recipes";
|
||||
import type { Recipe } from "~/lib/api/types/recipe";
|
||||
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
const route = useRoute();
|
||||
const title = ref(route.meta?.title as string || "");
|
||||
@@ -34,7 +34,7 @@ function loadRecipe() {
|
||||
}
|
||||
|
||||
async function loadPublicRecipe() {
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
const api = usePublicExploreApi(groupSlug.value);
|
||||
const { data } = await useAsyncData(useAsyncKey(), async () => {
|
||||
const { data, error } = await api.explore.recipes.getOne(slug);
|
||||
|
||||
@@ -51,7 +51,7 @@ export default defineNuxtComponent({
|
||||
middleware: ["group-only"],
|
||||
setup() {
|
||||
const i18n = useI18n();
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const { $appInfo, $globals } = useNuxtApp();
|
||||
|
||||
useSeoMeta({
|
||||
@@ -99,7 +99,7 @@ export default defineNuxtComponent({
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const groupSlug = computed(() => route.params.groupSlug || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug || auth.user.value?.groupSlug || "");
|
||||
|
||||
const subpage = computed({
|
||||
set(subpage: string) {
|
||||
|
||||
@@ -112,9 +112,9 @@ export default defineNuxtComponent({
|
||||
loading: false,
|
||||
isEditJSON: false,
|
||||
});
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
const domUrlForm = ref<VForm | null>(null);
|
||||
|
||||
const api = useUserApi();
|
||||
|
||||
@@ -53,9 +53,9 @@ export default defineNuxtComponent({
|
||||
error: false,
|
||||
loading: false,
|
||||
});
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
|
||||
const api = useUserApi();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -144,10 +144,10 @@ export default defineNuxtComponent({
|
||||
loading: false,
|
||||
});
|
||||
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const api = useUserApi();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
|
||||
const router = useRouter();
|
||||
const tags = useTagStore();
|
||||
|
||||
@@ -47,9 +47,9 @@ export default defineNuxtComponent({
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
});
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
|
||||
const api = useUserApi();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -436,7 +436,7 @@ export default defineNuxtComponent({
|
||||
setup() {
|
||||
const display = useDisplay();
|
||||
const i18n = useI18n();
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const route = useRoute();
|
||||
|
||||
useSeoMeta({
|
||||
@@ -445,7 +445,7 @@ export default defineNuxtComponent({
|
||||
|
||||
const useMobile = computed(() => display.smAndDown.value);
|
||||
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
const api = isOwnGroup.value ? useUserApi() : usePublicExploreApi(groupSlug.value).explore;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export default defineNuxtComponent({
|
||||
},
|
||||
middleware: ["group-only"],
|
||||
setup() {
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const toolStore = useToolStore();
|
||||
const dialog = ref(false);
|
||||
const i18n = useI18n();
|
||||
@@ -39,7 +39,7 @@ export default defineNuxtComponent({
|
||||
title: i18n.t("tool.tools"),
|
||||
});
|
||||
|
||||
const userHousehold = computed(() => $auth.user.value?.householdSlug || "");
|
||||
const userHousehold = computed(() => auth.user.value?.householdSlug || "");
|
||||
const tools = computed(() => toolStore.store.value.map(tool => (
|
||||
{
|
||||
...tool,
|
||||
|
||||
@@ -17,9 +17,9 @@ definePageMeta({
|
||||
layout: "basic",
|
||||
});
|
||||
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug as string || auth.user.value?.groupSlug || "");
|
||||
|
||||
const router = useRouter();
|
||||
const recipeId = route.params.id as string;
|
||||
|
||||
Reference in New Issue
Block a user