-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mealie-next' into feature/push_to_ghcr
- Loading branch information
Showing
50 changed files
with
1,444 additions
and
196 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
alembic/versions/2023-08-14-19.30.49_1825b5225403_added_recipe_note_to_shopping_list_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""added recipe note to shopping list recipe ref | ||
Revision ID: 1825b5225403 | ||
Revises: 04ac51cbe9a4 | ||
Create Date: 2023-08-14 19:30:49.103185 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "1825b5225403" | ||
down_revision = "04ac51cbe9a4" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("shopping_list_item_recipe_reference", sa.Column("recipe_note", sa.String(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("shopping_list_item_recipe_reference", "recipe_note") | ||
# ### end Alembic commands ### |
32 changes: 32 additions & 0 deletions
32
alembic/versions/2023-08-15-16.25.07_bcfdad6b7355_remove_tool_name_and_slug_unique_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""remove tool name and slug unique contraints | ||
Revision ID: bcfdad6b7355 | ||
Revises: 1825b5225403 | ||
Create Date: 2023-08-15 16:25:07.058929 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "bcfdad6b7355" | ||
down_revision = "1825b5225403" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("ix_tools_name", table_name="tools") | ||
op.create_index(op.f("ix_tools_name"), "tools", ["name"], unique=False) | ||
op.drop_index("ix_tools_slug", table_name="tools") | ||
op.create_index(op.f("ix_tools_slug"), "tools", ["slug"], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("ix_tools_slug"), table_name="tools") | ||
op.create_index("ix_tools_slug", "tools", ["slug"], unique=True) | ||
op.drop_index(op.f("ix_tools_name"), table_name="tools") | ||
op.create_index("ix_tools_name", "tools", ["name"], unique=True) | ||
# ### end Alembic commands ### |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
frontend/components/Domain/Recipe/RecipeIngredientListItem.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<div class="ma-0 pa-0 text-subtitle-1 dense-markdown ingredient-item"> | ||
<SafeMarkdown v-if="parsedIng.quantity" class="d-inline" :source="parsedIng.quantity" /> | ||
<template v-if="parsedIng.unit">{{ parsedIng.unit }} </template> | ||
<SafeMarkdown v-if="parsedIng.note && !parsedIng.name" class="text-bold d-inline" :source="parsedIng.note" /> | ||
<template v-else> | ||
<SafeMarkdown v-if="parsedIng.name" class="text-bold d-inline" :source="parsedIng.name" /> | ||
<SafeMarkdown v-if="parsedIng.note" class="note" :source="parsedIng.note" /> | ||
</template> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { computed, defineComponent, toRefs } from "@nuxtjs/composition-api"; | ||
import { RecipeIngredient } from "~/lib/api/types/group"; | ||
import { useParsedIngredientText } from "~/composables/recipes"; | ||
export default defineComponent({ | ||
props: { | ||
ingredient: { | ||
type: Object as () => RecipeIngredient, | ||
required: true, | ||
}, | ||
disableAmount: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
scale: { | ||
type: Number, | ||
default: 1, | ||
}, | ||
}, | ||
setup(props) { | ||
const parsedIng = computed(() => { | ||
return useParsedIngredientText(props.ingredient, props.disableAmount, props.scale); | ||
}); | ||
return { | ||
parsedIng, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
<style lang="scss"> | ||
.ingredient-item { | ||
.d-inline { | ||
& > p { | ||
display: inline; | ||
} | ||
} | ||
.text-bold { | ||
font-weight: bold; | ||
} | ||
} | ||
.note { | ||
line-height: 0.8em; | ||
font-size: 0.8em; | ||
opacity: 0.7; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.