mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-03 21:55:22 -04:00
* feat(frontend): 💄 add recipe title * fix(frontend): 🐛 fixes #722 side-bar issue * feat(frontend): ✨ Add page titles to all pages * minor cleanup * refactor(backend): ♻️ rewrite scheduler to be more modulare and work * feat(frontend): ✨ start password reset functionality * refactor(backend): ♻️ refactor application settings to facilitate dependency injection * refactor(backend): 🔥 remove RECIPE_SETTINGS env variables in favor of group settings * formatting * refactor(backend): ♻️ align naming convention * feat(backend): ✨ password reset * test(backend): ✅ password reset * feat(frontend): ✨ self-service password reset * purge password schedule * update user creation for tests Co-authored-by: Hayden <hay-kot@pm.me>
48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
|
<v-container>
|
|
<RecipeCardSection
|
|
v-if="category"
|
|
:icon="$globals.icons.tags"
|
|
:title="category.name"
|
|
:recipes="category.recipes"
|
|
@sort="assignSorted"
|
|
></RecipeCardSection>
|
|
</v-container>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, useAsync, useRoute } from "@nuxtjs/composition-api";
|
|
import RecipeCardSection from "~/components/Domain/Recipe/RecipeCardSection.vue";
|
|
import { useApiSingleton } from "~/composables/use-api";
|
|
import { Recipe } from "~/types/api-types/recipe";
|
|
|
|
export default defineComponent({
|
|
components: { RecipeCardSection },
|
|
setup() {
|
|
const api = useApiSingleton();
|
|
const route = useRoute();
|
|
const slug = route.value.params.slug;
|
|
|
|
const category = useAsync(async () => {
|
|
const { data } = await api.categories.getOne(slug);
|
|
return data;
|
|
}, slug);
|
|
return { category };
|
|
},
|
|
head() {
|
|
return {
|
|
title: this.$t("sidebar.categories") as string,
|
|
};
|
|
},
|
|
methods: {
|
|
assignSorted(val: Array<Recipe>) {
|
|
if (this.category) {
|
|
this.category.recipes = val;
|
|
}
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
</style> |