From 0a0038f1770bd0adf21405b5f459b86ff5b17789 Mon Sep 17 00:00:00 2001 From: chloe Date: Thu, 19 Mar 2026 06:50:17 +0000 Subject: [PATCH] UI updates --- Seasoned.Frontend/app/app.vue | 24 ++- .../app/assets/css/app-theme.css | 30 +++- Seasoned.Frontend/app/assets/css/gallery.css | 1 + Seasoned.Frontend/app/pages/gallery.vue | 150 ++++++------------ Seasoned.Frontend/app/pages/index.vue | 20 +-- 5 files changed, 101 insertions(+), 124 deletions(-) diff --git a/Seasoned.Frontend/app/app.vue b/Seasoned.Frontend/app/app.vue index b4d011a..1332a1f 100644 --- a/Seasoned.Frontend/app/app.vue +++ b/Seasoned.Frontend/app/app.vue @@ -6,33 +6,31 @@ - +

Instructions @@ -218,10 +236,10 @@
- {{ index + 1 }}. -

{{ step }}

+ {{ index + 1 }}. +

{{ step }}

@@ -241,76 +259,7 @@ import { ref, onMounted, computed, watch } from 'vue' import '@/assets/css/gallery.css' import '@/assets/css/app-theme.css' -/*const mockRecipes = [ - { - id: 1, - title: "Miso-Glazed Smashed Burger", - imageUrl: "https://picsum.photos/id/42/800/600", - ingredients: ["1/2 lb Ground Beef", "1 tbsp White Miso", "Brioche Bun", "Pickled Ginger"], - instructions: ["Mix miso into beef.", "Smash thin on high heat.", "Sear until crispy."], - createdAt: "2026-03-18T10:00:00Z" - }, - { - id: 2, - title: "Zesty Yuzu Raspberry Bowl", - imageUrl: "https://picsum.photos/id/429/800/600", - ingredients: ["1 cup Oats", "2 tbsp Yuzu Juice", "Fresh Raspberries", "Honey"], - instructions: ["Soak oats overnight.", "Stir in yuzu.", "Top with berries."], - createdAt: "2026-03-17T08:30:00Z" - }, - { - id: 3, - title: "Caribbean Curry Chickpeas", - imageUrl: "https://picsum.photos/id/493/800/600", - ingredients: ["1 can Chickpeas", "Coconut Milk", "Curry Powder", "Sweet Potato"], - instructions: ["Sauté potatoes.", "Add chickpeas and spices.", "Simmer in coconut milk."], - createdAt: "2026-03-16T12:45:00Z" - }, - { - id: 4, - title: "Tallow-Crisped Truffle Fries", - imageUrl: "https://picsum.photos/id/517/800/600", - ingredients: ["Russet Potatoes", "Beef Tallow", "Truffle Salt", "Parsley"], - instructions: ["Double fry in tallow.", "Toss with truffle salt.", "Garnish with parsley."], - createdAt: "2026-03-15T16:20:00Z" - }, - { - id: 5, - title: "Smoked Gouda & Broccolini Soup", - imageUrl: "https://picsum.photos/id/488/800/600", - ingredients: ["Broccolini", "Smoked Gouda", "Heavy Cream", "Vegetable Broth"], - instructions: ["Simmer broccolini in broth.", "Blend until smooth.", "Melt in cheese."], - createdAt: "2026-03-14T11:10:00Z" - }, - { - id: 6, - title: "Heirloom Tomato Galette", - imageUrl: "https://picsum.photos/id/447/800/600", - ingredients: ["Puff Pastry", "Heirloom Tomatoes", "Ricotta", "Thyme"], - instructions: ["Spread ricotta on pastry.", "Layer tomatoes.", "Bake at 200°C until golden."], - createdAt: "2026-03-13T09:00:00Z" - }, - { - id: 7, - title: "Thai Basil Pesto Pasta", - imageUrl: "https://picsum.photos/id/102/800/600", - ingredients: ["Linguine", "Thai Basil", "Cashews", "Garlic", "Chili Flakes"], - instructions: ["Blend basil, cashews, and garlic.", "Toss with hot pasta.", "Add chili for heat."], - createdAt: "2026-03-12T19:30:00Z" - }, - { - id: 8, - title: "Whipped Feta & Hot Honey Toast", - imageUrl: "https://picsum.photos/id/311/800/600", - ingredients: ["Sourdough", "Feta Cheese", "Greek Yogurt", "Hot Honey"], - instructions: ["Whip feta and yogurt.", "Toast sourdough.", "Spread and drizzle honey."], - createdAt: "2026-03-11T07:45:00Z" - } -] -*/ const recipes = ref([]) -//const recipes = ref(mockRecipes) -//const loading = ref(false) const loading = ref(true) const showDetails = ref(false) const selectedRecipe = ref(null) @@ -323,7 +272,6 @@ let debounceTimeout = null onMounted(async () => { await fetchRecipes() - //loading.value = false }) const fetchRecipes = async () => { @@ -427,6 +375,7 @@ const sortedRecipes = computed(() => { }) const performSearch = async () => { + const currentQuery = searchQuery.value if (!searchQuery.value) { await fetchRecipes() return @@ -435,11 +384,12 @@ const performSearch = async () => { try { isSearching.value = true const data = await $fetch(`${config.public.apiBase}api/recipe/search`, { - query: { query: searchQuery.value }, + query: { query: currentQuery }, credentials: 'include' }) - console.log("Search results received:", data) - recipes.value = data + if (searchQuery.value === currentQuery) { + recipes.value = data + } } catch (err) { console.error("Search failed:", err) } finally { diff --git a/Seasoned.Frontend/app/pages/index.vue b/Seasoned.Frontend/app/pages/index.vue index d0b95ee..367fbfa 100644 --- a/Seasoned.Frontend/app/pages/index.vue +++ b/Seasoned.Frontend/app/pages/index.vue @@ -3,9 +3,9 @@ - + -
+

Seasoned

-

A Recipe Generator and Collection Tool

+

A Recipe Generator and Collection Tool

- + - - + +

Scan Archives

-

+

Turn handwritten cards into searchable digital text instantly.

- + Go to Uploader
- +

Consult the Chef

@@ -43,7 +43,7 @@ Talk to Chef - +

Preserve History