This commit is contained in:
MuslemRahimi 2025-03-07 01:16:05 +01:00
parent c0284a3af8
commit d822ca8ed2
86 changed files with 206 additions and 1228 deletions

View File

@ -57,7 +57,8 @@
stroke-width="3" stroke-width="3"
stroke-dasharray="100.48" stroke-dasharray="100.48"
stroke-dashoffset={100.48 - stroke-dashoffset={100.48 -
((tier === "Pro" ? score : 0) / 10) * 100.48} ((["Pro", "Plus"]?.includes(tier) ? score : 0) / 10) *
100.48}
> >
</circle> </circle>
</g> </g>
@ -67,7 +68,7 @@
y="21" y="21"
text-anchor="middle" text-anchor="middle"
font-size="10" font-size="10"
fill="#000">{tier === "Pro" ? score : 0}</text fill="#000">{["Pro", "Plus"]?.includes(tier) ? score : 0}</text
> >
</svg> </svg>
@ -75,7 +76,7 @@
<div <div
class="absolute top-1/2 start-1/2 transform -translate-y-1/2 -translate-x-1/2" class="absolute top-1/2 start-1/2 transform -translate-y-1/2 -translate-x-1/2"
> >
{#if tier === "Pro"} {#if ["Pro", "Plus"]?.includes(tier)}
<span class="text-center text-white text-xl font-semibold"> <span class="text-center text-white text-xl font-semibold">
{score} {score}
</span> </span>
@ -107,7 +108,7 @@
</div> </div>
</div> </div>
<h4 class="text-center text-white text-sm mt-1 font-semibold"> <h4 class="text-center text-white text-sm mt-1 font-semibold">
{#if tier === "Pro"} {#if ["Pro", "Plus"]?.includes(tier)}
{#if score === 10} {#if score === 10}
Strong Buy Strong Buy
{:else if score >= 7} {:else if score >= 7}

View File

@ -48,7 +48,7 @@
id={"analystInsightInfo"} id={"analystInsightInfo"}
/> />
</div> </div>
{#if data?.user?.tier === "Pro"} {#if ["Pro", "Plus"]?.includes(data?.user?.tier)}
<div class="w-full flex flex-col items-start"> <div class="w-full flex flex-col items-start">
<div class="text-white text-[1rem] mt-2 mb-2 w-full"> <div class="text-white text-[1rem] mt-2 mb-2 w-full">
The AI model summarizes the latest Wallstreet Analyst Insight Report The AI model summarizes the latest Wallstreet Analyst Insight Report

View File

@ -240,7 +240,7 @@
/> />
</div> </div>
{#if data?.user?.tier === "Pro"} {#if ["Pro", "Plus"]?.includes(data?.user?.tier)}
{#if isLoaded} {#if isLoaded}
{#if fairPrice !== null} {#if fairPrice !== null}
<div <div

View File

@ -157,7 +157,7 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length && !['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -7,7 +7,7 @@
export let title; export let title;
const exportData = (format = "csv") => { const exportData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row // Add headers row
const csvRows = []; const csvRows = [];
@ -58,7 +58,9 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' ? 'hidden' : ''} ml-1 mt-0.5 w-3.5 h-3.5" class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden'
: ''} ml-1 mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" viewBox="0 0 24 24"
><path ><path

View File

@ -43,7 +43,7 @@
{#each highDataList as item, index} {#each highDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= highDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= highDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -66,7 +66,7 @@
{#each avgDataList as item, index} {#each avgDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= avgDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= avgDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -89,7 +89,7 @@
{#each lowDataList as item, index} {#each lowDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= lowDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= lowDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -143,7 +143,7 @@
{#each computeGrowthSingleList(highDataList, avgDataList) as item, index} {#each computeGrowthSingleList(highDataList, avgDataList) as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= highDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= highDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -176,7 +176,7 @@
{#each avgGrowthList?.filter((item) => item.FY >= 25) as item, index} {#each avgGrowthList?.filter((item) => item.FY >= 25) as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= avgDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= avgDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -209,7 +209,7 @@
{#each computeGrowthSingleList(lowDataList, avgDataList) as item, index} {#each computeGrowthSingleList(lowDataList, avgDataList) as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]"> <td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#if index !== 0} {#if index !== 0}
{#if userTier !== "Pro" && index >= lowDataList?.length - 2} {#if !["Pro", "Plus"]?.includes(userTier) && index >= lowDataList?.length - 2}
<a class="inline-block ml-0.5 text-white" href="/pricing" <a class="inline-block ml-0.5 text-white" href="/pricing"
>Pro<svg >Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]" class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"

View File

@ -274,7 +274,7 @@
class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"

View File

@ -86,7 +86,7 @@
if (isAChecked !== isBChecked) return isAChecked ? -1 : 1; if (isAChecked !== isBChecked) return isAChecked ? -1 : 1;
// Check if the user is not Pro // Check if the user is not Pro
if (data?.user?.tier !== "Pro") { if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
const isAPriority = proOnlyItems.has(a?.name); const isAPriority = proOnlyItems.has(a?.name);
const isBPriority = proOnlyItems.has(b?.name); const isBPriority = proOnlyItems.has(b?.name);
@ -225,7 +225,7 @@
{#each searchQuery?.length !== 0 ? testList : allRows as item} {#each searchQuery?.length !== 0 ? testList : allRows as item}
<DropdownMenu.Item class="sm:hover:bg-primary"> <DropdownMenu.Item class="sm:hover:bg-primary">
<div class="flex items-center"> <div class="flex items-center">
{#if data?.user?.tier === "Pro" || excludedRules?.has(item?.rule)} {#if ["Pro", "Plus"]?.includes(data?.user?.tier) || excludedRules?.has(item?.rule)}
<label <label
on:click|capture={(event) => { on:click|capture={(event) => {
event.preventDefault(); event.preventDefault();

View File

@ -68,7 +68,7 @@
during market hours. during market hours.
{/if} {/if}
<br />Analysts project revenue of <br />Analysts project revenue of
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
... Unlock content with ... Unlock content with
<a <a
class="inline-block ml-0.5 text-blue-400 sm:hover:text-white" class="inline-block ml-0.5 text-blue-400 sm:hover:text-white"

View File

@ -345,7 +345,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -404,5 +405,5 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>

View File

@ -321,7 +321,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -380,5 +381,5 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>

View File

@ -438,7 +438,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -497,5 +498,5 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>

View File

@ -595,7 +595,7 @@
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
volumeList?.slice(0, 3)?.length && volumeList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -715,7 +715,7 @@
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
openInterestList?.slice(0, 3)?.length && openInterestList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -817,7 +817,7 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>
</div> </div>
</div> </div>
@ -825,9 +825,7 @@
<dialog <dialog
id="optionDetailsDesktopModal" id="optionDetailsDesktopModal"
class="modal {$screenWidth < 640 class="modal {$screenWidth < 640 ? 'modal-bottom ' : ''} bg-[#000]/40 sm:px-5"
? 'modal-bottom '
: ''} bg-[#000]/40 sm:px-5"
> >
<div <div
class="modal-box w-full {rawDataHistory?.length > 0 class="modal-box w-full {rawDataHistory?.length > 0

View File

@ -303,7 +303,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -356,5 +357,5 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>

View File

@ -276,7 +276,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -325,7 +326,7 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>
<style> <style>

View File

@ -755,7 +755,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
rawData?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' rawData?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -851,7 +852,7 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>
</div> </div>
</div> </div>

View File

@ -481,7 +481,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
displayList?.slice(0, 3)?.length && data?.user?.tier !== 'Pro' displayList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -561,5 +562,5 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>

View File

@ -309,7 +309,7 @@
class="flex justify-start space-x-2 w-full ml-2 absolute top-3.5 z-10" class="flex justify-start space-x-2 w-full ml-2 absolute top-3.5 z-10"
> >
{#each ["1Y", "3Y", "5Y", "Max"] as item, index} {#each ["1Y", "3Y", "5Y", "Max"] as item, index}
{#if data?.user?.tier === "Pro" || index === 0} {#if ["Pro", "Plus"]?.includes(data?.user?.tier) || index === 0}
<label <label
on:click={() => (timePeriod = item)} on:click={() => (timePeriod = item)}
class="px-3 py-1 {timePeriod === item class="px-3 py-1 {timePeriod === item
@ -318,7 +318,7 @@
> >
{item} {item}
</label> </label>
{:else if data?.user?.tier !== "Pro"} {:else if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<a <a
href="/pricing" href="/pricing"
class="px-3 py-1 flex flex-row items-center {timePeriod === item class="px-3 py-1 flex flex-row items-center {timePeriod === item

View File

@ -185,7 +185,7 @@
{#each sentimentList as item} {#each sentimentList as item}
<div class="flex flex-col items-center"> <div class="flex flex-col items-center">
<span class="text-white text-[1rem] mb-4"> <span class="text-white text-[1rem] mb-4">
{#if data?.user?.tier === "Pro"} {#if ["Pro", "Plus"]?.includes(data?.user?.tier)}
{item?.value !== 0 ? item?.value : "-"} {item?.value !== 0 ? item?.value : "-"}
{:else if ["1M", "1Y"]?.includes(item?.label)} {:else if ["1M", "1Y"]?.includes(item?.label)}
{item?.value} {item?.value}
@ -209,7 +209,7 @@
: 'bg-[#00FC50]'} rounded-full" : 'bg-[#00FC50]'} rounded-full"
style="height: 120px;" style="height: 120px;"
> >
{#if data?.user?.tier === "Pro"} {#if ["Pro", "Plus"]?.includes(data?.user?.tier)}
<div <div
class="bg-[#2F2F2F] w-2 rounded-t-full" class="bg-[#2F2F2F] w-2 rounded-t-full"
style="height: {100 - item?.value * 10}%;" style="height: {100 - item?.value * 10}%;"

View File

@ -515,7 +515,8 @@
<tr <tr
class="border-b border-gray-800 odd:bg-odd sm:hover:bg-[#245073]/10 {index + class="border-b border-gray-800 odd:bg-odd sm:hover:bg-[#245073]/10 {index +
1 === 1 ===
shareholderList?.length && data?.user?.tier !== 'Pro' shareholderList?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -258,7 +258,7 @@
} }
async function handleSelectAll() { async function handleSelectAll() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
searchQuery = ""; searchQuery = "";
ruleOfList = allRows; ruleOfList = allRows;
ruleOfList = [...ruleOfList]; ruleOfList = [...ruleOfList];
@ -313,7 +313,7 @@
} }
// Check if the user is not Pro // Check if the user is not Pro
if (data?.user?.tier !== "Pro") { if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
const isAPriority = proOnlyItems.has(a?.name); const isAPriority = proOnlyItems.has(a?.name);
const isBPriority = proOnlyItems.has(b?.name); const isBPriority = proOnlyItems.has(b?.name);
@ -444,7 +444,7 @@
}); });
// Check for the user's tier and filter out paywalled features // Check for the user's tier and filter out paywalled features
if (data?.user?.tier !== "Pro") { if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
ruleOfList = ruleOfList.filter((item) => ruleOfList = ruleOfList.filter((item) =>
excludedRules.has(item?.rule), excludedRules.has(item?.rule),
); );
@ -788,7 +788,7 @@
/> />
<span class="ml-2">{item?.name}</span> <span class="ml-2">{item?.name}</span>
</label> </label>
{:else if data?.user?.tier === "Pro" || excludedRules?.has(item?.rule)} {:else if ["Pro", "Plus"]?.includes(data?.user?.tier) || excludedRules?.has(item?.rule)}
<label <label
on:click|capture={(event) => { on:click|capture={(event) => {
event.preventDefault(); event.preventDefault();
@ -862,7 +862,7 @@
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
rawData?.length && rawData?.length &&
data?.user?.tier !== 'Pro' && !['Pro', 'Plus']?.includes(data?.user?.tier) &&
hideLastRow hideLastRow
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"

View File

@ -1,8 +1,9 @@
<script lang="ts"> <script lang="ts">
export let data; export let data;
export let display = false;
</script> </script>
{#if data?.user?.tier !== "Pro"} {#if (display === true && data?.user?.tier !== "Pro") || !["Pro", "Plus"]?.includes(data?.user?.tier)}
<div class="mt-4 py-6"> <div class="mt-4 py-6">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8"> <div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl text-center"> <div class="mx-auto max-w-2xl text-center">

View File

@ -176,7 +176,7 @@
</div> </div>
<div class="flex flex-col w-full pt-2"> <div class="flex flex-col w-full pt-2">
{#if index === 0 && data?.user?.tier !== "Pro"} {#if index === 0 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<span class="mt-3"> <span class="mt-3">
{item?.text?.slice(0, 50) + "..."} {item?.text?.slice(0, 50) + "..."}
Unlock content with Unlock content with

View File

@ -773,7 +773,7 @@
</a> </a>
</Button> </Button>
</Sheet.Close> </Sheet.Close>
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<Sheet.Close asChild let:builder> <Sheet.Close asChild let:builder>
<Button <Button
builders={[builder]} builders={[builder]}
@ -791,7 +791,7 @@
<Gem class="h-5.5 w-5.5" /> <Gem class="h-5.5 w-5.5" />
</div> </div>
<span class="ml-3 text-white text-[1rem]" <span class="ml-3 text-white text-[1rem]"
>Stock Analysis Pro</span >Pricing Plan</span
> >
</div> </div>
</a> </a>
@ -1192,7 +1192,7 @@
</div> </div>
<span class="ml-3 text-white">News</span> <span class="ml-3 text-white">News</span>
</a> </a>
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<a <a
href="/pricing" href="/pricing"
class="flex flex-row items-center ml-9 w-full mt-3" class="flex flex-row items-center ml-9 w-full mt-3"
@ -1202,7 +1202,7 @@
> >
<Gem class="h-5.5 w-5.5" /> <Gem class="h-5.5 w-5.5" />
</div> </div>
<span class="ml-3 text-white">Stock Analysis Pro</span> <span class="ml-3 text-white">Pricing Plan</span>
</a> </a>
{/if} {/if}
</nav> </nav>

View File

@ -71,7 +71,7 @@
{/if} {/if}
<!-- <!--
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial === true} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial === true}
<div <div
class="mb-5 relative isolate sm:rounded text-center flex justify-center items-center gap-x-6 overflow-hidden bg-[#FFC233] px-6 py-3.5 sm:py-2.5 sm:px-3.5 sm:before:flex-1" class="mb-5 relative isolate sm:rounded text-center flex justify-center items-center gap-x-6 overflow-hidden bg-[#FFC233] px-6 py-3.5 sm:py-2.5 sm:px-3.5 sm:before:flex-1"
> >
@ -398,7 +398,7 @@
{#if recentWIIM?.length !== 0} {#if recentWIIM?.length !== 0}
<ul style="padding-left: 5px;"> <ul style="padding-left: 5px;">
{#each recentWIIM as item, index} {#each recentWIIM as item, index}
{#if index >= 3 && data?.user?.tier !== "Pro"} {#if index >= 3 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<li <li
class="text-sm sm:text-[1rem]" class="text-sm sm:text-[1rem]"
style="margin-left: 8px; margin-bottom: 15px; list-style-type: disc;" style="margin-left: 8px; margin-bottom: 15px; list-style-type: disc;"
@ -587,7 +587,7 @@
{#if data?.getDashboard?.upcomingEarnings?.length !== 0} {#if data?.getDashboard?.upcomingEarnings?.length !== 0}
<ul style="padding-left: 5px;"> <ul style="padding-left: 5px;">
{#each data?.getDashboard?.upcomingEarnings as item, index} {#each data?.getDashboard?.upcomingEarnings as item, index}
{#if index >= 3 && data?.user?.tier !== "Pro"} {#if index >= 3 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<li <li
class="text-sm sm:text-[1rem]" class="text-sm sm:text-[1rem]"
style=" margin-left: 8px; margin-bottom: 30px; list-style-type: disc;" style=" margin-left: 8px; margin-bottom: 30px; list-style-type: disc;"

View File

@ -12,7 +12,7 @@ export const load = async ({ locals }) => {
let output = await response?.json(); let output = await response?.json();
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output; output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.reverse()?.slice(0, 6) : output;
return output; return output;
}; };

View File

@ -177,7 +177,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -407,7 +407,7 @@
<td <td
class="text-sm sm:text-[1rem] text-start whitespace-nowrap" class="text-sm sm:text-[1rem] text-start whitespace-nowrap"
> >
{#if index >= 5 && data?.user?.tier !== "Pro"} {#if index >= 5 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<a class="block relative" href="/pricing"> <a class="block relative" href="/pricing">
<span <span
class="text-base font-semibold text-blue-link blur-sm group-hover:blur-[6px]" class="text-base font-semibold text-blue-link blur-sm group-hover:blur-[6px]"

View File

@ -12,7 +12,7 @@ export const load = async ({ locals }) => {
let output = await response.json(); let output = await response.json();
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output; output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.reverse()?.slice(0, 6) : output;
return output; return output;
}; };

View File

@ -8,7 +8,7 @@ export const POST: RequestHandler = async ({ request, locals }) => {
// If the user is not Pro, check the current number of active price alerts. // If the user is not Pro, check the current number of active price alerts.
if (user?.tier !== 'Pro') { if (!["Pro","Plus"]?.includes(user?.tier)) {
const totalAlerts = await pb.collection("priceAlert").getFullList({ const totalAlerts = await pb.collection("priceAlert").getFullList({
// Ensure the filter checks for a boolean false. // Ensure the filter checks for a boolean false.
filter: `user="${user?.id}" && triggered=false` filter: `user="${user?.id}" && triggered=false`

View File

@ -12,7 +12,7 @@ export const POST = (async ({ request, locals }) => {
// Determine the ticker limit: 50 for Pro users, 5 for non-Pro users. // Determine the ticker limit: 50 for Pro users, 5 for non-Pro users.
const isProUser = user?.tier === "Pro"; const isProUser = user?.tier === "Pro" || user?.tier === "Plus";
const tickerLimit = isProUser ? 100 : 5; const tickerLimit = isProUser ? 100 : 5;
try { try {

View File

@ -195,7 +195,8 @@
<tr <tr
class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-odd {index + class="sm:hover:bg-[#245073] border-b border-[#27272A] sm:hover:bg-opacity-[0.2] odd:bg-odd {index +
1 === 1 ===
displayList?.length && data?.user?.tier !== 'Pro' displayList?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -1297,7 +1297,7 @@
{#if displayedData?.length !== 0} {#if displayedData?.length !== 0}
<div class="mt-3 w-full overflow-x-auto h-[850px] overflow-hidden"> <div class="mt-3 w-full overflow-x-auto h-[850px] overflow-hidden">
<DarkPoolTable {data} {displayedData} {filteredData} {rawData} /> <DarkPoolTable {data} {displayedData} {filteredData} {rawData} />
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>
{:else} {:else}
<div <div

View File

@ -451,13 +451,13 @@
<TableHeader {columns} {sortOrders} {sortData} /> <TableHeader {columns} {sortOrders} {sortData} />
</thead> </thead>
<tbody> <tbody>
{#each data?.user?.tier === "Pro" ? day : day?.slice(0, 6) as item, index} {#each ["Pro", "Plus"]?.includes(data?.user?.tier) ? day : day?.slice(0, 6) as item, index}
<!-- row --> <!-- row -->
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
day?.slice(0, 6)?.length && day?.slice(0, 6)?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -122,7 +122,7 @@
if (activeIdx === 0) { if (activeIdx === 0) {
tableList = filterEndOfYearDates(rawData); tableList = filterEndOfYearDates(rawData);
} else { } else {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
tableList = filterEndOfQuarterDates(rawData); tableList = filterEndOfQuarterDates(rawData);
} else { } else {
goto("/pricing"); goto("/pricing");
@ -790,7 +790,8 @@
> >
{item.title} {item.title}
<svg <svg
class="{data?.user?.tier !== 'Pro' && i === 1 class="{!['Pro', 'Plus']?.includes(data?.user?.tier) &&
i === 1
? '' ? ''
: 'hidden'} inline-block ml-0.5 -mt-1 w-3.5 h-3.5" : 'hidden'} inline-block ml-0.5 -mt-1 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -47,7 +47,7 @@
</div> </div>
</main> </main>
<aside class="hidden lg:block relative fixed w-1/4 ml-4"> <aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial}
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >

View File

@ -102,7 +102,10 @@
updatedTickers.push($etfTicker); updatedTickers.push($etfTicker);
// Check tier limits // Check tier limits
if (data?.user?.tier !== "Pro" && updatedTickers.length > 5) { if (
!["Pro", "Plus"]?.includes(data?.user?.tier) &&
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", { toast.error("Upgrade to Pro to add unlimited stocks!", {
style: style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;", "border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

@ -212,7 +212,7 @@
}; };
async function exportData() { async function exportData() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
let exportList = rawData?.map( let exportList = rawData?.map(
({ ({
time, time,
@ -342,7 +342,7 @@
> >
Weekly Weekly
</DropdownMenu.Item> </DropdownMenu.Item>
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
{#each ["Monthly", "Quarterly", "Annual"] as entry} {#each ["Monthly", "Quarterly", "Annual"] as entry}
<DropdownMenu.Item <DropdownMenu.Item
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
@ -391,7 +391,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -422,7 +422,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -66,7 +66,7 @@
> >
<ul class="flex flex-row items-center w-full text-white"> <ul class="flex flex-row items-center w-full text-white">
<a <a
href={`/stocks/${$etfTicker}/options`} href={`/etf/${$etfTicker}/options`}
on:click={() => changeSubSection("overview")} on:click={() => changeSubSection("overview")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'overview' class="p-2 px-5 cursor-pointer {displaySubSection === 'overview'
? 'text-white bg-primary/90' ? 'text-white bg-primary/90'
@ -75,7 +75,7 @@
Overview Overview
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/unusual-activity`} href={`/etf/${$etfTicker}/options/unusual-activity`}
on:click={() => changeSubSection("unusual-activity")} on:click={() => changeSubSection("unusual-activity")}
class="p-2 px-5 cursor-pointer {displaySubSection === class="p-2 px-5 cursor-pointer {displaySubSection ===
'unusual-activity' 'unusual-activity'
@ -85,7 +85,7 @@
Unusual Activity Unusual Activity
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/hottest-contracts`} href={`/etf/${$etfTicker}/options/hottest-contracts`}
on:click={() => changeSubSection("hottest-contracts")} on:click={() => changeSubSection("hottest-contracts")}
class="p-2 px-5 cursor-pointer {displaySubSection === class="p-2 px-5 cursor-pointer {displaySubSection ===
'hottest-contracts' 'hottest-contracts'
@ -95,7 +95,7 @@
Hottest Contracts Hottest Contracts
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/volatility`} href={`/etf/${$etfTicker}/options/volatility`}
on:click={() => changeSubSection("volatility")} on:click={() => changeSubSection("volatility")}
class="p-2 px-5 cursor-pointer {displaySubSection === class="p-2 px-5 cursor-pointer {displaySubSection ===
'volatility' 'volatility'
@ -105,7 +105,7 @@
Volatility Volatility
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/oi`} href={`/etf/${$etfTicker}/options/oi`}
on:click={() => changeSubSection("oi")} on:click={() => changeSubSection("oi")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'oi' class="p-2 px-5 cursor-pointer {displaySubSection === 'oi'
? 'text-white bg-primary/90' ? 'text-white bg-primary/90'
@ -115,7 +115,7 @@
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/gex`} href={`/etf/${$etfTicker}/options/gex`}
on:click={() => changeSubSection("gex")} on:click={() => changeSubSection("gex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'gex' class="p-2 px-5 cursor-pointer {displaySubSection === 'gex'
? 'text-white bg-primary/90' ? 'text-white bg-primary/90'
@ -124,7 +124,7 @@
GEX GEX
</a> </a>
<a <a
href={`/stocks/${$etfTicker}/options/dex`} href={`/etf/${$etfTicker}/options/dex`}
on:click={() => changeSubSection("dex")} on:click={() => changeSubSection("dex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'dex' class="p-2 px-5 cursor-pointer {displaySubSection === 'dex'
? 'text-white bg-primary/90' ? 'text-white bg-primary/90'

View File

@ -414,7 +414,7 @@
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
optionList?.slice(0, 3)?.length && optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -624,7 +624,7 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
{/if} {/if}
{/if} {/if}
</div> </div>

View File

@ -10,7 +10,7 @@ export const load = async ({ locals }) => {
}); });
let output = await response?.json(); let output = await response?.json();
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output; output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 6) : output;
return output; return output;
}; };

View File

@ -112,7 +112,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
etfProviderList?.length && data?.user?.tier !== 'Pro' etfProviderList?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -17,7 +17,7 @@ export const load = async ({ params, locals }) => {
}); });
let output = await response?.json(); let output = await response?.json();
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output; output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 6) : output;
return output; return output;
}; };

View File

@ -199,7 +199,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
etfProviderData?.length && data?.user?.tier !== 'Pro' etfProviderData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -202,7 +202,7 @@
<div class="w-full m-auto mt-10"> <div class="w-full m-auto mt-10">
<Table <Table
{data} {data}
rawData={data?.user?.tier === "Pro" rawData={["Pro", "Plus"]?.includes(data?.user?.tier)
? data?.getHedgeFundsData?.holdings ? data?.getHedgeFundsData?.holdings
: data?.getHedgeFundsData?.holdings?.slice(0, 5)} : data?.getHedgeFundsData?.holdings?.slice(0, 5)}
{excludedRules} {excludedRules}

View File

@ -102,7 +102,10 @@
updatedTickers.push($indexTicker); updatedTickers.push($indexTicker);
// Check tier limits // Check tier limits
if (data?.user?.tier !== "Pro" && updatedTickers.length > 5) { if (
!["Pro", "Plus"]?.includes(data?.user?.tier) &&
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", { toast.error("Upgrade to Pro to add unlimited stocks!", {
style: style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;", "border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

@ -208,7 +208,7 @@
}; };
async function exportData() { async function exportData() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
let exportList = rawData?.map( let exportList = rawData?.map(
({ ({
time, time,
@ -338,7 +338,7 @@
> >
Weekly Weekly
</DropdownMenu.Item> </DropdownMenu.Item>
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
{#each ["Monthly", "Quarterly", "Annual"] as entry} {#each ["Monthly", "Quarterly", "Annual"] as entry}
<DropdownMenu.Item <DropdownMenu.Item
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
@ -387,7 +387,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -418,7 +418,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -262,7 +262,7 @@
} }
onMount(async () => { onMount(async () => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
window.addEventListener("scroll", handleScroll); window.addEventListener("scroll", handleScroll);
return () => { return () => {
window.removeEventListener("scroll", handleScroll); window.removeEventListener("scroll", handleScroll);
@ -417,12 +417,12 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each data?.user?.tier === "Pro" ? optionList : optionList?.slice(0, 3) as item, index} {#each ["Pro", "Plus"]?.includes(data?.user?.tier) ? optionList : optionList?.slice(0, 3) as item, index}
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
optionList?.slice(0, 3)?.length && optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -12,7 +12,7 @@ export const load = async ({ locals }) => {
}); });
let output = await response.json(); let output = await response.json();
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output; output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 6) : output;
return output; return output;
}; };

View File

@ -54,7 +54,7 @@
} }
onMount(() => { onMount(() => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
window.addEventListener("scroll", handleScroll); window.addEventListener("scroll", handleScroll);
return () => { return () => {
window.removeEventListener("scroll", handleScroll); window.removeEventListener("scroll", handleScroll);
@ -230,7 +230,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd {index +
1 === 1 ===
stockList?.length && data?.user?.tier !== 'Pro' stockList?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -561,7 +561,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
originalPosTickers?.length && originalPosTickers?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -665,7 +665,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
originalNegTickers?.length && originalNegTickers?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -671,7 +671,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
originalPosTickers?.length && originalPosTickers?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -776,7 +776,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
originalNegTickers?.length && originalNegTickers?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey } = locals; const { apiURL, apiKey } = locals;
const getMarketMover = async () => { const getMarketMover = async () => {
@ -14,7 +14,6 @@ export const load = async ({ locals, setHeaders }) => {
}); });
const output = await response.json(); const output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey, user } = locals; const { apiURL, apiKey, user } = locals;
@ -14,8 +14,7 @@ export const load = async ({ locals, setHeaders }) => {
}); });
let output = await response.json(); let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" }); output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 5) : output;
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey, user } = locals; const { apiURL, apiKey, user } = locals;
@ -14,8 +14,7 @@ export const load = async ({ locals, setHeaders }) => {
}); });
let output = await response.json(); let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" }); output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 5) : output;
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey } = locals; const { apiURL, apiKey } = locals;
const getMarketMover = async () => { const getMarketMover = async () => {
@ -14,7 +14,6 @@ export const load = async ({ locals, setHeaders }) => {
}); });
const output = await response.json(); const output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey } = locals; const { apiURL, apiKey } = locals;
const getMarketMover = async () => { const getMarketMover = async () => {
@ -14,7 +14,6 @@ export const load = async ({ locals, setHeaders }) => {
}); });
const output = await response.json(); const output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey, user } = locals; const { apiURL, apiKey, user } = locals;
@ -14,8 +14,7 @@ export const load = async ({ locals, setHeaders }) => {
}); });
let output = await response.json(); let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" }); output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 5) : output;
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output; return output;
}; };

View File

@ -1,4 +1,4 @@
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiURL, apiKey, user } = locals; const { apiURL, apiKey, user } = locals;
@ -14,8 +14,7 @@ export const load = async ({ locals, setHeaders }) => {
}); });
let output = await response.json(); let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" }); output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.slice(0, 5) : output;
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output; return output;
}; };

View File

@ -1639,7 +1639,7 @@
{filteredData} {filteredData}
{rawData} {rawData}
/> />
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
</div> </div>
{:else} {:else}
<div <div

View File

@ -140,7 +140,8 @@
<tr <tr
class="bg-table odd:bg-odd border-bborder-gray-800 {index + class="bg-table odd:bg-odd border-bborder-gray-800 {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -256,7 +257,7 @@
</main> </main>
<aside class="hidden lg:block relative fixed w-1/4 ml-4"> <aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >

View File

@ -274,7 +274,7 @@
<DropdownMenu.Separator /> <DropdownMenu.Separator />
<DropdownMenu.Group> <DropdownMenu.Group>
{#each updatedSectorList as sector} {#each updatedSectorList as sector}
{#if sector === "S&P500" || data?.user?.tier === "Pro"} {#if sector === "S&P500" || ["Pro", "Plus"]?.includes(data?.user?.tier)}
<DropdownMenu.Item <DropdownMenu.Item
on:click={() => (selectedSector = sector)} on:click={() => (selectedSector = sector)}
class="cursor-pointer hover:bg-primary" class="cursor-pointer hover:bg-primary"

View File

@ -536,7 +536,7 @@
class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4" class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"

View File

@ -483,7 +483,7 @@
class="flex flex-row items-center w-full text-sm sm:text-[1rem] text-white" class="flex flex-row items-center w-full text-sm sm:text-[1rem] text-white"
> >
{#each tabs as item, index} {#each tabs as item, index}
{#if data?.user?.tier === "Pro" || index === 0} {#if ["Pro", "Plus"]?.includes(data?.user?.tier) || index === 0}
<label <label
on:click={() => changeTimePeriod(index)} on:click={() => changeTimePeriod(index)}
class="p-2 px-5 cursor-pointer {activeIdx === index class="p-2 px-5 cursor-pointer {activeIdx === index
@ -492,7 +492,7 @@
> >
{item.title} {item.title}
</label> </label>
{:else if data?.user?.tier !== "Pro"} {:else if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<a <a
href="/pricing" href="/pricing"
class="flex flex-row items-center p-2 px-5 cursor-pointer {activeIdx === class="flex flex-row items-center p-2 px-5 cursor-pointer {activeIdx ===

View File

@ -1471,7 +1471,7 @@
} }
async function handleCreateStrategy() { async function handleCreateStrategy() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const closePopup = document.getElementById("addStrategy"); const closePopup = document.getElementById("addStrategy");
closePopup?.dispatchEvent(new MouseEvent("click")); closePopup?.dispatchEvent(new MouseEvent("click"));
} else { } else {
@ -1643,7 +1643,7 @@
function changeRule(state: string) { function changeRule(state: string) {
if ( if (
data?.user?.tier !== "Pro" && !["Pro", "Plus"]?.includes(data?.user?.tier) &&
[ [
"gexRatio", "gexRatio",
"ivRank", "ivRank",
@ -3723,7 +3723,7 @@ const handleKeyDown = (event) => {
<div <div
class="flex w-full items-center space-x-1.5 py-1.5 md:w-1/2 lg:w-1/3 lg:py-1" class="flex w-full items-center space-x-1.5 py-1.5 md:w-1/2 lg:w-1/3 lg:py-1"
> >
{#if ["gexRatio", "ivRank", "iv30d", "totalOI", "changeOI", "netCallPrem", "netPutPrem", "callVolume", "putVolume", "pcRatio", "topAnalystRating", "topAnalystCounter", "topAnalystPriceTarget", "topAnalystUpside", "score"]?.includes(row?.rule) && data?.user?.tier !== "Pro"} {#if ["gexRatio", "ivRank", "iv30d", "totalOI", "changeOI", "netCallPrem", "netPutPrem", "callVolume", "putVolume", "pcRatio", "topAnalystRating", "topAnalystCounter", "topAnalystPriceTarget", "topAnalystUpside", "score"]?.includes(row?.rule) && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<label id={row?.rule} on:click={() => changeRule(row?.rule)}> <label id={row?.rule} on:click={() => changeRule(row?.rule)}>
<svg <svg
class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer" class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer"

View File

@ -46,7 +46,7 @@
</div> </div>
</main> </main>
<aside class="hidden lg:block relative fixed w-1/4 ml-4"> <aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial}
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >

View File

@ -113,7 +113,10 @@
updatedTickers.push($stockTicker); updatedTickers.push($stockTicker);
// Check tier limits // Check tier limits
if (data?.user?.tier !== "Pro" && updatedTickers.length > 5) { if (
!["Pro", "Plus"]?.includes(data?.user?.tier) &&
updatedTickers.length > 5
) {
toast.error("Upgrade to Pro to add unlimited stocks!", { toast.error("Upgrade to Pro to add unlimited stocks!", {
style: style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;", "border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

@ -196,7 +196,7 @@
displayStatement = "revenue"; displayStatement = "revenue";
const exportFundamentalData = (format = "csv") => { const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement; const data = fullStatement;
if (!data || data.length === 0) { if (!data || data.length === 0) {
return; return;
@ -344,7 +344,7 @@
class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -475,7 +475,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -232,7 +232,7 @@
displayStatement = "revenue"; displayStatement = "revenue";
const exportFundamentalData = (format = "csv") => { const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement; const data = fullStatement;
if (!data || data.length === 0) { if (!data || data.length === 0) {
return; return;
@ -379,7 +379,7 @@
class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -510,7 +510,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -194,7 +194,7 @@
fullStatement = data?.getData; fullStatement = data?.getData;
const exportFundamentalData = (format = "csv") => { const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement; const data = fullStatement;
if (!data || data.length === 0) { if (!data || data.length === 0) {
return; return;
@ -341,7 +341,7 @@
class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -472,7 +472,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -183,7 +183,7 @@
fullStatement = data?.getData; fullStatement = data?.getData;
const exportFundamentalData = (format = "csv") => { const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement; const data = fullStatement;
if (!data || data.length === 0) { if (!data || data.length === 0) {
return; return;
@ -330,7 +330,7 @@
class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="mt-3 sm:mt-0 mb-2 sm:mb-0 bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -461,7 +461,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -737,7 +737,7 @@
class="bg-secondary w-full sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4" class="bg-secondary w-full sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -886,7 +886,7 @@
{/if} {/if}
</div> </div>
{#if Object?.keys(data?.getAnalystInsight)?.length > 0} {#if Object?.keys(data?.getAnalystInsight)?.length > 0}
{#if data?.user?.tier === "Pro"} {#if ["Pro", "Plus"]?.includes(data?.user?.tier)}
<p class="pr-2 sm:pr-4"> <p class="pr-2 sm:pr-4">
{data?.getAnalystInsight?.insight} {data?.getAnalystInsight?.insight}
</p> </p>

View File

@ -226,7 +226,7 @@
class="bg-secondary w-full sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4" class="bg-secondary w-full sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"
@ -369,13 +369,13 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each data?.user?.tier === "Pro" ? historyList : historyList?.slice(0, 3) as item, index} {#each ["Pro", "Plus"]?.includes(data?.user?.tier) ? historyList : historyList?.slice(0, 3) as item, index}
<tr <tr
class=" {latestInfoDate(item?.date) class=" {latestInfoDate(item?.date)
? 'bg-[#F9AB00]/10' ? 'bg-[#F9AB00]/10'
: 'odd:bg-odd '} {index + 1 === : 'odd:bg-odd '} {index + 1 ===
historyList?.slice(0, 3)?.length && historyList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -549,7 +549,7 @@
{#if rawData?.length !== 0} {#if rawData?.length !== 0}
<UpgradeToPro {data} /> <UpgradeToPro {data} />
{/if} {/if}
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<div class="mt-4 py-6 xl:mt-10 border-t border-gray-200"> <div class="mt-4 py-6 xl:mt-10 border-t border-gray-200">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8"> <div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl md:text-center"> <div class="mx-auto max-w-2xl md:text-center">

View File

@ -210,7 +210,7 @@
}; };
async function exportData() { async function exportData() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
let exportList = rawData?.map( let exportList = rawData?.map(
({ ({
time, time,
@ -338,7 +338,7 @@
> >
Weekly Weekly
</DropdownMenu.Item> </DropdownMenu.Item>
{#if data?.user?.tier !== "Pro"} {#if !["Pro", "Plus"]?.includes(data?.user?.tier)}
{#each ["Monthly", "Quarterly", "Annual"] as entry} {#each ["Monthly", "Quarterly", "Annual"] as entry}
<DropdownMenu.Item <DropdownMenu.Item
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
@ -387,7 +387,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -417,7 +417,8 @@
<tr <tr
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index + class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 === 1 ===
rawData?.length && data?.user?.tier !== 'Pro' rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -557,7 +557,7 @@
class="text-white odd:bg-odd border-b border-gray-800 {index + class="text-white odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
insiderTradingList?.slice(0, 6)?.length && insiderTradingList?.slice(0, 6)?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -627,7 +627,7 @@
</table> </table>
</div> </div>
{#if rawData?.length > 5 && rawData?.length === insiderTradingList?.length && data?.user?.tier === "Pro"} {#if rawData?.length > 5 && rawData?.length === insiderTradingList?.length && ["Pro", "Plus"]?.includes(data?.user?.tier)}
<label <label
on:click={backToTop} on:click={backToTop}
class="w-32 py-1.5 mt-10 hover:bg-white hover:bg-opacity-[0.05] cursor-pointer m-auto flex justify-center items-center border border-gray-600 rounded-full" class="w-32 py-1.5 mt-10 hover:bg-white hover:bg-opacity-[0.05] cursor-pointer m-auto flex justify-center items-center border border-gray-600 rounded-full"

View File

@ -340,7 +340,7 @@
class="odd:bg-odd sm:hover:bg-[#245073]/10 border-b border-gray-800 {index + class="odd:bg-odd sm:hover:bg-[#245073]/10 border-b border-gray-800 {index +
1 === 1 ===
rawData?.slice(0, 3)?.length && rawData?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >

View File

@ -414,7 +414,7 @@
class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index + class="sm:hover:bg-[#245073]/10 odd:bg-odd border-b border-gray-800 {index +
1 === 1 ===
optionList?.slice(0, 3)?.length && optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro' !['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
> >
@ -624,7 +624,7 @@
</table> </table>
</div> </div>
<UpgradeToPro {data} /> <UpgradeToPro {data} display={true} />
{/if} {/if}
{/if} {/if}
</div> </div>

View File

@ -180,7 +180,7 @@
} }
const exportData = (format = "csv") => { const exportData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row // Add headers row
const csvRows = []; const csvRows = [];
csvRows.push("Date,Employees,Change,Growth"); csvRows.push("Date,Employees,Change,Growth");
@ -489,7 +489,7 @@
> >
<span class="truncate text-white">Download</span> <span class="truncate text-white">Download</span>
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@ -81,7 +81,7 @@
</main> </main>
<aside class="inline-block relative w-full lg:w-1/4 mt-3"> <aside class="inline-block relative w-full lg:w-1/4 mt-3">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial}
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >

View File

@ -385,7 +385,7 @@
} }
const exportData = (format = "csv") => { const exportData = (format = "csv") => {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row // Add headers row
const csvRows = []; const csvRows = [];
csvRows.push("date,market-cap"); csvRows.push("date,market-cap");
@ -629,7 +629,7 @@
>Download</span >Download</span
> >
<svg <svg
class="{data?.user?.tier === 'Pro' class="{['Pro', 'Plus']?.includes(data?.user?.tier)
? 'hidden' ? 'hidden'
: ''} ml-1 -mt-0.5 w-3.5 h-3.5" : ''} ml-1 -mt-0.5 w-3.5 h-3.5"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -662,7 +662,7 @@
class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4" class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"

View File

@ -17,7 +17,7 @@ export const load = async ({ locals, params }) => {
}); });
let output = await response.json(); let output = await response.json();
output.history = user?.tier !== 'Pro' ? output?.history?.slice(0,3) : output.history; output.history = !["Pro", "Plus"]?.includes(user?.tier) ? output?.history?.slice(0,3) : output.history;
return output; return output;
}; };

View File

@ -374,7 +374,7 @@
> >
<tr <tr
class="group {index + 1 === rawData?.length && class="group {index + 1 === rawData?.length &&
data?.user?.tier !== 'Pro' !['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]' ? 'opacity-[0.1]'
: ''}" : ''}"
><td ><td

View File

@ -47,7 +47,7 @@
</main> </main>
<aside class="inline-block relative w-full lg:w-1/4 mt-3"> <aside class="inline-block relative w-full lg:w-1/4 mt-3">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial}
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >

View File

@ -383,7 +383,7 @@
class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1" class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"

View File

@ -601,7 +601,7 @@
} }
async function handleSelectAll() { async function handleSelectAll() {
if (data?.user?.tier === "Pro") { if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
searchQuery = ""; searchQuery = "";
ruleOfList = allRows; ruleOfList = allRows;
ruleOfList = [...ruleOfList]; ruleOfList = [...ruleOfList];
@ -611,7 +611,7 @@
saveRules(); saveRules();
} else { } else {
toast.error("Only for Pro Members", { toast.error("Only for Plus & Pro Members", {
style: style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;", "border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",
}); });
@ -682,7 +682,7 @@
}); });
// Check for the user's tier and filter out paywalled features // Check for the user's tier and filter out paywalled features
if (data?.user?.tier !== "Pro") { if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
ruleOfList = ruleOfList.filter((item) => ruleOfList = ruleOfList.filter((item) =>
excludedRules.has(item?.rule), excludedRules.has(item?.rule),
); );
@ -846,7 +846,7 @@
} }
// Check if the user is not Pro // Check if the user is not Pro
if (data?.user?.tier !== "Pro") { if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
const isAPriority = proOnlyItems.has(a?.name); const isAPriority = proOnlyItems.has(a?.name);
const isBPriority = proOnlyItems.has(b?.name); const isBPriority = proOnlyItems.has(b?.name);
@ -1402,7 +1402,7 @@
/> />
<span class="ml-2">{item?.name}</span> <span class="ml-2">{item?.name}</span>
</label> </label>
{:else if data?.user?.tier === "Pro" || excludedRules?.has(item?.rule)} {:else if ["Pro", "Plus"]?.includes(data?.user?.tier) || excludedRules?.has(item?.rule)}
<label <label
on:click|capture={(event) => { on:click|capture={(event) => {
event.preventDefault(); event.preventDefault();
@ -1666,7 +1666,7 @@
class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded p-1 mt-4" class="bg-secondary w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded p-1 mt-4"
> >
{#each tabs as item, i} {#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0} {#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button <button
on:click={() => goto("/pricing")} on:click={() => goto("/pricing")}
class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1" class="cursor-pointer group relative z-1 rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1"