From 0a5606eee6b2e5f6fa7ffc9edaae87663dbacfc9 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Sun, 13 Nov 2022 14:53:48 +0000
Subject: [PATCH 01/18] added new icons
---
frontend/lib/icons/icons.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/frontend/lib/icons/icons.ts b/frontend/lib/icons/icons.ts
index 9e97a668ea..85234e13df 100644
--- a/frontend/lib/icons/icons.ts
+++ b/frontend/lib/icons/icons.ts
@@ -60,6 +60,7 @@ import {
mdiAlert,
mdiCheckboxMarkedCircle,
mdiInformation,
+ mdiInformationVariant,
mdiBellAlert,
mdiRefreshCircle,
mdiMenu,
@@ -122,6 +123,8 @@ import {
mdiCursorMove,
mdiText,
mdiTextBoxOutline,
+ mdiTimelineText,
+ mdiMessageText,
} from "@mdi/js";
export const icons = {
@@ -190,10 +193,12 @@ export const icons = {
home: mdiHome,
import: mdiImport,
information: mdiInformation,
+ informationVariant: mdiInformationVariant,
link: mdiLink,
lock: mdiLock,
logout: mdiLogout,
menu: mdiMenu,
+ messageText: mdiMessageText,
newBox: mdiNewBox,
notificationClearAll: mdiNotificationClearAll,
openInNew: mdiOpenInNew,
@@ -216,6 +221,7 @@ export const icons = {
sortClockDescending: mdiSortClockDescending,
star: mdiStar,
testTube: mdiTestTube,
+ timelineText: mdiTimelineText,
tools: mdiTools,
potSteam: mdiPotSteam,
translate: mdiTranslate,
From c1427da031cfb54b3284bfb61df7e6d23dd1326c Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Sun, 13 Nov 2022 19:57:11 +0000
Subject: [PATCH 02/18] added timeline badge and dialog to action menu
---
.../Domain/Recipe/RecipeActionMenu.vue | 5 +-
.../Domain/Recipe/RecipeDialogTimeline.vue | 44 +++++++++++++++++
.../Domain/Recipe/RecipeTimelineBadge.vue | 49 +++++++++++++++++++
3 files changed, 96 insertions(+), 2 deletions(-)
create mode 100644 frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
create mode 100644 frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
diff --git a/frontend/components/Domain/Recipe/RecipeActionMenu.vue b/frontend/components/Domain/Recipe/RecipeActionMenu.vue
index 9b5edd5d47..b4c981a4a4 100644
--- a/frontend/components/Domain/Recipe/RecipeActionMenu.vue
+++ b/frontend/components/Domain/Recipe/RecipeActionMenu.vue
@@ -22,6 +22,7 @@
+
@@ -69,7 +70,6 @@
:key="index"
:fab="$vuetify.breakpoint.xs"
:small="$vuetify.breakpoint.xs"
- class="mx-1"
:color="btn.color"
@click="emitHandler(btn.event)"
>
@@ -84,6 +84,7 @@
import { defineComponent, ref, useContext } from "@nuxtjs/composition-api";
import RecipeContextMenu from "./RecipeContextMenu.vue";
import RecipeFavoriteBadge from "./RecipeFavoriteBadge.vue";
+import RecipeTimelineBadge from "./RecipeTimelineBadge.vue";
import { Recipe } from "~/lib/api/types/recipe";
const SAVE_EVENT = "save";
@@ -93,7 +94,7 @@ const JSON_EVENT = "json";
const OCR_EVENT = "ocr";
export default defineComponent({
- components: { RecipeContextMenu, RecipeFavoriteBadge },
+ components: { RecipeContextMenu, RecipeFavoriteBadge, RecipeTimelineBadge },
props: {
recipe: {
required: true,
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
new file mode 100644
index 0000000000..09c584f915
--- /dev/null
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -0,0 +1,44 @@
+
+
+
+ Placeholder. Coming soon!
+
+
+
+
+
diff --git a/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue b/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
new file mode 100644
index 0000000000..bb42222850
--- /dev/null
+++ b/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+ {{ $globals.icons.timelineText }}
+
+
+
+
+ Open Event Timeline
+
+
+
+
From 760aaa9044efbca5915052f6615a72bccc248667 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Sun, 13 Nov 2022 20:58:12 +0000
Subject: [PATCH 03/18] more icons
---
frontend/lib/icons/icons.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/frontend/lib/icons/icons.ts b/frontend/lib/icons/icons.ts
index 85234e13df..a8443764e2 100644
--- a/frontend/lib/icons/icons.ts
+++ b/frontend/lib/icons/icons.ts
@@ -37,6 +37,7 @@ import {
mdiHeartOutline,
mdiDotsHorizontal,
mdiCheckboxBlankOutline,
+ mdiCommentTextMultiple,
mdiCommentTextMultipleOutline,
mdiDownload,
mdiFile,
@@ -165,6 +166,7 @@ export const icons = {
codeBraces: mdiCodeJson,
codeJson: mdiCodeJson,
cog: mdiCog,
+ commentTextMultiple: mdiCommentTextMultiple,
commentTextMultipleOutline: mdiCommentTextMultipleOutline,
contentCopy: mdiContentCopy,
database: mdiDatabase,
From d1a4ddb1640896c9b8b400ef97367562b19f8be8 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Sun, 13 Nov 2022 22:15:15 +0000
Subject: [PATCH 04/18] implemented timeline dialog using temporary API
---
.../Domain/Recipe/RecipeActionMenu.vue | 2 +-
.../Domain/Recipe/RecipeDialogTimeline.vue | 122 ++++++++++++++++--
.../Domain/Recipe/RecipeTimelineBadge.vue | 14 +-
3 files changed, 124 insertions(+), 14 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeActionMenu.vue b/frontend/components/Domain/Recipe/RecipeActionMenu.vue
index b4c981a4a4..4eb753227e 100644
--- a/frontend/components/Domain/Recipe/RecipeActionMenu.vue
+++ b/frontend/components/Domain/Recipe/RecipeActionMenu.vue
@@ -22,7 +22,7 @@
-
+
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index 09c584f915..ce3d03e349 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -1,18 +1,63 @@
-
- Placeholder. Coming soon!
-
+
+
+
+
+
+ {{ $globals.icons.calendar }}
+ {{ new Date(event.timestamp).toLocaleDateString($i18n.locale) }}
+
+
+
+
+
+
+ {{ event.subject }}
+
+
+ {{ event.message }}
+
+
+
+
+
+
+
+
+ Nothing on the timeline yet. Try making this recipe!
+
+
+ };
+
+ async function refreshTimelineEvents() {
+ // TODO: implement infinite scroll and paginate instead of loading all events at once
+ const page = 1;
+ const perPage = -1;
+ const orderBy = "timestamp";
+ const orderDirection = "asc";
+
+ const response = await api.recipes.getAllTimelineEvents(props.slug, page, perPage, { orderBy, orderDirection })
+ if (!response?.data) {
+ return;
+ }
+
+ timelineEvents.value = response.data.items;
+ };
+
+ // preload events
+ refreshTimelineEvents();
+
+ return {
+ chooseEventIcon,
+ dialog,
+ timelineEvents,
+ useMobileFormat,
+ };
+ },
+});
+
From 3e862adf74141468504ec1a45c02136d250a1f66 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Mon, 14 Nov 2022 18:36:12 +0000
Subject: [PATCH 07/18] cleaned tags
---
.../Domain/Recipe/RecipeDialogTimeline.vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index 9f3f5bee73..8577d27da4 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -58,7 +58,7 @@
width="100%"
style="overflow-y: auto;"
>
-
+
-
-
+
+
-
+
{{ $globals.icons.calendar }}
{{ new Date(event.timestamp).toLocaleDateString($i18n.locale) }}
-
-
+
+
{{ event.subject }}
{{ event.eventMessage }}
From b7d481ef76524bb18eb5b1f29a462eacbe992788 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Mon, 14 Nov 2022 18:48:10 +0000
Subject: [PATCH 08/18] improved last made UI for mobile
---
.../Domain/Recipe/RecipeLastMade.vue | 34 +++++++++++--------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeLastMade.vue b/frontend/components/Domain/Recipe/RecipeLastMade.vue
index 948650d048..83711284fd 100644
--- a/frontend/components/Domain/Recipe/RecipeLastMade.vue
+++ b/frontend/components/Domain/Recipe/RecipeLastMade.vue
@@ -42,21 +42,25 @@
-
-
- {{ $globals.icons.calendar }}
-
- Last Made {{ value ? new Date(value).toLocaleDateString($i18n.locale) : "Never" }}
-
-
- {{ $globals.icons.chefHat }}
- I Made This
-
+
+
+ {{ $globals.icons.chefHat }}
+ I Made This
+
+
+
+
+
+ {{ $globals.icons.calendar }}
+
+ Last Made {{ value ? new Date(value).toLocaleDateString($i18n.locale) : "Never" }}
+
+
From 38ddf9c9078c460fb9b349a62ddafb0eb72934b6 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Mon, 14 Nov 2022 21:55:10 +0000
Subject: [PATCH 09/18] added event context menu with placeholder methods
---
.../Domain/Recipe/RecipeDialogTimeline.vue | 47 +++-
.../Recipe/RecipeTimelineContextMenu.vue | 205 ++++++++++++++++++
2 files changed, 249 insertions(+), 3 deletions(-)
create mode 100644 frontend/components/Domain/Recipe/RecipeTimelineContextMenu.vue
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index 8577d27da4..e9d5a4f2d8 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -31,8 +31,30 @@
-
- {{ event.subject }}
+
+
+
+ {{ event.subject }}
+
+
+
+
+
+
{{ event.eventMessage }}
@@ -77,6 +99,24 @@
{{ new Date(event.timestamp).toLocaleDateString($i18n.locale) }}
+
+
+
+
@@ -102,12 +142,13 @@
From ef6b388c06d4e8c280b24a4ca46c6610fb5d5f49 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Tue, 15 Nov 2022 02:49:48 +0000
Subject: [PATCH 10/18] adjusted default made this date set time to 1 minute
before midnight adjusted display to properly interpret UTC
---
.../Domain/Recipe/RecipeLastMade.vue | 271 +++++++++---------
1 file changed, 141 insertions(+), 130 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeLastMade.vue b/frontend/components/Domain/Recipe/RecipeLastMade.vue
index 83711284fd..c7633ac1c6 100644
--- a/frontend/components/Domain/Recipe/RecipeLastMade.vue
+++ b/frontend/components/Domain/Recipe/RecipeLastMade.vue
@@ -1,147 +1,158 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $globals.icons.chefHat }}
+ I Made This
+
-
-
-
- {{ $globals.icons.chefHat }}
- I Made This
-
-
-
-
-
- {{ $globals.icons.calendar }}
-
- Last Made {{ value ? new Date(value).toLocaleDateString($i18n.locale) : "Never" }}
-
-
+
+
+
+ {{ $globals.icons.calendar }}
+
+ Last Made {{ value ? new Date(value+"Z").toLocaleDateString($i18n.locale) : "Never" }}
+
-
+
+
-
+ return {
+ ...toRefs(state),
+ domMadeThisForm,
+ madeThisDialog,
+ newTimelineEvent,
+ createTimelineEvent,
+ };
+ },
+});
+
From 75b2eb3e3b16d108060909055c839053ffde9f53 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Tue, 15 Nov 2022 02:54:07 +0000
Subject: [PATCH 11/18] fixed local date display
---
frontend/components/Domain/Recipe/RecipeDialogTimeline.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index e9d5a4f2d8..90f1640ffd 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -25,7 +25,7 @@
{{ $globals.icons.calendar }}
- {{ new Date(event.timestamp).toLocaleDateString($i18n.locale) }}
+ {{ new Date(event.timestamp+"Z").toLocaleDateString($i18n.locale) }}
@@ -96,7 +96,7 @@
{{ $globals.icons.calendar }}
- {{ new Date(event.timestamp).toLocaleDateString($i18n.locale) }}
+ {{ new Date(event.timestamp+"Z").toLocaleDateString($i18n.locale) }}
From 138217ec51153b454c1d54c19695fba1640778f7 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Tue, 15 Nov 2022 05:51:52 +0000
Subject: [PATCH 12/18] implemented update/delete routes
---
.../Domain/Recipe/RecipeDialogTimeline.vue | 55 ++++++++++++++++---
.../Recipe/RecipeTimelineContextMenu.vue | 43 ++++++++-------
frontend/lib/api/user/recipes/recipe.ts | 11 +++-
3 files changed, 80 insertions(+), 29 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index 90f1640ffd..3057208643 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -16,7 +16,7 @@
>
@@ -82,7 +84,7 @@
>
@@ -140,11 +144,12 @@
+ context.emit(eventKey);
+ state.loading = false;
+ }
+
+ return {
+ ...toRefs(state),
+ contextMenuEventHandler,
+ domEditEventForm,
+ icon,
+ };
+ },
+});
+
diff --git a/frontend/lang/messages/en-US.json b/frontend/lang/messages/en-US.json
index fbe38eda11..56426f68b3 100644
--- a/frontend/lang/messages/en-US.json
+++ b/frontend/lang/messages/en-US.json
@@ -52,6 +52,9 @@
"apprise-url": "Apprise URL",
"database": "Database",
"delete-event": "Delete Event",
+ "event-delete-confirmation": "Are you sure you want to delete this event?",
+ "event-deleted": "Event Deleted",
+ "event-updated": "Event Updated",
"new-notification-form-description": "Mealie uses the Apprise library to generate notifications. They offer many options for services to use for notifications. Refer to their wiki for a comprehensive guide on how to create the URL for your service. If available, selecting the type of your notification may include extra features.",
"new-version": "New version available!",
"notification": "Notification",
@@ -96,9 +99,11 @@
"keyword": "Keyword",
"link-copied": "Link Copied",
"loading-recipes": "Loading Recipes",
+ "message": "Message",
"monday": "Monday",
"name": "Name",
"new": "New",
+ "never": "Never",
"no": "No",
"no-recipe-found": "No Recipe Found",
"ok": "OK",
@@ -119,6 +124,7 @@
"sort": "Sort",
"sort-alphabetically": "Alphabetical",
"status": "Status",
+ "subject": "Subject",
"submit": "Submit",
"success-count": "Success: {count}",
"sunday": "Sunday",
@@ -275,6 +281,7 @@
"carbohydrate-content": "Carbohydrate",
"categories": "Categories",
"comment-action": "Comment",
+ "comment": "Comment",
"comments": "Comments",
"delete-confirmation": "Are you sure you want to delete this recipe?",
"delete-recipe": "Delete Recipe",
@@ -355,7 +362,14 @@
"decrease-scale-label": "Decrease Scale by 1",
"increase-scale-label": "Increase Scale by 1",
"locked": "Locked",
- "public-link": "Public Link"
+ "public-link": "Public Link",
+ "edit-timeline-event": "Edit Timeline Event",
+ "timeline": "Timeline",
+ "timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
+ "open-timeline": "Open Timeline",
+ "made-this": "I Made This",
+ "how-did-it-turn-out": "How did it turn out?",
+ "user-made-this": "{user} made this"
},
"search": {
"advanced-search": "Advanced Search",
From 01ab263930453627613d6a595e063df417affcc1 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Tue, 15 Nov 2022 17:25:51 +0000
Subject: [PATCH 16/18] fixed weird formatting
---
.../Domain/Recipe/RecipeTimelineBadge.vue | 94 +++++++++----------
1 file changed, 47 insertions(+), 47 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue b/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
index 2f96a273f9..d699f0ff39 100644
--- a/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
+++ b/frontend/components/Domain/Recipe/RecipeTimelineBadge.vue
@@ -1,53 +1,53 @@
-
-
-
-
- {{ $globals.icons.timelineText }}
-
-
-
-
- {{ $t('recipe.open-timeline') }}
-
-
+
+
+
+
+ {{ $globals.icons.timelineText }}
+
+
+
+
+ {{ $t('recipe.open-timeline') }}
+
+
-
+ return { showTimeline, toggleTimeline };
+ },
+});
+
From d7ac6b4fcb7b8498eb1aa887d5625526e25dd558 Mon Sep 17 00:00:00 2001
From: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Date: Mon, 5 Dec 2022 23:32:44 +0000
Subject: [PATCH 17/18] removed unnecessary async
---
.../Domain/Recipe/RecipeDialogTimeline.vue | 29 ++++++++-----------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
index 6c327f2e71..0e6590e82c 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogTimeline.vue
@@ -146,11 +146,10 @@