ui fixes
This commit is contained in:
parent
eb230f9c16
commit
179e92f5dc
@ -372,15 +372,36 @@
|
|||||||
{#if options !== null}
|
{#if options !== null}
|
||||||
<div class="app w-full relative">
|
<div class="app w-full relative">
|
||||||
<div class="flex justify-start space-x-2 absolute right-0 top-0 z-10">
|
<div class="flex justify-start space-x-2 absolute right-0 top-0 z-10">
|
||||||
{#each ["3M", "6M", "1Y"] as item}
|
{#each ["3M", "6M", "1Y"] as item, index}
|
||||||
<label
|
{#if data?.user?.tier === "Pro" || index === 0}
|
||||||
on:click={() => (timePeriod = item)}
|
<label
|
||||||
class="px-3 py-1 text-sm {timePeriod === item
|
on:click={() => (timePeriod = item)}
|
||||||
? 'bg-white text-black '
|
class="px-3 py-1 text-sm {timePeriod === item
|
||||||
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
? 'bg-white text-black '
|
||||||
>
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
{item}
|
>
|
||||||
</label>
|
{item}
|
||||||
|
</label>
|
||||||
|
{:else if data?.user?.tier !== "Pro"}
|
||||||
|
<a
|
||||||
|
href="/pricing"
|
||||||
|
class="px-3 py-1 text-sm flex flex-row items-center {timePeriod ===
|
||||||
|
item
|
||||||
|
? 'bg-white text-black '
|
||||||
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
|
>
|
||||||
|
{item}
|
||||||
|
<svg
|
||||||
|
class="ml-1 -mt-w-3.5 h-3.5 inline-block"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
><path
|
||||||
|
fill="#A3A3A3"
|
||||||
|
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -462,7 +483,7 @@
|
|||||||
>{item?.putCallRatio?.toFixed(2)}</span
|
>{item?.putCallRatio?.toFixed(2)}</span
|
||||||
>
|
>
|
||||||
{:else}
|
{:else}
|
||||||
n/a
|
n/a
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -415,15 +415,36 @@
|
|||||||
{#if options !== null}
|
{#if options !== null}
|
||||||
<div class="app w-full relative">
|
<div class="app w-full relative">
|
||||||
<div class="flex justify-start space-x-2 absolute right-0 top-0 z-10">
|
<div class="flex justify-start space-x-2 absolute right-0 top-0 z-10">
|
||||||
{#each ["3M", "6M", "1Y"] as item}
|
{#each ["3M", "6M", "1Y"] as item, index}
|
||||||
<label
|
{#if data?.user?.tier === "Pro" || index === 0}
|
||||||
on:click={() => (timePeriod = item)}
|
<label
|
||||||
class="px-3 py-1 text-sm {timePeriod === item
|
on:click={() => (timePeriod = item)}
|
||||||
? 'bg-white text-black '
|
class="px-3 py-1 text-sm {timePeriod === item
|
||||||
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
? 'bg-white text-black '
|
||||||
>
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
{item}
|
>
|
||||||
</label>
|
{item}
|
||||||
|
</label>
|
||||||
|
{:else if data?.user?.tier !== "Pro"}
|
||||||
|
<a
|
||||||
|
href="/pricing"
|
||||||
|
class="px-3 py-1 text-sm flex flex-row items-center {timePeriod ===
|
||||||
|
item
|
||||||
|
? 'bg-white text-black '
|
||||||
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
|
>
|
||||||
|
{item}
|
||||||
|
<svg
|
||||||
|
class="ml-1 -mt-w-3.5 h-3.5 inline-block"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
><path
|
||||||
|
fill="#A3A3A3"
|
||||||
|
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
CanvasRenderer,
|
CanvasRenderer,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
export let data;
|
||||||
export let symbol;
|
export let symbol;
|
||||||
export let ratingsList;
|
export let ratingsList;
|
||||||
export let numOfRatings = 0;
|
export let numOfRatings = 0;
|
||||||
@ -57,14 +58,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter the data based on the calculated start date
|
// Filter the data based on the calculated start date
|
||||||
const filteredData = historicalData.filter((item) => {
|
const filteredData = historicalData?.filter((item) => {
|
||||||
const itemDate = new Date(item.time);
|
const itemDate = new Date(item?.time);
|
||||||
return itemDate >= startDate && itemDate <= currentDate;
|
return itemDate >= startDate && itemDate <= currentDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Extract the dates and close values from the filtered data
|
// Extract the dates and close values from the filtered data
|
||||||
const dates = filteredData.map((item) => item.time);
|
const dates = filteredData?.map((item) => item?.time);
|
||||||
const closeValues = filteredData.map((item) => item.close);
|
const closeValues = filteredData?.map((item) => item?.close);
|
||||||
|
|
||||||
return { dates, closeValues };
|
return { dates, closeValues };
|
||||||
}
|
}
|
||||||
@ -275,15 +276,35 @@
|
|||||||
{#if historicalData?.length > 0}
|
{#if historicalData?.length > 0}
|
||||||
<div class="app w-full relative">
|
<div class="app w-full relative">
|
||||||
<div class="flex justify-start space-x-2 absolute left-16 top-0 z-10">
|
<div class="flex justify-start space-x-2 absolute left-16 top-0 z-10">
|
||||||
{#each ["1Y", "3Y", "5Y", "Max"] as item}
|
{#each ["1Y", "3Y", "5Y", "Max"] as item, index}
|
||||||
<label
|
{#if data?.user?.tier === "Pro" || index === 0}
|
||||||
on:click={() => (timePeriod = item)}
|
<label
|
||||||
class="px-4 py-2 {timePeriod === item
|
on:click={() => (timePeriod = item)}
|
||||||
? 'bg-white text-black shadow-xl'
|
class="px-4 py-2 {timePeriod === item
|
||||||
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
? 'bg-white text-black shadow-xl'
|
||||||
>
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
{item}
|
>
|
||||||
</label>
|
{item}
|
||||||
|
</label>
|
||||||
|
{:else if data?.user?.tier !== "Pro"}
|
||||||
|
<a
|
||||||
|
href="/pricing"
|
||||||
|
class="px-4 py-2 flex flex-row items-center {timePeriod === item
|
||||||
|
? 'bg-white text-black shadow-xl'
|
||||||
|
: 'text-white bg-table text-opacity-[0.6]'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
|
||||||
|
>
|
||||||
|
{item}
|
||||||
|
<svg
|
||||||
|
class="ml-1 mt-0.5 w-3.5 h-3.5 inline-block"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
><path
|
||||||
|
fill="#A3A3A3"
|
||||||
|
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<h2
|
<h2
|
||||||
@ -309,7 +330,7 @@
|
|||||||
<div class="flex justify-center items-center h-80">
|
<div class="flex justify-center items-center h-80">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<label
|
<label
|
||||||
class="bg-primary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
class="bg-default rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="loading loading-spinner loading-md sm:loading-[1rem] text-gray-400"
|
class="loading loading-spinner loading-md sm:loading-[1rem] text-gray-400"
|
||||||
|
|||||||
@ -553,7 +553,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{#if checkedSymbol === item?.ticker}
|
{#if checkedSymbol === item?.ticker}
|
||||||
<tr
|
<tr class="bg-default"
|
||||||
><td colspan="8" class="px-0" style=""
|
><td colspan="8" class="px-0" style=""
|
||||||
><div class="-mt-0.5 px-0 pb-2">
|
><div class="-mt-0.5 px-0 pb-2">
|
||||||
<div class="relative h-[400px]">
|
<div class="relative h-[400px]">
|
||||||
@ -574,6 +574,7 @@
|
|||||||
)}
|
)}
|
||||||
symbol={item?.ticker}
|
symbol={item?.ticker}
|
||||||
numOfRatings={item?.ratings}
|
numOfRatings={item?.ratings}
|
||||||
|
{data}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -324,7 +324,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{#if checkedSymbol === item?.symbol}
|
{#if checkedSymbol === item?.symbol}
|
||||||
<tr
|
<tr class="bg-default"
|
||||||
><td colspan="9" class="px-0" style=""
|
><td colspan="9" class="px-0" style=""
|
||||||
><div class="-mt-0.5 px-0 pb-2">
|
><div class="-mt-0.5 px-0 pb-2">
|
||||||
<div class="relative h-[400px]">
|
<div class="relative h-[400px]">
|
||||||
@ -349,6 +349,7 @@
|
|||||||
numOfRatings={item?.ratings}
|
numOfRatings={item?.ratings}
|
||||||
title={"Insider Trading"}
|
title={"Insider Trading"}
|
||||||
addToLast={true}
|
addToLast={true}
|
||||||
|
{data}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -17,14 +17,16 @@
|
|||||||
case "success":
|
case "success":
|
||||||
if (form?.notVerified) {
|
if (form?.notVerified) {
|
||||||
toast.error("Please verify your email first", {
|
toast.error("Please verify your email first", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
} else form?.notVerified === false;
|
} else form?.notVerified === false;
|
||||||
{
|
{
|
||||||
toast.success("Login successfully!", {
|
toast.success("Login successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
@ -32,19 +34,22 @@
|
|||||||
case "redirect":
|
case "redirect":
|
||||||
isClicked = true;
|
isClicked = true;
|
||||||
toast.success("Login successfully!", {
|
toast.success("Login successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
case "failure":
|
case "failure":
|
||||||
toast.error("Invalid credentials", {
|
toast.error("Invalid credentials", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
toast.error(result.error.message, {
|
toast.error(result.error.message, {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -424,6 +424,7 @@
|
|||||||
style="position: relative; height: 0px; z-index: 1;"
|
style="position: relative; height: 0px; z-index: 1;"
|
||||||
>
|
>
|
||||||
<RatingsChart
|
<RatingsChart
|
||||||
|
{data}
|
||||||
title="Transactions"
|
title="Transactions"
|
||||||
ratingsList={rawData?.history?.map(
|
ratingsList={rawData?.history?.map(
|
||||||
(item) => ({
|
(item) => ({
|
||||||
|
|||||||
@ -18,19 +18,22 @@
|
|||||||
case "redirect":
|
case "redirect":
|
||||||
isClicked = true;
|
isClicked = true;
|
||||||
toast.success("Registration successfully!", {
|
toast.success("Registration successfully!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
case "failure":
|
case "failure":
|
||||||
toast.error("Invalid credentials", {
|
toast.error("Invalid credentials", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
await update();
|
await update();
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
toast.error(result.error.message, {
|
toast.error(result.error.message, {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -57,8 +60,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<SEO
|
<SEO
|
||||||
title="Sign Up"
|
title="Sign Up"
|
||||||
description="Sign Up to Stocknear to become part of the largest trading community in the world."
|
description="Sign Up to Stocknear to become part of the largest trading community in the world."
|
||||||
|
|||||||
@ -12,29 +12,27 @@
|
|||||||
try {
|
try {
|
||||||
await pb.collection("users").requestPasswordReset(email);
|
await pb.collection("users").requestPasswordReset(email);
|
||||||
toast.success("Password resetted. Check your emails!", {
|
toast.success("Password resetted. Check your emails!", {
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
});
|
});
|
||||||
goto("/login");
|
goto("/login");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
toast.error(
|
toast.error(
|
||||||
{ err },
|
{ err },
|
||||||
{
|
{
|
||||||
style: "border-radius: 200px; background: #2A2E39; color: #fff;",
|
style:
|
||||||
|
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<SEO
|
<SEO
|
||||||
title="Reset Password"
|
title="Reset Password"
|
||||||
description="Reset your password to sign in to your Stocknear account."
|
description="Reset your password to sign in to your Stocknear account."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center min-h-screen w-full max-w-3xl m-auto mt-40"
|
class="flex flex-col items-center min-h-screen w-full max-w-3xl m-auto mt-40"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -405,7 +405,7 @@
|
|||||||
>
|
>
|
||||||
<main class="w-full">
|
<main class="w-full">
|
||||||
<div class="sm:pl-7 sm:pb-7 sm:pt-7 m-auto mt-2 sm:mt-0">
|
<div class="sm:pl-7 sm:pb-7 sm:pt-7 m-auto mt-2 sm:mt-0">
|
||||||
<div class="mb-3">
|
<div class="">
|
||||||
<h1 class="text-xl sm:text-2xl text-white font-bold">Market Cap</h1>
|
<h1 class="text-xl sm:text-2xl text-white font-bold">Market Cap</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -431,7 +431,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6"
|
class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6 mt-3"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="bg-gray-800/30 rounded-lg p-4 sm:hover:bg-gray-800/40 transition-colors"
|
class="bg-gray-800/30 rounded-lg p-4 sm:hover:bg-gray-800/40 transition-colors"
|
||||||
@ -471,7 +471,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="bg-gray-800/30 rounded-lg p-4 sm:hover:bg-gray-800/40 transition-colors"
|
class="bg-gray-800/30 rounded p-4 sm:hover:bg-gray-800/40 transition-colors"
|
||||||
>
|
>
|
||||||
<div class="text-[#c3c6d0] text-sm mb-2 flex items-center">
|
<div class="text-[#c3c6d0] text-sm mb-2 flex items-center">
|
||||||
<span>1-Year Change</span>
|
<span>1-Year Change</span>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user