mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-16 10:03:54 -07:00
fix(backend): 🐛 Fix recipe page issues (#778)
* fix(backend): 🐛 Fix favorite assignment on backend * fix(frontend): 🐛 fix printer button on recipe page * style(frontend): 🚸 add user feadback on copy of recipe link * fix(frontend): 🐛 Fix enableLandscape incorrect bindings to remove duplicate values * feat(frontend): ✨ add ingredient copy button for markdown list -[ ] format * feat(frontend): ✨ add remove prefix button to bulk entry * fix(frontend): 🐛 disable random button when no recipes are present * fix(frontend): ✨ fix .zip download error * fix(frontend): 🚸 close image dialog on upload/get * fix(frontend): 🐛 fix assignment on creation for categories and tags * feat(frontend): ✨ Open editor on creation / fix edit button on main screen * fix(frontend): 🐛 fix false negative regex match for urls on creationg page * feat(frontend): 🚸 provide better user feadback when recipe exists * feat(frontend): ✨ lock bulk importer on submit * remove zip from navigation * fix(frontend): ✨ rerender recipes on delete Co-authored-by: Hayden K <hay-kot@pm.me>
This commit is contained in:
parent
ec3b53cdc3
commit
9f8c61a75a
27 changed files with 323 additions and 163 deletions
|
@ -24,7 +24,23 @@
|
|||
:placeholder="$t('new-recipe.paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list')"
|
||||
>
|
||||
</v-textarea>
|
||||
<v-btn outlined color="info" small @click="trimAllLines"> Trim Whitespace </v-btn>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn outlined color="info" small v-bind="attrs" @click="trimAllLines" v-on="on">
|
||||
Trim Whitespace
|
||||
</v-btn>
|
||||
</template>
|
||||
<span> Trim leading and trailing whitespace as well as blank lines </span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn class="ml-1" outlined color="info" small v-bind="attrs" @click="removeFirstCharacter" v-on="on">
|
||||
Trim Prefix
|
||||
</v-btn>
|
||||
</template>
|
||||
<span> Trim first character from each line </span>
|
||||
</v-tooltip>
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
@ -52,14 +68,20 @@ export default defineComponent({
|
|||
return state.inputText.split("\n").filter((line) => !(line === "\n" || !line));
|
||||
}
|
||||
|
||||
function trimAllLines() {
|
||||
const splitLintes = splitText();
|
||||
function removeFirstCharacter() {
|
||||
state.inputText = splitText()
|
||||
.map((line) => line.substr(1))
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
splitLintes.forEach((element: string, index: number) => {
|
||||
splitLintes[index] = element.trim();
|
||||
function trimAllLines() {
|
||||
const splitLines = splitText();
|
||||
|
||||
splitLines.forEach((element: string, index: number) => {
|
||||
splitLines[index] = element.trim();
|
||||
});
|
||||
|
||||
state.inputText = splitLintes.join("\n");
|
||||
state.inputText = splitLines.join("\n");
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
@ -70,6 +92,7 @@ export default defineComponent({
|
|||
return {
|
||||
splitText,
|
||||
trimAllLines,
|
||||
removeFirstCharacter,
|
||||
save,
|
||||
...toRefs(state),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue