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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
export let title;
const exportData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row
const csvRows = [];
@ -58,7 +58,9 @@
>
<span class="truncate text-white">Download</span>
<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"
viewBox="0 0 24 24"
><path

View File

@ -43,7 +43,7 @@
{#each highDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -66,7 +66,7 @@
{#each avgDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
class="w-4 h-4 ml-0.5 mb-1 inline-block text-[#A3A3A3]"
@ -89,7 +89,7 @@
{#each lowDataList as item, index}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
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}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
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}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
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}
<td class="px-1 py-[3px] text-sm sm:text-[1rem]">
{#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"
>Pro<svg
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"

View File

@ -86,7 +86,7 @@
if (isAChecked !== isBChecked) return isAChecked ? -1 : 1;
// 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 isBPriority = proOnlyItems.has(b?.name);
@ -225,7 +225,7 @@
{#each searchQuery?.length !== 0 ? testList : allRows as item}
<DropdownMenu.Item class="sm:hover:bg-primary">
<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
on:click|capture={(event) => {
event.preventDefault();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -309,7 +309,7 @@
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}
{#if data?.user?.tier === "Pro" || index === 0}
{#if ["Pro", "Plus"]?.includes(data?.user?.tier) || index === 0}
<label
on:click={() => (timePeriod = item)}
class="px-3 py-1 {timePeriod === item
@ -318,7 +318,7 @@
>
{item}
</label>
{:else if data?.user?.tier !== "Pro"}
{:else if !["Pro", "Plus"]?.includes(data?.user?.tier)}
<a
href="/pricing"
class="px-3 py-1 flex flex-row items-center {timePeriod === item

View File

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

View File

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

View File

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

View File

@ -1,8 +1,9 @@
<script lang="ts">
export let data;
export let display = false;
</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="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl text-center">

View File

@ -176,7 +176,7 @@
</div>
<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">
{item?.text?.slice(0, 50) + "..."}
Unlock content with

View File

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

View File

@ -71,7 +71,7 @@
{/if}
<!--
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial === true}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) || data?.user?.freeTrial === true}
<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"
>
@ -398,7 +398,7 @@
{#if recentWIIM?.length !== 0}
<ul style="padding-left: 5px;">
{#each recentWIIM as item, index}
{#if index >= 3 && data?.user?.tier !== "Pro"}
{#if index >= 3 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<li
class="text-sm sm:text-[1rem]"
style="margin-left: 8px; margin-bottom: 15px; list-style-type: disc;"
@ -587,7 +587,7 @@
{#if data?.getDashboard?.upcomingEarnings?.length !== 0}
<ul style="padding-left: 5px;">
{#each data?.getDashboard?.upcomingEarnings as item, index}
{#if index >= 3 && data?.user?.tier !== "Pro"}
{#if index >= 3 && !["Pro", "Plus"]?.includes(data?.user?.tier)}
<li
class="text-sm sm:text-[1rem]"
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();
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output;
output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.reverse()?.slice(0, 6) : output;
return output;
};

View File

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

View File

@ -407,7 +407,7 @@
<td
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">
<span
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();
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output;
output = !["Pro", "Plus"]?.includes(user?.tier) ? output?.reverse()?.slice(0, 6) : 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 (user?.tier !== 'Pro') {
if (!["Pro","Plus"]?.includes(user?.tier)) {
const totalAlerts = await pb.collection("priceAlert").getFullList({
// Ensure the filter checks for a boolean 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.
const isProUser = user?.tier === "Pro";
const isProUser = user?.tier === "Pro" || user?.tier === "Plus";
const tickerLimit = isProUser ? 100 : 5;
try {

View File

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

View File

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

View File

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

View File

@ -122,7 +122,7 @@
if (activeIdx === 0) {
tableList = filterEndOfYearDates(rawData);
} else {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
tableList = filterEndOfQuarterDates(rawData);
} else {
goto("/pricing");
@ -790,7 +790,8 @@
>
{item.title}
<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"
xmlns="http://www.w3.org/2000/svg"

View File

@ -47,7 +47,7 @@
</div>
</main>
<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
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);
// 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!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

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

View File

@ -66,7 +66,7 @@
>
<ul class="flex flex-row items-center w-full text-white">
<a
href={`/stocks/${$etfTicker}/options`}
href={`/etf/${$etfTicker}/options`}
on:click={() => changeSubSection("overview")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'overview'
? 'text-white bg-primary/90'
@ -75,7 +75,7 @@
Overview
</a>
<a
href={`/stocks/${$etfTicker}/options/unusual-activity`}
href={`/etf/${$etfTicker}/options/unusual-activity`}
on:click={() => changeSubSection("unusual-activity")}
class="p-2 px-5 cursor-pointer {displaySubSection ===
'unusual-activity'
@ -85,7 +85,7 @@
Unusual Activity
</a>
<a
href={`/stocks/${$etfTicker}/options/hottest-contracts`}
href={`/etf/${$etfTicker}/options/hottest-contracts`}
on:click={() => changeSubSection("hottest-contracts")}
class="p-2 px-5 cursor-pointer {displaySubSection ===
'hottest-contracts'
@ -95,7 +95,7 @@
Hottest Contracts
</a>
<a
href={`/stocks/${$etfTicker}/options/volatility`}
href={`/etf/${$etfTicker}/options/volatility`}
on:click={() => changeSubSection("volatility")}
class="p-2 px-5 cursor-pointer {displaySubSection ===
'volatility'
@ -105,7 +105,7 @@
Volatility
</a>
<a
href={`/stocks/${$etfTicker}/options/oi`}
href={`/etf/${$etfTicker}/options/oi`}
on:click={() => changeSubSection("oi")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'oi'
? 'text-white bg-primary/90'
@ -115,7 +115,7 @@
</a>
<a
href={`/stocks/${$etfTicker}/options/gex`}
href={`/etf/${$etfTicker}/options/gex`}
on:click={() => changeSubSection("gex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'gex'
? 'text-white bg-primary/90'
@ -124,7 +124,7 @@
GEX
</a>
<a
href={`/stocks/${$etfTicker}/options/dex`}
href={`/etf/${$etfTicker}/options/dex`}
on:click={() => changeSubSection("dex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'dex'
? '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 +
1 ===
optionList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro'
!['Pro']?.includes(data?.user?.tier)
? 'opacity-[0.1]'
: ''}"
>
@ -624,7 +624,7 @@
</table>
</div>
<UpgradeToPro {data} />
<UpgradeToPro {data} display={true} />
{/if}
{/if}
</div>

View File

@ -10,7 +10,7 @@ export const load = async ({ locals }) => {
});
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;
};

View File

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

View File

@ -17,7 +17,7 @@ export const load = async ({ params, locals }) => {
});
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;
};

View File

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

View File

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

View File

@ -102,7 +102,10 @@
updatedTickers.push($indexTicker);
// 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!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

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

View File

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

View File

@ -12,7 +12,7 @@ export const load = async ({ locals }) => {
});
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;
};

View File

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

View File

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

View File

@ -671,7 +671,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 ===
originalPosTickers?.length &&
data?.user?.tier !== 'Pro'
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]'
: ''}"
>
@ -776,7 +776,7 @@
class="sm:hover:bg-[#245073]/10 border-b border-gray-800 odd:bg-odd {index +
1 ===
originalNegTickers?.length &&
data?.user?.tier !== 'Pro'
!['Pro', 'Plus']?.includes(data?.user?.tier)
? '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 getMarketMover = async () => {
@ -14,7 +14,6 @@ export const load = async ({ locals, setHeaders }) => {
});
const output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
return output;
};

View File

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

View File

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

View File

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

View File

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

View File

@ -140,7 +140,8 @@
<tr
class="bg-table odd:bg-odd border-bborder-gray-800 {index +
1 ===
rawData?.length && data?.user?.tier !== 'Pro'
rawData?.length &&
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]'
: ''}"
>
@ -256,7 +257,7 @@
</main>
<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
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.Group>
{#each updatedSectorList as sector}
{#if sector === "S&P500" || data?.user?.tier === "Pro"}
{#if sector === "S&P500" || ["Pro", "Plus"]?.includes(data?.user?.tier)}
<DropdownMenu.Item
on:click={() => (selectedSector = sector)}
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"

View File

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

View File

@ -1471,7 +1471,7 @@
}
async function handleCreateStrategy() {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const closePopup = document.getElementById("addStrategy");
closePopup?.dispatchEvent(new MouseEvent("click"));
} else {
@ -1643,7 +1643,7 @@
function changeRule(state: string) {
if (
data?.user?.tier !== "Pro" &&
!["Pro", "Plus"]?.includes(data?.user?.tier) &&
[
"gexRatio",
"ivRank",
@ -3723,7 +3723,7 @@ const handleKeyDown = (event) => {
<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"
>
{#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)}>
<svg
class="w-4 h-4 mb-1 inline-block text-[#A3A3A3] sm:hover:text-white cursor-pointer"

View File

@ -46,7 +46,7 @@
</div>
</main>
<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
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);
// 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!", {
style:
"border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;",

View File

@ -196,7 +196,7 @@
displayStatement = "revenue";
const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement;
if (!data || data.length === 0) {
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -475,7 +475,7 @@
>
<span class="truncate text-white">Download</span>
<svg
class="{data?.user?.tier === 'Pro'
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"

View File

@ -232,7 +232,7 @@
displayStatement = "revenue";
const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement;
if (!data || data.length === 0) {
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -510,7 +510,7 @@
>
<span class="truncate text-white">Download</span>
<svg
class="{data?.user?.tier === 'Pro'
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"

View File

@ -194,7 +194,7 @@
fullStatement = data?.getData;
const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement;
if (!data || data.length === 0) {
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -472,7 +472,7 @@
>
<span class="truncate text-white">Download</span>
<svg
class="{data?.user?.tier === 'Pro'
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"

View File

@ -183,7 +183,7 @@
fullStatement = data?.getData;
const exportFundamentalData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
const data = fullStatement;
if (!data || data.length === 0) {
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -461,7 +461,7 @@
>
<span class="truncate text-white">Download</span>
<svg
class="{data?.user?.tier === 'Pro'
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"

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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -886,7 +886,7 @@
{/if}
</div>
{#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">
{data?.getAnalystInsight?.insight}
</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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"
@ -369,13 +369,13 @@
</tr>
</thead>
<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
class=" {latestInfoDate(item?.date)
? 'bg-[#F9AB00]/10'
: 'odd:bg-odd '} {index + 1 ===
historyList?.slice(0, 3)?.length &&
data?.user?.tier !== 'Pro'
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]'
: ''}"
>
@ -549,7 +549,7 @@
{#if rawData?.length !== 0}
<UpgradeToPro {data} />
{/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="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl md:text-center">

View File

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

View File

@ -557,7 +557,7 @@
class="text-white odd:bg-odd border-b border-gray-800 {index +
1 ===
insiderTradingList?.slice(0, 6)?.length &&
data?.user?.tier !== 'Pro'
!['Pro', 'Plus']?.includes(data?.user?.tier)
? 'opacity-[0.1]'
: ''}"
>
@ -627,7 +627,7 @@
</table>
</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
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"

View File

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

View File

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

View File

@ -180,7 +180,7 @@
}
const exportData = (format = "csv") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row
const csvRows = [];
csvRows.push("Date,Employees,Change,Growth");
@ -489,7 +489,7 @@
>
<span class="truncate text-white">Download</span>
<svg
class="{data?.user?.tier === 'Pro'
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"

View File

@ -81,7 +81,7 @@
</main>
<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
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") => {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
// Add headers row
const csvRows = [];
csvRows.push("date,market-cap");
@ -629,7 +629,7 @@
>Download</span
>
<svg
class="{data?.user?.tier === 'Pro'
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"
@ -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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"

View File

@ -17,7 +17,7 @@ export const load = async ({ locals, params }) => {
});
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;
};

View File

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

View File

@ -47,7 +47,7 @@
</main>
<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
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"

View File

@ -601,7 +601,7 @@
}
async function handleSelectAll() {
if (data?.user?.tier === "Pro") {
if (["Pro", "Plus"]?.includes(data?.user?.tier)) {
searchQuery = "";
ruleOfList = allRows;
ruleOfList = [...ruleOfList];
@ -611,7 +611,7 @@
saveRules();
} else {
toast.error("Only for Pro Members", {
toast.error("Only for Plus & Pro Members", {
style:
"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
if (data?.user?.tier !== "Pro") {
if (!["Pro", "Plus"]?.includes(data?.user?.tier)) {
ruleOfList = ruleOfList.filter((item) =>
excludedRules.has(item?.rule),
);
@ -846,7 +846,7 @@
}
// 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 isBPriority = proOnlyItems.has(b?.name);
@ -1402,7 +1402,7 @@
/>
<span class="ml-2">{item?.name}</span>
</label>
{:else if data?.user?.tier === "Pro" || excludedRules?.has(item?.rule)}
{:else if ["Pro", "Plus"]?.includes(data?.user?.tier) || excludedRules?.has(item?.rule)}
<label
on:click|capture={(event) => {
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"
>
{#each tabs as item, i}
{#if data?.user?.tier !== "Pro" && i > 0}
{#if !["Pro", "Plus"]?.includes(data?.user?.tier) && i > 0}
<button
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"