1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

feat: "I Made This" Dialog (#1801)

* added chef hat

* removed unnecessary log

* modified recipe and recipe timeline event schema
changed timeline event "message" -> "event_message"
added "last made" timestamp to recipe

* added "I made this" dialog to recipe action menu

* added missing field and re-ran code-gen

* moved dialog out of context menu and refactored
removed references in action menu and context menu
refactored dialog to be triggered by a button instead
added route to update recipe last made timestamp
added visual for last made timestamp to recipe header and title

* added sorting by last made

* switched event type to comment

* replaced alter column with pydantic alias

* added tests for event message alias
This commit is contained in:
Michael Genson 2022-11-13 17:12:53 -06:00 committed by GitHub
parent f0e6496001
commit a2dcdc1adf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 275 additions and 9 deletions

View file

@ -49,6 +49,12 @@
</v-icon>
<v-list-item-title>{{ $t("general.updated") }}</v-list-item-title>
</v-list-item>
<v-list-item @click="sortRecipes(EVENTS.lastMade)">
<v-icon left>
{{ $globals.icons.chefHat }}
</v-icon>
<v-list-item-title>{{ "Last Made" }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<ContextMenu
@ -186,6 +192,7 @@ export default defineComponent({
rating: "rating",
created: "created",
updated: "updated",
lastMade: "lastMade",
shuffle: "shuffle",
};
@ -303,6 +310,9 @@ export default defineComponent({
case EVENTS.updated:
setter("update_at", $globals.icons.sortClockAscending, $globals.icons.sortClockDescending);
break;
case EVENTS.lastMade:
setter("last_made", $globals.icons.sortCalendarAscending, $globals.icons.sortCalendarDescending);
break;
default:
console.log("Unknown Event", sortType);
return;