From 01369a743df32cc0caf8a118856ddb17b5aa0354 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Sun, 14 Dec 2025 02:24:37 +0200 Subject: [PATCH] try to fix cahce problem --- backend/__pycache__/main.cpython-313.pyc | Bin 29202 -> 28866 bytes backend/main.py | 10 +-- frontend/src/App.css | 12 +++ frontend/src/App.jsx | 78 +++++++++--------- frontend/src/components/NotificationBell.jsx | 4 +- .../src/components/PinnedGroceryLists.jsx | 2 +- frontend/src/groceryApi.js | 5 +- 7 files changed, 59 insertions(+), 52 deletions(-) diff --git a/backend/__pycache__/main.cpython-313.pyc b/backend/__pycache__/main.cpython-313.pyc index 1aac91cfa73fe9838a1061abd5ef10f35f689f66..fe77bd0ff034603e7fcf61146e9a03027b9b0ae5 100644 GIT binary patch delta 2458 zcmah~e@v8R9Dkqp-uLB~DBOVpW+Hf;ryw34!lA$+3J3_oLkaqx2*>e55$HKEn{Khv zxyEYccdgm_!;{X)!I?bnFoitI&n;ioufTpo?hsI9z|u95`>Vljb=@yMZoN4Qi#{Yd*Ki zbZZH>M86l$c7-klyJU$hP_z9r&_XrKF47`smCTctsf+YE3)O|(R}8x(^YjwVe9{cq zlSoV9x@0jg=QW%URC;V$KeG(x$;fn$qg}b0GpgMR*dkjJD>(B>bt}1cemy9hku8>| z@v79^QH`I2D23-7N8_=a&%+wUGJoa&)~=2d)=BF~x_qj%S24r$Wn=*xL0B1<- z)V7Bg+#bMc&{-Wi%fD1F1TZ|h7}tYS=vWqS0H;xHqMcdQf>0MF2&$>_+tEAx&x7mH zMK{tH>0G+WA;k+#q={Hx()NdJiy<b5U=3!UqwP<^EuZ9WZ)@`z++ED4Fps;X!@~|C<1;vtVkW1xD=F_1$x7Hh zZFA~(B>phIJA&{9!cl}0gf0#R>=?A!^0K}}$8m%c2tf$g82bvr#KEfg`{+f-NrbNv zPQguEGC8YFPCFqfyU}w5d^8KQEg|oNhAZ%n`;TywG3kY@MCTw8Q9@0Cs(x<&RBz@4|E0E^DX2M zy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<&aU1) zogLg__qa7UTiB3jC7ke&`TU`v`BGt-%$|np#Z&AF^F`+zD}55PaBG%25DvsGZ8&l= zC`3B?L>s|Vw5ke|?DKHdRmLuu$#?gw>{$qvon=qL-^)t(63Nm6!;x4}{D_#(5o8ij z5ceAK6S5bApk=9n$jFGL1V)9Wi(nue4T|T9@ni6BcCuH@bDO`#)F+sD)^wI%W(5~% zZJgi*f(e3lf>DGPF)6{BvI3~B%&&csye|>_oFIXKvJ<}`$U<=I3(1@($1e$9CioRV zWf^*~U}U!@W^oYL3G9MnWZB^rVV7wy zS?G-^2o8rsG~#IKpuSWM^OI{ z`Od@Tj{A~S{MGva|6@Kk>1y(ly%=$rjm;{c1te4_xaifQttT z(%-_V_$R?$g5R6}IIxE4vt(a|e;+K~m_nhKb+(e@enCw#iVqtZb$wmQS;*K$^>i@E z_f?y(^*tu9a%T_rpJZw9ul|y(TM_lxkY5C2A_K~eYAqXs#mulVyV|w;j*NZc+W&ZD ztCowK9yRlPFR;uFOX*q~r5MB4^tYpKZ4Fnu^c9-w1Hs{7JSbi#54|YyCc!%d?-9%s+#vXf;9~-M z7(z#|5*9nlZX`>K`s0Bik<7|)ovuQVgn}dyRJC}3c2lK-3KLX~D217@E2#-h{F7o= z%#>qJR-t9dXVT`@N=*HolsP43POF*InFZ6?>#fX|>8$KWoYN_(bEy)`x-KO!d2XF~ p^!SHz!G?!7TuLpy%*y6unK{4fotJQ!S0s6}?U+k44~z`U{{=NXzZ(Dm diff --git a/backend/main.py b/backend/main.py index 99fee42..db939f9 100644 --- a/backend/main.py +++ b/backend/main.py @@ -183,6 +183,7 @@ app = FastAPI( # Allow CORS from frontend domains allowed_origins = [ "http://localhost:5173", + "http://localhost:5174", "http://localhost:3000", "https://my-recipes.dvirlabs.com", "http://my-recipes.dvirlabs.com", @@ -192,9 +193,8 @@ app.add_middleware( CORSMiddleware, allow_origins=allowed_origins, allow_credentials=True, - allow_methods=["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allow_methods=["*"], allow_headers=["*"], - max_age=0, # Disable CORS preflight caching ) @@ -551,12 +551,6 @@ def delete_grocery_list_endpoint(list_id: int, current_user: dict = Depends(get_ return -@app.options("/grocery-lists/{list_id}/pin") -async def options_pin_grocery_list(list_id: int): - """Handle CORS preflight for pin endpoint""" - return Response(status_code=200) - - @app.patch("/grocery-lists/{list_id}/pin", response_model=GroceryList) def toggle_pin_grocery_list_endpoint(list_id: int, current_user: dict = Depends(get_current_user)): """Toggle pin status for a grocery list (owner only)""" diff --git a/frontend/src/App.css b/frontend/src/App.css index 6040486..9bea9c0 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -124,6 +124,18 @@ body { } } +.content-wrapper { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 1.4rem; +} + +@media (min-width: 960px) { + .content-wrapper { + display: contents; + } +} + .sidebar, .content { display: flex; diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 5d890ee..cb69b6a 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -373,45 +373,27 @@ function App() { )} -
- -
+
+
+ {error &&
{error}
} -
- {error &&
{error}
} - - {/* Random Recipe Suggester - Top Left */} -
-

חיפוש מתכון רנדומלי

-
-
- - -
+ {/* Random Recipe Suggester - Top Left */} +
+

חיפוש מתכון רנדומלי

+
+
+ + +
@@ -452,6 +434,26 @@ function App() { currentUser={user} />
+ +
+ +
+
)} diff --git a/frontend/src/components/NotificationBell.jsx b/frontend/src/components/NotificationBell.jsx index 7ab893f..493f164 100644 --- a/frontend/src/components/NotificationBell.jsx +++ b/frontend/src/components/NotificationBell.jsx @@ -221,13 +221,15 @@ function NotificationBell({ onShowToast }) { width: 420px; max-height: 550px; background: var(--panel-bg); + backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 16px; - box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); + box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; + opacity: 0.98; } .notification-header { diff --git a/frontend/src/components/PinnedGroceryLists.jsx b/frontend/src/components/PinnedGroceryLists.jsx index 9ca5c29..c6abf14 100644 --- a/frontend/src/components/PinnedGroceryLists.jsx +++ b/frontend/src/components/PinnedGroceryLists.jsx @@ -55,7 +55,7 @@ function PinnedGroceryLists({ onShowToast }) {

{list.name}

    {list.items.length === 0 ? ( -
  • רשימה ריקה
  • +
  • הרשימה ריקה
  • ) : ( list.items.map((item, index) => { const isChecked = item.startsWith("✓ "); diff --git a/frontend/src/groceryApi.js b/frontend/src/groceryApi.js index 585ed67..4fbcad5 100644 --- a/frontend/src/groceryApi.js +++ b/frontend/src/groceryApi.js @@ -71,10 +71,7 @@ export const deleteGroceryList = async (id) => { export const togglePinGroceryList = async (id) => { const res = await fetch(`${API_URL}/grocery-lists/${id}/pin`, { method: "PATCH", - headers: { - ...getAuthHeaders(), - "Content-Type": "application/json", - }, + headers: getAuthHeaders(), }); if (!res.ok) { let errorMessage = "Failed to toggle pin status";