ui fixes
This commit is contained in:
parent
439474c2f9
commit
f9064c9519
@ -39,14 +39,16 @@
|
|||||||
async function sendFeedback() {
|
async function sendFeedback() {
|
||||||
if (inputValue?.length === 0) {
|
if (inputValue?.length === 0) {
|
||||||
toast.error("Please enter your feedback", {
|
toast.error("Please enter your feedback", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rating?.length === 0 && category === "general") {
|
if (rating?.length === 0 && category === "general") {
|
||||||
toast.error("Please select an emoji", {
|
toast.error("Please select an emoji", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -72,7 +74,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
toast.success("Thank you for your feedback", {
|
toast.success("Thank you for your feedback", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
rating = "";
|
rating = "";
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
if (targetPrice < 0) {
|
if (targetPrice < 0) {
|
||||||
toast.error(`Target Price must be above zero`, {
|
toast.error(`Target Price must be above zero`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const closePopup = document.getElementById("priceAlertModal");
|
const closePopup = document.getElementById("priceAlertModal");
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
toast.success(`Successfully created price alert`, {
|
toast.success(`Successfully created price alert`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
targetPrice = currentPrice;
|
targetPrice = currentPrice;
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@
|
|||||||
>
|
>
|
||||||
<p class="text-sm sm:text-[1rem]">
|
<p class="text-sm sm:text-[1rem]">
|
||||||
Your price alert will notify you when the stock price is {condition}
|
Your price alert will notify you when the stock price is {condition}
|
||||||
{targetPrice?.toFixed(2)}.
|
{targetPrice}.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@ -85,7 +85,7 @@
|
|||||||
if (numberOfChecked === 0) {
|
if (numberOfChecked === 0) {
|
||||||
toast.error(`You need to select symbols before you can delete them`, {
|
toast.error(`You need to select symbols before you can delete them`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const postData = {
|
const postData = {
|
||||||
|
|||||||
@ -1507,7 +1507,8 @@
|
|||||||
|
|
||||||
if (output === "success") {
|
if (output === "success") {
|
||||||
toast.success("Strategy deleted successfully!", {
|
toast.success("Strategy deleted successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
strategyList =
|
strategyList =
|
||||||
@ -1544,7 +1545,8 @@
|
|||||||
);
|
);
|
||||||
} else if (output === "failure") {
|
} else if (output === "failure") {
|
||||||
toast.error("Something went wrong. Please try again", {
|
toast.error("Something went wrong. Please try again", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1560,14 +1562,16 @@
|
|||||||
|
|
||||||
if (!title || title.length === 0) {
|
if (!title || title.length === 0) {
|
||||||
toast.error("Title cannot be empty!", {
|
toast.error("Title cannot be empty!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title?.length > 100) {
|
if (title?.length > 100) {
|
||||||
toast.error("Title is too long. Keep it simple and concise bruv!", {
|
toast.error("Title is too long. Keep it simple and concise bruv!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1590,7 +1594,8 @@
|
|||||||
const output = await response?.json();
|
const output = await response?.json();
|
||||||
if (output?.id && output?.id?.length !== 0) {
|
if (output?.id && output?.id?.length !== 0) {
|
||||||
toast.success("Strategy created successfully!", {
|
toast.success("Strategy created successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
const closePopup = document.getElementById("addStrategy");
|
const closePopup = document.getElementById("addStrategy");
|
||||||
@ -1603,7 +1608,8 @@
|
|||||||
selectedPopularStrategy = "";
|
selectedPopularStrategy = "";
|
||||||
} else {
|
} else {
|
||||||
toast.error("Something went wrong. Please try again later!", {
|
toast.error("Something went wrong. Please try again later!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1718,7 +1724,8 @@
|
|||||||
function handleAddRule() {
|
function handleAddRule() {
|
||||||
if (ruleName === "") {
|
if (ruleName === "") {
|
||||||
toast.error("Please select a rule", {
|
toast.error("Please select a rule", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1926,7 +1933,8 @@ const handleKeyDown = (event) => {
|
|||||||
|
|
||||||
if (printToast === true) {
|
if (printToast === true) {
|
||||||
toast.success("Strategy saved!", {
|
toast.success("Strategy saved!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,12 +93,12 @@
|
|||||||
if (numberOfChecked === 0) {
|
if (numberOfChecked === 0) {
|
||||||
toast.error(`You need to select symbols before you can delete them`, {
|
toast.error(`You need to select symbols before you can delete them`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
} else if (data?.getOptionsWatchlist?.id?.length === 0) {
|
} else if (data?.getOptionsWatchlist?.id?.length === 0) {
|
||||||
toast.error(`You need to select symbols before you can delete them`, {
|
toast.error(`You need to select symbols before you can delete them`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
optionsWatchlist = optionsWatchlist?.filter(
|
optionsWatchlist = optionsWatchlist?.filter(
|
||||||
@ -122,6 +122,7 @@
|
|||||||
|
|
||||||
deleteOptionsId = [];
|
deleteOptionsId = [];
|
||||||
numberOfChecked = 0;
|
numberOfChecked = 0;
|
||||||
|
editMode = !editMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -295,14 +295,16 @@
|
|||||||
|
|
||||||
if (!title || title?.length === 0) {
|
if (!title || title?.length === 0) {
|
||||||
toast.error("Title cannot be empty!", {
|
toast.error("Title cannot be empty!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title?.length > 100) {
|
if (title?.length > 100) {
|
||||||
toast.error("Title is too long. Keep it simple and concise bruv!", {
|
toast.error("Title is too long. Keep it simple and concise bruv!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -334,7 +336,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
toast.success("Watchlist created successfully!", {
|
toast.success("Watchlist created successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
const clicked = document.getElementById("addWatchlist");
|
const clicked = document.getElementById("addWatchlist");
|
||||||
@ -344,13 +347,15 @@
|
|||||||
anchor.dispatchEvent(new MouseEvent("click"));
|
anchor.dispatchEvent(new MouseEvent("click"));
|
||||||
} else {
|
} else {
|
||||||
toast.error("Something went wrong. Please try again!", {
|
toast.error("Something went wrong. Please try again!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error:", error);
|
console.error("Error:", error);
|
||||||
toast.error("An error occurred. Please try again later.", {
|
toast.error("An error occurred. Please try again later.", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,7 +387,8 @@
|
|||||||
|
|
||||||
if (output === "success") {
|
if (output === "success") {
|
||||||
toast.success("Watchlist deleted successfully!", {
|
toast.success("Watchlist deleted successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
allList = allList?.filter((item) => item?.id !== displayWatchList?.id);
|
allList = allList?.filter((item) => item?.id !== displayWatchList?.id);
|
||||||
@ -395,13 +401,15 @@
|
|||||||
clicked.dispatchEvent(new MouseEvent("click"));
|
clicked.dispatchEvent(new MouseEvent("click"));
|
||||||
} else {
|
} else {
|
||||||
toast.error("Something went wrong. Please try again!", {
|
toast.error("Something went wrong. Please try again!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error:", error);
|
console.error("Error:", error);
|
||||||
toast.error("An error occurred. Please try again later.", {
|
toast.error("An error occurred. Please try again later.", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -433,7 +441,7 @@
|
|||||||
if (numberOfChecked === 0) {
|
if (numberOfChecked === 0) {
|
||||||
toast.error(`You need to select symbols before you can delete them`, {
|
toast.error(`You need to select symbols before you can delete them`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
watchList = watchList?.filter(
|
watchList = watchList?.filter(
|
||||||
@ -500,7 +508,7 @@
|
|||||||
} else {
|
} else {
|
||||||
toast.error(`This symbol is already in your watchlist`, {
|
toast.error(`This symbol is already in your watchlist`, {
|
||||||
style:
|
style:
|
||||||
"border-radius: 10px; background: #2A2E39; color: #fff; padding: 12px; margin-top: 10px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);",
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
|
|
||||||
inputValue = "";
|
inputValue = "";
|
||||||
@ -574,7 +582,8 @@
|
|||||||
saveRules();
|
saveRules();
|
||||||
} else {
|
} else {
|
||||||
toast.error("Only for Pro Members", {
|
toast.error("Only for Pro Members", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1856,7 +1865,7 @@
|
|||||||
></label>
|
></label>
|
||||||
|
|
||||||
<!-- Desktop modal content -->
|
<!-- Desktop modal content -->
|
||||||
<div class="modal-box w-full bg-[#191919]">
|
<div class="modal-box w-full bg-secondary">
|
||||||
<div class="text-white mb-5">
|
<div class="text-white mb-5">
|
||||||
<h3 class="font-bold text-2xl mb-5">New Watchlist</h3>
|
<h3 class="font-bold text-2xl mb-5">New Watchlist</h3>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user