This commit is contained in:
MuslemRahimi 2025-03-09 17:53:18 +01:00
parent 3c5e7f3879
commit bc3a6221a6
21 changed files with 151 additions and 210 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import veryGoodEmoji from "$lib/assets/veryGoodEmoji.svg";
import goodEmoji from "$lib/assets/goodEmoji.svg";
@ -40,16 +41,14 @@
async function sendFeedback() {
if (inputValue?.length === 0) {
toast.error("Please enter your feedback", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
if (rating?.length === 0 && category === "general") {
toast.error("Please select an emoji", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -75,8 +74,7 @@
});
toast.success("Thank you for your feedback", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
rating = "";

View File

@ -1,6 +1,7 @@
<script lang="ts">
import { enhance } from "$app/forms";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import Input from "$lib/components/Input.svelte";
import { screenWidth } from "$lib/store";
@ -20,22 +21,19 @@
case "redirect":
isClicked = true;
toast.success("Login successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:
@ -67,22 +65,19 @@
case "redirect":
isClicked = true;
toast.success("Registration successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { openPriceAlert, newPriceAlertData } from "$lib/store";
@ -19,8 +20,7 @@
// Validate input locally.
if (targetPrice < 0) {
toast.error("Target Price must be above zero", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -61,8 +61,7 @@
loading: "Creating price alert...",
success: "Successfully created price alert",
error: (err) => err.message || "Failed to create price alert",
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
// Await the promise and handle the result.

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let url;
@ -14,8 +15,7 @@
.catch((error) => console.log("Error sharing content:", error));
} else {
toast?.error("Sharing is not supported by your device", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}

View File

@ -5,6 +5,7 @@
import VirtualList from "svelte-tiny-virtual-list";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let data;
export let optionsWatchlist;
@ -94,8 +95,7 @@
}
} else {
toast.error("Only for Pro Members", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}

View File

@ -13,6 +13,7 @@
import DownloadData from "$lib/components/DownloadData.svelte";
import { page } from "$app/stores";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let data;
export let rawData;
@ -269,8 +270,7 @@
saveRules();
} else {
toast.error("Only for Pro Members", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}

View File

@ -5,6 +5,7 @@
import { cn, sectorList } from "$lib/utils";
import { onMount, onDestroy } from "svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { DateFormatter, type DateValue } from "@internationalized/date";
import * as DropdownMenu from "$lib/components/shadcn/dropdown-menu/index.js";
@ -163,8 +164,7 @@
function handleAddRule() {
if (ruleName === "") {
toast.error("Please select a rule", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -440,8 +440,7 @@
}
} else {
toast.error(`Market is closed`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -770,8 +769,7 @@
<input
on:click={() =>
toast.info("Feature is coming soon 🔥", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
})}
type="checkbox"
checked={mode}
@ -854,8 +852,7 @@
<Button
on:click={() =>
toast.info("Feature is coming soon 🔥", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
})}
class={cn(
"w-full sm:w-[160px] truncate sm:mr-3 py-3 bg-[#000] sm:hover:bg-[#000] sm:hover:text-white text-white justify-center sm:justify-start text-center sm:text-left font-normal border-none rounded-md",

View File

@ -22,6 +22,7 @@
import { onMount, onDestroy, afterUpdate } from "svelte";
import { page } from "$app/stores";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { convertTimestamp } from "$lib/utils";
import PriceAlert from "$lib/components/PriceAlert.svelte";
@ -58,8 +59,7 @@
?.catch((error) => console.log("Error sharing content:", error));
} else {
toast.error("Sharing is not supported by your device", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -107,8 +107,7 @@
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}

View File

@ -5,6 +5,7 @@
import { setCache, getCache } from "$lib/store";
import { onDestroy, onMount } from "svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let data;
let isLoaded = false;
@ -65,8 +66,7 @@
} catch (error) {
console.error("Error loading heatmap:", error);
toast.error("Failed to load heatmap. Please try again.", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} finally {
isLoading = false;
@ -117,8 +117,7 @@
loading: "Downloading heatmap...",
success: "Heatmap downloaded!",
error: "Download failed. Try again.",
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
},
);
}

View File

@ -22,6 +22,7 @@
import { onMount, onDestroy, afterUpdate } from "svelte";
import { page } from "$app/stores";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { convertTimestamp } from "$lib/utils";
import PriceAlert from "$lib/components/PriceAlert.svelte";
@ -61,8 +62,7 @@
?.catch((error) => console.log("Error sharing content:", error));
} else {
toast.error("Sharing is not supported by your device", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -107,8 +107,7 @@
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}

View File

@ -2,6 +2,7 @@
import { enhance } from "$app/forms";
import Input from "$lib/components/Input.svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import SEO from "$lib/components/SEO.svelte";
export let form;
@ -17,16 +18,14 @@
case "success":
if (form?.notVerified) {
toast.error("Please verify your email first", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
} else form?.notVerified === false;
{
toast.success("Login successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px; ",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
@ -34,22 +33,19 @@
case "redirect":
isClicked = true;
toast.success("Login successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:

View File

@ -5,6 +5,7 @@
import { cn } from "$lib/utils";
import { onMount, onDestroy } from "svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { DateFormatter, type DateValue } from "@internationalized/date";
import * as DropdownMenu from "$lib/components/shadcn/dropdown-menu/index.js";
@ -230,8 +231,7 @@
function handleAddRule() {
if (ruleName === "") {
toast.error("Please select a rule", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -512,8 +512,7 @@
}
} else {
toast.error(`Market is closed`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -780,8 +779,7 @@
}
} else {
toast.error("Only for Pro Members", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
};

View File

@ -9,6 +9,7 @@
} from "$lib/utils";
//import { enhance } from '$app/forms';
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { goto } from "$app/navigation";
import { screenWidth, newPriceAlertData } from "$lib/store";
@ -84,13 +85,11 @@
async function handleDeleteTickers() {
if (numberOfChecked === 0) {
toast.error(`You need to select symbols before you can delete them`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} else {
toast.success(`Price alerts deleted successfully`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
const symbolsToDelete = priceAlertList

View File

@ -1,6 +1,7 @@
<script lang="ts">
import SEO from "$lib/components/SEO.svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { enhance } from "$app/forms";
import { isPWAInstalled } from "$lib/utils";
@ -23,7 +24,7 @@
let isPushSubscribed = data?.getPushSubscriptionData !== null ? true : false;
let notificationChannels = data?.getNotificationChannels;
const mode = Object?.entries(notificationChannels)
const modeStatus = Object?.entries(notificationChannels)
.filter(([key, value]) => typeof value === "boolean") // Filter boolean properties
.reduce((acc, [key, value]) => {
acc[key] = value; // Add to mode object
@ -39,29 +40,25 @@
switch (result.type) {
case "success":
toast.success("Subscription Cancelled successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "redirect":
toast.success("Subscription Cancelled successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Something went wrong.", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:
@ -85,29 +82,25 @@
switch (result.type) {
case "success":
toast.success("Subscription Reactivate successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "redirect":
toast.success("Subscription Reactivate successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Something went wrong.", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:
@ -141,8 +134,7 @@
unsubscribe();
isPushSubscribed = false;
toast.success("Push notification deactivated successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
@ -152,13 +144,11 @@
if (output?.success === true) {
isPushSubscribed = true;
toast.success("Push notification activated successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} else {
toast.error("Your browser does not support push notifications...", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
loading = false;
@ -167,7 +157,7 @@
async function updateNotificationChannels() {
const postData = {
id: notificationChannels?.id,
...mode,
...modeStatus,
};
const response = await fetch("/api/update-notification-channels", {
@ -180,7 +170,7 @@
}
async function toggleMode(state) {
mode[state] = !mode[state];
modeStatus[state] = !modeStatus[state];
await updateNotificationChannels();
}
</script>
@ -191,12 +181,12 @@
/>
<section
class="w-full max-w-3xl sm:max-w-[1400px] overflow-hidden min-h-screen pb-20 pt-5 px-4 lg:px-3"
class="text-muted dark:text-white w-full max-w-3xl sm:max-w-[1400px] overflow-hidden min-h-screen pb-20 pt-5 px-4 lg:px-3"
>
<div class="text-sm sm:text-[1rem] breadcrumbs">
<ul>
<li><a href="/" class="text-gray-300">Home</a></li>
<li class="text-gray-300">My Account</li>
<li><a href="/" class="text-muted dark:text-gray-300">Home</a></li>
<li class="text-muted dark:text-gray-300">My Account</li>
</ul>
</div>
@ -207,17 +197,13 @@
>
<main class="w-full lg:w-3/4 lg:mr-auto">
<div class="mb-6 border-b-[2px]">
<h1 class="mb-1 text-white text-2xl sm:text-3xl font-bold">
My Account
</h1>
<h1 class="mb-1 text-2xl sm:text-3xl font-bold">My Account</h1>
</div>
<div
class="rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg text-white"
class="rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg"
>
<h2 class="text-white text-2xl font-semibold mb-3">
User Information
</h2>
<h2 class=" text-2xl font-semibold mb-3">User Information</h2>
<div class="mt-1">
<strong>Email:</strong>
{data?.user?.email}
@ -230,15 +216,17 @@
year: "numeric",
})}
</div>
<a href="/update-password" class="sm:hover:text-white text-blue-400"
<a
href="/update-password"
class="sm:hover:text-muted dark:sm:hover:text-white text-blue-500 dark:text-blue-400"
>Update Password</a
>
</div>
<div
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg text-white"
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg"
>
<h2 class="text-white text-2xl font-semibold mb-3">Notification</h2>
<h2 class=" text-2xl font-semibold mb-3">Notification</h2>
Customize your notification alerts based on your preferences.
<div class="flex flex-col items-start w-full mt-4 mb-4">
@ -246,7 +234,7 @@
<div class="flex flex-row items-center">
<label
for="earningsSurpriseInfo"
class=" cursor-pointer flex flex-row items-center text-white"
class=" cursor-pointer flex flex-row items-center"
>
<h4>Earnings Surprise</h4>
</label>
@ -260,12 +248,12 @@
<input
on:click={() => toggleMode("earningsSurprise")}
type="checkbox"
checked={mode["earningsSurprise"]}
value={mode["earningsSurprise"]}
checked={modeStatus["earningsSurprise"]}
value={modeStatus["earningsSurprise"]}
class="sr-only peer"
/>
<div
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-purple-500"
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-[#1C64F2]"
></div>
</label>
</div>
@ -275,7 +263,7 @@
<div class="flex flex-row items-center">
<label
for="whyPriceMovedInfo"
class=" cursor-pointer flex flex-row items-center text-white"
class=" cursor-pointer flex flex-row items-center"
>
<h4>Why Price Moved</h4>
</label>
@ -289,12 +277,12 @@
<input
on:click={() => toggleMode("wiim")}
type="checkbox"
checked={mode["wiim"]}
value={mode["wiim"]}
checked={modeStatus["wiim"]}
value={modeStatus["wiim"]}
class="sr-only peer"
/>
<div
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-purple-500"
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-[#1C64F2]"
></div>
</label>
</div>
@ -304,7 +292,7 @@
<div class="flex flex-row items-center">
<label
for="topAnalystInfo"
class=" cursor-pointer flex flex-row items-center text-white"
class=" cursor-pointer flex flex-row items-center"
>
<h4>Top Analyst Rating</h4>
</label>
@ -318,20 +306,18 @@
<input
on:click={() => toggleMode("topAnalyst")}
type="checkbox"
checked={mode["topAnalyst"]}
value={mode["topAnalyst"]}
checked={modeStatus["topAnalyst"]}
value={modeStatus["topAnalyst"]}
class="sr-only peer"
/>
<div
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-purple-500"
class="w-10 h-5 bg-gray-600 rounded-full peer-checked:after:translate-x-4 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[0.25rem] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-[#1C64F2]"
></div>
</label>
</div>
</div>
<h3 class="text-white text-xl font-semibold mb-2 mt-4">
Push Notification
</h3>
<h3 class=" text-xl font-semibold mb-2 mt-4">Push Notification</h3>
{#if pwaInstalled}
<div class="mt-3">
{#if nottifPermGranted === null}
@ -394,13 +380,11 @@
</div>
<div
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg text-white"
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg"
>
<h2 class="text-white text-2xl font-semibold mb-3">
Manage Subscription
</h2>
<h2 class=" text-2xl font-semibold mb-3">Manage Subscription</h2>
<div class="flex flex-row items-center">
<span class="text-white text-[1rem] sm:text-lg"> Status: </span>
<span class=" text-[1rem] sm:text-lg"> Status: </span>
<div class="ml-2 flex flex-row items-center">
<span class="relative flex h-2 w-2">
<span
@ -422,7 +406,7 @@
></span>
</span>
<span class="ml-2 text-[1rem] text-slate-200">
<span class="ml-2 text-[1rem] dark:text-slate-200">
{#if data?.user?.freeTrial === true}
Active
{:else}
@ -433,7 +417,7 @@
</div>
</div>
{#if subscriptionData?.status_formatted === "Active"}
<span class="text-white text-sm pr-5">
<span class=" text-sm pr-5">
Your subscription will automatically renew on {new Date(
subscriptionData?.renews_at,
)?.toLocaleDateString("en-GB", {
@ -443,7 +427,7 @@
})}
</span>
{:else if subscriptionData?.status_formatted === "Cancelled"}
<span class="text-white text-sm">
<span class=" text-sm">
Your subscription will remain active until {new Date(
subscriptionData?.ends_at,
)?.toLocaleDateString("en-GB", {
@ -454,7 +438,7 @@
</span>
{/if}
<div class="flex flex-col justify-start items-start mt-4 mb-4">
<span class="text-white mr-2 text-lg"> Current Plan: </span>
<span class=" mr-2 text-lg"> Current Plan: </span>
<span class="text-[1rem]">
{#if subscriptionData?.first_order_item?.product_name === "Pro Subscription (Life Time Access)"}
Lifetime Access
@ -476,7 +460,7 @@
>
<label
for="cancelSubscriptionModal"
class="cursor-pointer text-white border border-gray-600 sm:hover:bg-primary bg-opacity-[0.5] text-sm sm:text-[1rem] px-4 py-2 rounded mt-5"
class="cursor-pointer border border-gray-600 sm:hover:bg-primary bg-opacity-[0.5] text-sm sm:text-[1rem] px-4 py-2 rounded mt-5"
>
Cancel Subscription
</label>
@ -489,20 +473,23 @@
Reactivate Subscription
</label>
{:else if subscriptionData?.status_formatted === "Paid" && !subscriptionData?.first_order_item?.product_name === "Pro Subscription (Life Time Access)"}
<span class="text-white mt-5">
<span class=" mt-5">
Please wait a moment; you will be updated to Pro in a second.
</span>
{:else if subscriptionData?.first_order_item?.product_name?.includes("Life Time")}{:else}
<a href="/pricing" class="sm:hover:text-white text-blue-400">
<a
href="/pricing"
class="sm:hover:text-muted dark:sm:hover:text-white text-blue-500 dark:text-blue-400"
>
Get Full Access with Pro Subscription.
</a>
{/if}
</div>
<div
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg text-white"
class="mt-6 rounded border border-gray-600 p-4 text-base xs:p-4 xs:text-lg"
>
<h2 class="text-white text-2xl font-semibold mb-3">Need help?</h2>
<h2 class=" text-2xl font-semibold mb-3">Need help?</h2>
<div class="mt-1">
<strong>Here's how to get support:</strong>
</div>
@ -511,7 +498,7 @@
<li>
Send an email to <a
href={`mailto:${emailAddress}`}
class="text-blue-400 hover:text-white hover:underline"
class="sm:hover:text-muted dark:sm:hover:text-white text-blue-500 dark:text-blue-400"
>{emailAddress}</a
>
</li>
@ -521,7 +508,7 @@
rel="noopener noreferrer"
target="_blank"
href="https://www.reddit.com/r/stocknear/"
class="text-blue-400"
class="sm:hover:text-muted dark:sm:hover:text-white text-blue-500 dark:text-blue-400"
>
r/stocknear</a
>.
@ -531,7 +518,8 @@
rel="noopener noreferrer"
target="_blank"
href="https://discord.com/invite/hCwZMMZ2MT"
class="text-blue-400">Discord Channel</a
class="sm:hover:text-muted dark:sm:hover:text-white text-blue-500 dark:text-blue-400"
>Discord Channel</a
>.
</li>
</ul>
@ -560,9 +548,9 @@
class="modal-box w-full bg-secondary flex flex-col items-center"
>
<div class="mx-auto mb-8 h-1.5 w-20 shrink-0 rounded-full bg-gray-500" />
<div class="text-white mb-5 text-center">
<div class=" mb-5 text-center">
<h3 class="font-bold text-2xl mb-5">Are you sure?</h3>
<span class="text-white text-[1rem] font-normal">
<span class=" text-[1rem] font-normal">
You will no longer be charged for this subscription, and at the end of
the billing period, your account will transfer to the Free Plan.
</span>
@ -615,9 +603,9 @@
class="modal-box w-full bg-secondary flex flex-col items-center"
>
<div class="mx-auto mb-8 h-1.5 w-20 shrink-0 rounded-full bg-gray-500" />
<div class="text-white mb-5 text-center">
<div class=" mb-5 text-center">
<h3 class="font-bold text-2xl mb-5">Reactivate Subscription</h3>
<span class="text-white text-[1rem] font-normal">
<span class=" text-[1rem] font-normal">
Reactivate your Pro Subscription now to unlock unlimited features and
gain the edge over the competition.
</span>
@ -662,9 +650,9 @@
<!-- Desktop modal content -->
<div class="modal-box w-full bg-secondary flex flex-col items-center">
<div class="mx-auto mb-8 h-1.5 w-20 shrink-0 rounded-full bg-gray-500" />
<div class="text-white mb-5 text-center">
<div class=" mb-5 text-center">
<h3 class="font-bold text-2xl mb-5">Paypal not supported</h3>
<span class="text-white text-[1rem] font-normal">
<span class=" text-[1rem] font-normal">
Apologies, our payment provider currently only supports credit cards for
changing plans from monthly to annual. We are working to expand this to
other payment methods.
@ -689,12 +677,10 @@
<div class="modal-box rounded w-full bg-secondary border border-gray-600">
<div class="flex flex-row items-center pt-5">
<h4 class="text-white text-2xl font-bold text-center m-auto">
Steps to install
</h4>
<h4 class=" text-2xl font-bold text-center m-auto">Steps to install</h4>
<label
for="installModal"
class="inline-block cursor-pointer absolute right-3 top-3 text-[1.3rem] sm:text-[1.8rem] text-white"
class="inline-block cursor-pointer absolute right-3 top-3 text-[1.3rem] sm:text-[1.8rem]"
>
<svg
class="w-6 h-6 sm:w-8 sm:h-8"
@ -708,9 +694,7 @@
</label>
</div>
<div
class="text-white flex flex-col justify-center items-center text-xl h-full"
>
<div class=" flex flex-col justify-center items-center text-xl h-full">
<ul class="list-decimal list-inside text-left mt-5">
<li class="mb-2">Tap on the Safari share button.</li>
<li class="mb-2">Tap on "Add to Home Screen."</li>
@ -725,7 +709,7 @@
<div class="border-t border-gray-600 mt-2">
<label
for="installModal"
class="mt-4 font-semibold text-white text-xl m-auto flex justify-center"
class="mt-4 font-semibold text-xl m-auto flex justify-center"
>
Close
</label>

View File

@ -3,6 +3,7 @@
import Input from "$lib/components/Input.svelte";
import SEO from "$lib/components/SEO.svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let form;
@ -18,22 +19,19 @@
case "redirect":
isClicked = true;
toast.success("Registration successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { enhance } from "$app/forms";
import SEO from "$lib/components/SEO.svelte";
@ -14,30 +15,26 @@
switch (result.type) {
case "success":
toast.success("Password resetted. Check your emails!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "redirect":
isClicked = true;
toast.success("Password resetted. Check your emails!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "failure":
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
await update();
break;
case "error":
toast.error(result.error.message, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
break;
default:

View File

@ -3,6 +3,7 @@
import { goto } from "$app/navigation";
import { clearCache, screenWidth, getCache, setCache } from "$lib/store";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import {
abbreviateNumber,
@ -1494,8 +1495,7 @@
if (output === "success") {
toast.success("Strategy deleted successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
strategyList =
@ -1532,8 +1532,7 @@
);
} else if (output === "failure") {
toast.error("Something went wrong. Please try again", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -1549,16 +1548,14 @@
if (!title || title.length === 0) {
toast.error("Title cannot be empty!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
if (title?.length > 100) {
toast.error("Title is too long. Keep it simple and concise bruv!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -1581,8 +1578,7 @@
const output = await response?.json();
if (output?.id && output?.id?.length !== 0) {
toast.success("Strategy created successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
const closePopup = document.getElementById("addStrategy");
@ -1595,8 +1591,7 @@
selectedPopularStrategy = "";
} else {
toast.error("Something went wrong. Please try again later!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
@ -1711,8 +1706,7 @@
function handleAddRule() {
if (ruleName === "") {
toast.error("Please select a rule", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -1926,8 +1920,7 @@ const handleKeyDown = (event) => {
if (printToast === true) {
toast.success("Strategy saved!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}

View File

@ -23,6 +23,7 @@
import { onMount, onDestroy, afterUpdate } from "svelte";
import { page } from "$app/stores";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { convertTimestamp } from "$lib/utils";
import AIScore from "$lib/components/AIScore.svelte";
@ -63,8 +64,7 @@
?.catch((error) => console.log("Error sharing content:", error));
} else {
toast.error("Sharing is not supported by your device", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -118,8 +118,7 @@
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}

View File

@ -1,6 +1,7 @@
<script lang="ts">
import { enhance } from "$app/forms";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import Input from "$lib/components/Input.svelte";
import SEO from "$lib/components/SEO.svelte";
@ -17,8 +18,7 @@
});
} else if (result.error || result.errors) {
toast.error("Invalid credentials", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
await update();

View File

@ -4,6 +4,7 @@
import SEO from "$lib/components/SEO.svelte";
import { onMount } from "svelte";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
export let data;
let editMode = false;
@ -89,13 +90,11 @@
async function handleDelete() {
if (numberOfChecked === 0) {
toast.error(`You need to select symbols before you can delete them`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} else if (data?.getOptionsWatchlist?.id?.length === 0) {
toast.error(`You need to select symbols before you can delete them`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} else {
optionsWatchlist = optionsWatchlist?.filter(

View File

@ -10,6 +10,7 @@
removeCompanyStrings,
} from "$lib/utils";
import { toast } from "svelte-sonner";
import { mode } from "mode-watcher";
import { onMount, onDestroy, afterUpdate } from "svelte";
import Input from "$lib/components/Input.svelte";
@ -298,16 +299,14 @@
// Validate the title input
if (!title || title.toString().trim().length === 0) {
toast.error("Title cannot be empty!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
if (title.toString().length > 100) {
toast.error("Title is too long. Keep it simple and concise bruv!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
return;
}
@ -394,8 +393,7 @@
if (output === "success") {
toast.success("Watchlist deleted successfully!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
allList = allList?.filter((item) => item?.id !== displayWatchList?.id);
@ -408,15 +406,13 @@
clicked.dispatchEvent(new MouseEvent("click"));
} else {
toast.error("Something went wrong. Please try again!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
} catch (error) {
console.error("Error:", error);
toast.error("An error occurred. Please try again later.", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}
@ -447,8 +443,7 @@
async function handleDeleteTickers() {
if (numberOfChecked === 0) {
toast.error(`You need to select symbols before you can delete them`, {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
} else {
watchList = watchList?.filter(
@ -514,8 +509,7 @@
// Check if the ticker is already in the watchlist.
if (watchList?.some((item) => item?.symbol === ticker)) {
toast.error("This symbol is already in your watchlist", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
inputValue = "";
return;
@ -551,8 +545,7 @@
loading: "Updating watchlist...",
success: "Watchlist updated successfully!",
error: (err) => err.message || "Failed to update watchlist",
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
try {
@ -612,8 +605,7 @@
saveRules();
} else {
toast.error("Only for Plus & Pro Members", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
style: `border-radius: 5px; background: #fff; color: #000; border-color: ${$mode === "light" ? "#F9FAFB" : "#4B5563"}; font-size: 15px;`,
});
}
}