diff --git a/src/lib/components/AddPortfolio.svelte b/src/lib/components/AddPortfolio.svelte index e7783abe..7c1da5d3 100644 --- a/src/lib/components/AddPortfolio.svelte +++ b/src/lib/components/AddPortfolio.svelte @@ -31,7 +31,7 @@ if (output?.message === "success") { isClicked = true; toast.success("Portfolio created successfully!", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); setTimeout(() => { @@ -58,7 +58,7 @@ }, 500); } else { toast.error("Something went wrong. Please try again.", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); } } diff --git a/src/lib/components/Feedback.svelte b/src/lib/components/Feedback.svelte index 7ff194a8..38e6132d 100644 --- a/src/lib/components/Feedback.svelte +++ b/src/lib/components/Feedback.svelte @@ -39,14 +39,14 @@ async function sendFeedback() { if (inputValue?.length === 0) { toast.error("Please enter your feedback", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); return; } if (rating?.length === 0 && category === "general") { toast.error("Please select an emoji", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); return; } @@ -72,7 +72,7 @@ }); toast.success("Thank you for your feedback", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); rating = ""; diff --git a/src/lib/components/LoginPopup.svelte b/src/lib/components/LoginPopup.svelte index df3c566f..580725a2 100644 --- a/src/lib/components/LoginPopup.svelte +++ b/src/lib/components/LoginPopup.svelte @@ -19,19 +19,19 @@ case "redirect": isClicked = true; toast.success("Login successfully!", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); await update(); break; case "failure": toast.error("Invalid credentials", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); await update(); break; case "error": toast.error(result.error.message, { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); break; default: @@ -63,19 +63,19 @@ case "redirect": isClicked = true; toast.success("Registration successfully!", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); await update(); break; case "failure": toast.error("Invalid credentials", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); await update(); break; case "error": toast.error(result.error.message, { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); break; default: diff --git a/src/lib/components/MobileCommentEditor.svelte b/src/lib/components/MobileCommentEditor.svelte index b8516154..4bea3a42 100644 --- a/src/lib/components/MobileCommentEditor.svelte +++ b/src/lib/components/MobileCommentEditor.svelte @@ -88,7 +88,7 @@ if (output === "success") { toast.success("Commented successfully", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); $commentAdded = newComment; @@ -100,7 +100,7 @@ handleCancel(); } else { toast.error("Something went wrong. Please try again...", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); } } diff --git a/src/lib/components/PriceAlert.svelte b/src/lib/components/PriceAlert.svelte index 42e8cb98..2bde36bc 100644 --- a/src/lib/components/PriceAlert.svelte +++ b/src/lib/components/PriceAlert.svelte @@ -18,7 +18,7 @@ if (targetPrice < 0) { toast.error(`Target Price must be above zero`, { style: - "border-radius: 10px; background: #333; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);", + "border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);", }); } else { const closePopup = document.getElementById("priceAlertModal"); @@ -49,12 +49,30 @@ toast.success(`Successfully created price alert`, { style: - "border-radius: 10px; background: #333; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);", + "border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);", }); targetPrice = currentPrice; } } + async function stepSizeValue(condition) { + let step = 0.01; + if (targetPrice <= 2) { + step = 0.01; + } else if (targetPrice <= 5) { + step = 0.1; + } else if (targetPrice <= 100) { + step = 0.5; + } else if (targetPrice <= 200) { + step = 1; + } + + targetPrice += condition === "add" ? step : -step; + + // Round to 2 decimal places + targetPrice = parseFloat(targetPrice.toFixed(2)); + } + $: { if ($openPriceAlert === true) { $openPriceAlert = false; @@ -151,44 +169,80 @@
- +
+ +
+ + +
+
- - {#if !isNaN(targetPrice) && targetPrice !== undefined && targetPrice !== null} -
- + +

+ Your price alert will notify you when the stock price is {condition} + {targetPrice?.toFixed(2)}. +

+
+ {/if} + + +
+ +
- {/if} - - -
- -
- - + + diff --git a/src/lib/components/Share.svelte b/src/lib/components/Share.svelte index 06bb5002..44a1f9e9 100644 --- a/src/lib/components/Share.svelte +++ b/src/lib/components/Share.svelte @@ -1,41 +1,38 @@ + - - \ No newline at end of file + diff --git a/src/lib/components/Table/OptionsFlowTable.svelte b/src/lib/components/Table/OptionsFlowTable.svelte index 2b11f29b..95b98a1d 100644 --- a/src/lib/components/Table/OptionsFlowTable.svelte +++ b/src/lib/components/Table/OptionsFlowTable.svelte @@ -94,7 +94,7 @@ } } else { toast.error("Only for Pro Members", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); } } diff --git a/src/lib/components/Table/Table.svelte b/src/lib/components/Table/Table.svelte index cf0b7815..3a8b5ed8 100644 --- a/src/lib/components/Table/Table.svelte +++ b/src/lib/components/Table/Table.svelte @@ -251,7 +251,7 @@ saveRules(); } else { toast.error("Only for Pro Members", { - style: "border-radius: 200px; background: #333; color: #fff;", + style: "border-radius: 200px; background: #2A2E39; color: #fff;", }); } } diff --git a/src/routes/crypto/[tickerID]/+layout.svelte b/src/routes/crypto/[tickerID]/+layout.svelte index 2973d1e7..ae881cbe 100644 --- a/src/routes/crypto/[tickerID]/+layout.svelte +++ b/src/routes/crypto/[tickerID]/+layout.svelte @@ -54,7 +54,7 @@ .catch((error) => console.log("Error sharing content:", error)); } else { toast.error("Sharing is not supported by your device", { - style: "background: #333; color: #fff;", + style: "background: #2A2E39; color: #fff;", }); } } diff --git a/src/routes/etf/[tickerID]/+layout.svelte b/src/routes/etf/[tickerID]/+layout.svelte index 8bc5e71c..3f5e3093 100644 --- a/src/routes/etf/[tickerID]/+layout.svelte +++ b/src/routes/etf/[tickerID]/+layout.svelte @@ -53,7 +53,7 @@ .catch((error) => console.log("Error sharing content:", error)); } else { toast.error("Sharing is not supported by your device", { - style: "background: #333; color: #fff;", + style: "background: #2A2E39; color: #fff;", }); } } @@ -752,7 +752,7 @@ -