mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-23 07:09:41 +02:00
Refactor/composables-folder (#787)
* move api clients and rename * organize recipes composables * rewrite useRecipeContext * refactor(frontend): ♻️ abstract common ingredient functionality. * feat(frontend): ✨ add scale, and back to recipe button + hide ingredients if none * update regex to mach 11. instead of just 1. * minor UX improvements Co-authored-by: Hayden K <hay-kot@pm.me>
This commit is contained in:
parent
095d3bda3f
commit
788e176b16
68 changed files with 330 additions and 245 deletions
|
@ -1,10 +1,10 @@
|
|||
import { useAsync, ref } from "@nuxtjs/composition-api";
|
||||
import { useAsyncKey } from "./use-utils";
|
||||
import { useApiSingleton } from "~/composables/use-api";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { CreateGroup } from "~/api/class-interfaces/groups";
|
||||
|
||||
export const useGroupSelf = function () {
|
||||
const api = useApiSingleton();
|
||||
const api = useUserApi();
|
||||
|
||||
const actions = {
|
||||
get() {
|
||||
|
@ -35,7 +35,7 @@ export const useGroupSelf = function () {
|
|||
};
|
||||
|
||||
export const useGroupCategories = function () {
|
||||
const api = useApiSingleton();
|
||||
const api = useUserApi();
|
||||
|
||||
const actions = {
|
||||
getAll() {
|
||||
|
@ -61,7 +61,7 @@ export const useGroupCategories = function () {
|
|||
};
|
||||
|
||||
export const useGroups = function () {
|
||||
const api = useApiSingleton();
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
|
||||
function getAllGroups() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue