adding paywalls back
This commit is contained in:
parent
5997bcca9a
commit
cd989a6547
@ -589,7 +589,7 @@ $: {
|
||||
<Card.Title>Upgrade to Pro</Card.Title>
|
||||
<Card.Description>
|
||||
{#if !data?.user || data?.user?.tier !== 'Pro' || data?.user?.freeTrial === true}
|
||||
Support the Platform to be always free ❤
|
||||
Get unlimit access to all features
|
||||
{/if}
|
||||
</Card.Description>
|
||||
</Card.Header>
|
||||
@ -900,7 +900,7 @@ $: {
|
||||
<Card.Header class="p-2 pt-0 md:p-4">
|
||||
<Card.Title>Upgrade to Pro</Card.Title>
|
||||
<Card.Description>
|
||||
Support the Platform to be always free ❤
|
||||
Get unlimit access to all features
|
||||
</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content class="p-2 pt-0 md:p-4 md:pt-0">
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang='ts'>
|
||||
import { goto } from '$app/navigation';
|
||||
import { numberOfUnreadNotification } from '$lib/store';
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@ -261,7 +261,7 @@ $: {
|
||||
<tbody>
|
||||
{#each analytRatingList as item, index}
|
||||
|
||||
<tr on:click={() => goto(`/analysts/${item?.analystId}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] cursor-pointer">
|
||||
<tr on:click={() => goto(`/analysts/${item?.analystId}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] {index+1 === rawData?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''} cursor-pointer">
|
||||
<td class="text-white text-sm sm:text-[1rem] font-semibold text-white text-center">
|
||||
{item?.rank}
|
||||
</td>
|
||||
@ -329,8 +329,7 @@ $: {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--<UpgradeToPro data={data} title="Get stock forecasts from Wall Street's highest rated professionals"/>-->
|
||||
|
||||
<UpgradeToPro data={data} title="Get stock forecasts from Wall Street's highest rated professionals"/>
|
||||
{:else}
|
||||
<div class="flex justify-center items-center h-80">
|
||||
<div class="relative">
|
||||
@ -400,4 +399,4 @@ $: {
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
</section>
|
||||
@ -22,7 +22,7 @@ export const load = async ({ parent }) => {
|
||||
setCache("", output, "getTopAnalyst");
|
||||
}
|
||||
|
||||
//output = user?.tier !== 'Pro' ? output?.reverse()?.slice(0,6) : output;
|
||||
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { numberOfUnreadNotification, screenWidth } from '$lib/store';
|
||||
import { abbreviateNumber } from '$lib/utils';
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
|
||||
@ -297,8 +297,7 @@ $: {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--<UpgradeToPro data={data} title="Get stock forecasts from Wall Street's highest rated professionals"/>-->
|
||||
|
||||
<UpgradeToPro data={data} title="Get stock forecasts from Wall Street's highest rated professionals"/>
|
||||
{:else}
|
||||
<div class="flex justify-center items-center h-80">
|
||||
<div class="relative">
|
||||
|
||||
@ -22,7 +22,7 @@ export const load = async ({ parent }) => {
|
||||
setCache("", output, "getTopAnalystStocksg");
|
||||
}
|
||||
|
||||
//output = user?.tier !== 'Pro' ? output?.reverse()?.slice(0,6) : output;
|
||||
output = user?.tier !== "Pro" ? output?.reverse()?.slice(0, 6) : output;
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import { numberOfUnreadNotification, screenWidth } from '$lib/store';
|
||||
import InfiniteLoading from '$lib/components/InfiniteLoading.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
|
||||
|
||||
@ -224,18 +224,14 @@ $: charNumber = $screenWidth < 640 ? 15 : 40;
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<InfiniteLoading on:infinite={infiniteHandler} />
|
||||
<!--<UpgradeToPro data={data} title="Get the latest dark pool trades in realtime from Hedge Funds & Major Institutional Traders"/>-->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<UpgradeToPro data={data} title="Get the latest lobbying spendings in realtime of US stock companies"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{:else}
|
||||
<div class="flex justify-center items-center h-80">
|
||||
<div class="relative">
|
||||
|
||||
@ -1,39 +1,34 @@
|
||||
import {getCache, setCache } from '$lib/store';
|
||||
|
||||
|
||||
|
||||
export const load = async ({parent}) => {
|
||||
import { getCache, setCache } from "$lib/store";
|
||||
|
||||
export const load = async ({ parent }) => {
|
||||
const getCorporateLobbyingTracker = async () => {
|
||||
let output;
|
||||
const { apiKey, apiURL, user } = await parent();
|
||||
|
||||
const cachedData = getCache('', 'getCorporateLobbyingTracker');
|
||||
const cachedData = getCache("", "getCorporateLobbyingTracker");
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
|
||||
const { apiKey, apiURL } = await parent();
|
||||
const response = await fetch(apiURL + "/lobbying-tracker", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-API-KEY": apiKey,
|
||||
},
|
||||
});
|
||||
|
||||
const response = await fetch(apiURL + '/lobbying-tracker', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
"Content-Type": "application/json", "X-API-KEY": apiKey
|
||||
},
|
||||
});
|
||||
|
||||
output = await response.json();
|
||||
|
||||
setCache('', output, 'getCorporateLobbyingTracker');
|
||||
output = await response.json();
|
||||
|
||||
setCache("", output, "getCorporateLobbyingTracker");
|
||||
}
|
||||
|
||||
//output = data?.user?.tier !== 'Pro' ? output?.slice(0,6) : output;
|
||||
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getCorporateLobbyingTracker: await getCorporateLobbyingTracker()
|
||||
getCorporateLobbyingTracker: await getCorporateLobbyingTracker(),
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
import InfiniteLoading from '$lib/components/InfiniteLoading.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
|
||||
@ -203,7 +204,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<InfiniteLoading on:infinite={infiniteHandler} />
|
||||
<!--<UpgradeToPro data={data} title="Get the latest dark pool trades in realtime from Hedge Funds & Major Institutional Traders"/>-->
|
||||
<UpgradeToPro data={data} title="Get the latest dark pool trades in realtime from Hedge Funds & Major Institutional Traders"/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -22,7 +22,9 @@ export const load = async ({ parent }) => {
|
||||
setCache("", output, "getCramerTracker");
|
||||
}
|
||||
|
||||
//output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
|
||||
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
|
||||
|
||||
//output = data?.user?.tier !== 'Pro' ? output?.slice(0,6) : output;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
import { abbreviateNumber } from '$lib/utils';
|
||||
import InfoModal from '$lib/components/InfoModal.svelte';
|
||||
import { onMount } from 'svelte'
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import { init, use } from 'echarts/core'
|
||||
import { BarChart,LineChart } from 'echarts/charts'
|
||||
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||
@ -411,10 +411,12 @@ onMount(async () => {
|
||||
}
|
||||
|
||||
|
||||
if(data?.user?.tier === 'Pro') {
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
return () => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -716,8 +718,8 @@ $: {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each optionList as item, index}
|
||||
<tr on:click={() => handleViewData(item?.date)} on:mouseover={() => getDailyTransactions($etfTicker+'+'+item?.date)} class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B]">
|
||||
{#each (data?.user?.tier === 'Pro' ? optionList : optionList?.slice(0,3)) as item, index}
|
||||
<tr on:click={() => handleViewData(item?.date)} on:mouseover={() => getDailyTransactions($etfTicker+'+'+item?.date)} class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B] {index+1 === optionList?.slice(0,3)?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''}">
|
||||
|
||||
<td class="text-white text-sm sm:text-[1rem] text-start">
|
||||
{formatDate(item?.date)}
|
||||
@ -809,8 +811,8 @@ $: {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each optionChainList as item, index}
|
||||
<tr class="odd:bg-[#27272A] border-b-[#09090B]">
|
||||
{#each (data?.user?.tier === 'Pro' ? optionChainList : optionChainList?.slice(0,3)) as item, index}
|
||||
<tr class="odd:bg-[#27272A] border-b-[#09090B] {index+1 === optionChainList?.slice(0,3)?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''}">
|
||||
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end">
|
||||
{abbreviateNumber(item?.total_premium_call,true)}
|
||||
@ -856,7 +858,7 @@ $: {
|
||||
|
||||
</div>
|
||||
|
||||
<!---<UpgradeToPro data={data} title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"/>-->
|
||||
<UpgradeToPro data={data} title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"/>
|
||||
|
||||
{:else}
|
||||
<div class="flex justify-center items-center m-auto mt-16 mb-6">
|
||||
@ -891,8 +893,15 @@ $: {
|
||||
<!-- Put this part before </body> tag -->
|
||||
|
||||
<dialog id="optionDetailsDesktopModal" class="modal modal-bottom sm:modal-middle cursor-pointer ">
|
||||
<div class="modal-box w-full max-w-xl lg:max-w-3xl xl:max-w-5xl bg-[#09090B] border-t sm:border border-gray-600 h-auto">
|
||||
<p class="text-gray-200 mt-10 cursor-text">
|
||||
<div class="modal-box w-full max-w-xl lg:max-w-3xl xl:max-w-5xl bg-[#141417] sm:bg-[#09090B] border-t sm:border border-gray-600 h-auto">
|
||||
<form method="dialog" class="modal-backdrop backdrop-blur-[4px]">
|
||||
<button class="cursor-pointer absolute right-0 top-0 text-[1.8rem] text-white">
|
||||
<svg class="w-8 h-8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="text-gray-200 mt-10 cursor-text">
|
||||
<span class="text-white text-xl font-semibold mb-4">Option Data Details:</span>
|
||||
<br class="">
|
||||
{#if optionHistoryList?.length !== 0}
|
||||
@ -1005,10 +1014,8 @@ $: {
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop backdrop-blur-[4px]">
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import { numberOfUnreadNotification, screenWidth } from '$lib/store';
|
||||
import { abbreviateNumber } from '$lib/utils';
|
||||
import { onMount } from 'svelte';
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ async function handleScroll() {
|
||||
<tbody>
|
||||
{#each stockList as item, index}
|
||||
|
||||
<tr on:click={() => goto(`/${item?.assetType}/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] cursor-pointer">
|
||||
<tr on:click={() => goto(`/${item?.assetType}/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] {index+1 === stockList?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''} cursor-pointer">
|
||||
<td class="text-white text-sm sm:text-[1rem] font-medium text-white text-end">
|
||||
{index+1}
|
||||
</td>
|
||||
@ -216,7 +216,7 @@ async function handleScroll() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--<UpgradeToPro data={data} title="Get the top 100 stocks that retail investors put their money on the market to never miss out the next hype"/>-->
|
||||
<UpgradeToPro data={data} title="Get the top 100 stocks that retail investors put their money on the market to never miss out the next hype"/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ export const load = async ({ parent }) => {
|
||||
setCache("", output, "getMostRetailVolume");
|
||||
}
|
||||
|
||||
//output = user?.tier !== "Pro" ? output?.slice(0, 6) : output;
|
||||
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
import InfiniteLoading from '$lib/components/InfiniteLoading.svelte';
|
||||
import { abbreviateNumber } from '$lib/utils';
|
||||
import { onMount } from 'svelte';
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
<tbody>
|
||||
{#each shortedList as item, index}
|
||||
|
||||
<tr on:click={() => goto(`/stocks/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] cursor-pointer">
|
||||
<tr on:click={() => goto(`/stocks/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] {index+1 === shortedList?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''} cursor-pointer">
|
||||
<td class="text-white text-sm sm:text-[1rem] font-medium text-white text-end">
|
||||
{index+1}
|
||||
</td>
|
||||
@ -205,7 +205,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<InfiniteLoading on:infinite={infiniteHandler} />
|
||||
<!--<UpgradeToPro data={data} title="Get the most shorted stocks on the market to never miss out the next short squeeze"/>-->
|
||||
<UpgradeToPro data={data} title="Get the most shorted stocks on the market to never miss out the next short squeeze"/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ export const load = async ({ parent }) => {
|
||||
setCache("", output, "getMostShortedStocks");
|
||||
}
|
||||
|
||||
//output = user?.tier !== "Pro" ? output?.slice(0, 6) : output;
|
||||
output = user?.tier !== "Pro" ? output?.slice(0, 6) : output;
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
@ -56,10 +56,10 @@ async function purchasePlan(subscriptionType:string='') {
|
||||
|
||||
}
|
||||
else if(mode) {
|
||||
subId = import.meta.env.VITE_LEMON_SQUEEZY_ANNUAL_ID
|
||||
subId = import.meta.env.VITE_LEMON_SQUEEZY_ANNUAL_19_99_ID
|
||||
}
|
||||
else {
|
||||
subId = import.meta.env.VITE_LEMON_SQUEEZY_MONTHLY_ID
|
||||
subId = import.meta.env.VITE_LEMON_SQUEEZY_MONTHLY_1_99_ID
|
||||
}
|
||||
const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
||||
const checkoutUrl =
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { numberOfUnreadNotification, displayCompanyName, stockTicker, analystInsightComponent, sentimentComponent, trendAnalysisComponent, priceAnalysisComponent, fundamentalAnalysisComponent } from "$lib/store";
|
||||
import PriceAnalysis from "$lib/components/PriceAnalysis.svelte";
|
||||
import TrendAnalysis from "$lib/components/TrendAnalysis.svelte";
|
||||
import FundamentalAnalysis from "$lib/components/FundamentalAnalysis.svelte";
|
||||
import SentimentAnalysis from "$lib/components/SentimentAnalysis.svelte";
|
||||
import AnalystInsight from "$lib/components/AnalystInsight.svelte";
|
||||
|
||||
import Lazy from "$lib/components/Lazy.svelte";
|
||||
|
||||
export let data;
|
||||
@ -33,41 +39,31 @@
|
||||
<div class="sm:p-7 w-full m-auto mt-2 sm:mt-0">
|
||||
<Lazy>
|
||||
<div class="w-full mt-10 sm:mt-0 m-auto sm:pt-6 {!$analystInsightComponent ? 'hidden' : ''}">
|
||||
{#await import("$lib/components/AnalystInsight.svelte") then { default: Comp }}
|
||||
<svelte:component this={Comp} {data} />
|
||||
{/await}
|
||||
<AnalystInsight data={data} />
|
||||
</div>
|
||||
</Lazy>
|
||||
|
||||
<Lazy>
|
||||
<div class="w-full mt-10 sm:mt-5 m-auto sm:pb-6 sm:pt-6 {!$priceAnalysisComponent ? 'hidden' : ''}">
|
||||
{#await import("$lib/components/PriceAnalysis.svelte") then { default: Comp }}
|
||||
<svelte:component this={Comp} {data} />
|
||||
{/await}
|
||||
<PriceAnalysis data={data} />
|
||||
</div>
|
||||
</Lazy>
|
||||
|
||||
<Lazy>
|
||||
<div class="w-full mt-10 sm:mt-5 m-auto sm:pb-6 sm:pt-6 {!$trendAnalysisComponent ? 'hidden' : ''}">
|
||||
{#await import("$lib/components/TrendAnalysis.svelte") then { default: Comp }}
|
||||
<svelte:component this={Comp} {data} />
|
||||
{/await}
|
||||
<TrendAnalysis data={data} />
|
||||
</div>
|
||||
</Lazy>
|
||||
|
||||
<Lazy>
|
||||
<div class="w-full mt-10 sm:mt-5 m-auto sm:pb-6 sm:pt-6 {!$fundamentalAnalysisComponent ? 'hidden' : ''}">
|
||||
{#await import("$lib/components/FundamentalAnalysis.svelte") then { default: Comp }}
|
||||
<svelte:component this={Comp} {data} />
|
||||
{/await}
|
||||
<FundamentalAnalysis data={data} />
|
||||
</div>
|
||||
</Lazy>
|
||||
|
||||
<Lazy>
|
||||
<div class="w-full mt-10 sm:mt-5 m-auto sm:pb-6 sm:pt-6 {!$sentimentComponent ? 'hidden' : ''}">
|
||||
{#await import("$lib/components/SentimentAnalysis.svelte") then { default: Comp }}
|
||||
<svelte:component this={Comp} {data} />
|
||||
{/await}
|
||||
<SentimentAnalysis data={data} />
|
||||
</div>
|
||||
</Lazy>
|
||||
</div>
|
||||
|
||||
@ -1,36 +1,32 @@
|
||||
import { getCache, setCache } from '$lib/store';
|
||||
|
||||
import { getCache, setCache } from "$lib/store";
|
||||
|
||||
export const load = async ({ parent, params }) => {
|
||||
|
||||
const getAnalystTickerHistory = async () => {
|
||||
|
||||
let output;
|
||||
|
||||
const cachedData = getCache(params.tickerID, 'getAnalystTickerHistory');
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
const cachedData = getCache(params.tickerID, "getAnalystTickerHistory");
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
const { apiURL, apiKey } = await parent();
|
||||
|
||||
const {apiURL, apiKey} = await parent();
|
||||
|
||||
const postData = {
|
||||
ticker: params.tickerID
|
||||
};
|
||||
const postData = {
|
||||
ticker: params.tickerID,
|
||||
};
|
||||
|
||||
// make the POST request to the endpoint
|
||||
const response = await fetch(apiURL + '/analyst-ticker-history', {
|
||||
method: 'POST',
|
||||
const response = await fetch(apiURL + "/analyst-ticker-history", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json", "X-API-KEY": apiKey
|
||||
"Content-Type": "application/json",
|
||||
"X-API-KEY": apiKey,
|
||||
},
|
||||
body: JSON.stringify(postData)
|
||||
body: JSON.stringify(postData),
|
||||
});
|
||||
|
||||
output = await response.json();
|
||||
output = await response.json();
|
||||
|
||||
setCache(params.tickerID, output, 'getAnalystTickerHistory');
|
||||
|
||||
setCache(params.tickerID, output, "getAnalystTickerHistory");
|
||||
}
|
||||
|
||||
return output;
|
||||
@ -38,6 +34,6 @@ export const load = async ({ parent, params }) => {
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getAnalystTickerHistory: await getAnalystTickerHistory()
|
||||
getAnalystTickerHistory: await getAnalystTickerHistory(),
|
||||
};
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@ import { displayCompanyName, numberOfUnreadNotification, stockTicker } from '$li
|
||||
import InfiniteLoading from '$lib/components/InfiniteLoading.svelte';
|
||||
import { formatString, abbreviateNumber } from '$lib/utils';
|
||||
import InfoModal from '$lib/components/InfoModal.svelte';
|
||||
//import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
|
||||
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
|
||||
import { Chart } from 'svelte-echarts'
|
||||
import { init, use } from 'echarts/core'
|
||||
import { LineChart, BarChart } from 'echarts/charts'
|
||||
@ -536,8 +536,8 @@ onMount(async() => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each insiderTradingList as item, index}
|
||||
<tr class="text-white odd:bg-[#27272A]">
|
||||
{#each (data?.user?.tier === 'Pro' ? insiderTradingList : insiderTradingList?.slice(0,3)) as item, index}
|
||||
<tr class="text-white odd:bg-[#27272A] {index+1 === insiderTradingList?.slice(0,3)?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''}">
|
||||
|
||||
<td class="text-white text-sm sm:text-[1rem] border-b border-[#09090B] whitespace-nowrap">
|
||||
<div class="flex flex-col">
|
||||
@ -587,7 +587,7 @@ onMount(async() => {
|
||||
<InfiniteLoading on:infinite={infiniteHandler} />
|
||||
{/if}
|
||||
|
||||
<!--<UpgradeToPro data={data} title="Access {$displayCompanyName}'s insider transactions to track executive selling and purchasing activity"/>-->
|
||||
<UpgradeToPro data={data} title="Access {$displayCompanyName}'s insider transactions to track executive selling and purchasing activity"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
import { abbreviateNumber } from '$lib/utils';
|
||||
import InfoModal from '$lib/components/InfoModal.svelte';
|
||||
import { onMount } from 'svelte'
|
||||
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
|
||||
import { init, use } from 'echarts/core'
|
||||
import { BarChart,LineChart } from 'echarts/charts'
|
||||
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||
@ -411,10 +411,12 @@ onMount(async () => {
|
||||
}
|
||||
|
||||
|
||||
if(data?.user?.tier === 'Pro') {
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
return () => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -716,8 +718,8 @@ $: {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each optionList as item, index}
|
||||
<tr on:click={() => handleViewData(item?.date)} on:mouseover={() => getDailyTransactions($stockTicker+'+'+item?.date)} class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B]">
|
||||
{#each (data?.user?.tier === 'Pro' ? optionList : optionList?.slice(0,3)) as item, index}
|
||||
<tr on:click={() => handleViewData(item?.date)} on:mouseover={() => getDailyTransactions($stockTicker+'+'+item?.date)} class="cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B] {index+1 === optionList?.slice(0,3)?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''}">
|
||||
|
||||
<td class="text-white text-sm sm:text-[1rem] text-start">
|
||||
{formatDate(item?.date)}
|
||||
@ -809,8 +811,8 @@ $: {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each optionChainList as item, index}
|
||||
<tr class="odd:bg-[#27272A] border-b-[#09090B]">
|
||||
{#each (data?.user?.tier === 'Pro' ? optionChainList : optionChainList?.slice(0,3)) as item, index}
|
||||
<tr class="odd:bg-[#27272A] border-b-[#09090B] {index+1 === optionChainList?.slice(0,3)?.length && data?.user?.tier !== 'Pro' ? 'opacity-[0.1]' : ''}">
|
||||
|
||||
<td class="text-white text-sm sm:text-[1rem] text-end">
|
||||
{abbreviateNumber(item?.total_premium_call,true)}
|
||||
@ -856,7 +858,7 @@ $: {
|
||||
|
||||
</div>
|
||||
|
||||
<!---<UpgradeToPro data={data} title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"/>-->
|
||||
<UpgradeToPro data={data} title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"/>
|
||||
|
||||
{:else}
|
||||
<div class="flex justify-center items-center m-auto mt-16 mb-6">
|
||||
@ -891,8 +893,15 @@ $: {
|
||||
<!-- Put this part before </body> tag -->
|
||||
|
||||
<dialog id="optionDetailsDesktopModal" class="modal modal-bottom sm:modal-middle cursor-pointer ">
|
||||
<div class="modal-box w-full max-w-xl lg:max-w-3xl xl:max-w-5xl bg-[#09090B] border-t sm:border border-gray-600 h-auto">
|
||||
<p class="text-gray-200 mt-10 cursor-text">
|
||||
<div class="modal-box w-full max-w-xl lg:max-w-3xl xl:max-w-5xl bg-[#141417] sm:bg-[#09090B] border-t sm:border border-gray-600 h-auto">
|
||||
<form method="dialog" class="modal-backdrop backdrop-blur-[4px]">
|
||||
<button class="cursor-pointer absolute right-0 top-0 text-[1.8rem] text-white">
|
||||
<svg class="w-8 h-8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="text-gray-200 mt-10 cursor-text">
|
||||
<span class="text-white text-xl font-semibold mb-4">Option Data Details:</span>
|
||||
<br class="">
|
||||
{#if optionHistoryList?.length !== 0}
|
||||
@ -1005,10 +1014,8 @@ $: {
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop backdrop-blur-[4px]">
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
@ -521,9 +521,16 @@ $: {
|
||||
</label>
|
||||
</li>
|
||||
<li class="w-full">
|
||||
{#if data?.user?.tier === 'Pro'}
|
||||
<label on:click={() => filterRule = 'quartely'} class="cursor-pointer inline-block w-full py-2.5 {filterRule === 'quartely' ? 'bg-purple-600' : 'bg-[#2A303C]'} font-semibold text-white rounded-r-lg">
|
||||
Quartely
|
||||
</label>
|
||||
{:else}
|
||||
<a href="/pricing" class="flex flex-row items-center m-auto justify-center cursor-pointer inline-block w-full py-2.5 bg-[#2A303C] font-semibold text-white rounded-r-lg">
|
||||
<span class="">Quarterly</span>
|
||||
<svg class="ml-1 -mt-0.5 w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#A3A3A3" d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"/></svg>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -487,9 +487,16 @@ $: {
|
||||
</label>
|
||||
</li>
|
||||
<li class="w-full">
|
||||
{#if data?.user?.tier === 'Pro'}
|
||||
<label on:click={() => filterRule = 'quartely'} class="cursor-pointer inline-block w-full py-2.5 {filterRule === 'quartely' ? 'bg-purple-600' : 'bg-[#2A303C]'} font-semibold text-white rounded-r-lg">
|
||||
Quartely
|
||||
</label>
|
||||
{:else}
|
||||
<a href="/pricing" class="flex flex-row items-center m-auto justify-center cursor-pointer inline-block w-full py-2.5 bg-[#2A303C] font-semibold text-white rounded-r-lg">
|
||||
<span class="">Quarterly</span>
|
||||
<svg class="ml-1 -mt-0.5 w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#A3A3A3" d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"/></svg>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -454,18 +454,16 @@ $: {
|
||||
</label>
|
||||
</li>
|
||||
<li class="w-full">
|
||||
{#if data?.user?.tier === 'Pro'}
|
||||
<label on:click={() => filterRule = 'quartely'} class="cursor-pointer inline-block w-full py-2.5 {filterRule === 'quartely' ? 'bg-purple-600' : 'bg-[#2A303C]'} font-semibold text-white rounded-r-lg">
|
||||
Quartely
|
||||
</label>
|
||||
<!--
|
||||
|
||||
{:else}
|
||||
<a href="/pricing" class="flex flex-row items-center m-auto justify-center cursor-pointer inline-block w-full py-2.5 bg-[#2A303C] font-semibold text-white rounded-r-lg">
|
||||
<span class="">Quarterly</span>
|
||||
<svg class="ml-1 -mt-0.5 w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#A3A3A3" d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"/></svg>
|
||||
</a>
|
||||
{/if}
|
||||
-->
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -429,9 +429,16 @@ $: {
|
||||
</label>
|
||||
</li>
|
||||
<li class="w-full">
|
||||
{#if data?.user?.tier === 'Pro'}
|
||||
<label on:click={() => filterRule = 'quartely'} class="cursor-pointer inline-block w-full py-2.5 {filterRule === 'quartely' ? 'bg-purple-600' : 'bg-[#2A303C]'} font-semibold text-white rounded-r-lg">
|
||||
Quartely
|
||||
</label>
|
||||
{:else}
|
||||
<a href="/pricing" class="flex flex-row items-center m-auto justify-center cursor-pointer inline-block w-full py-2.5 bg-[#2A303C] font-semibold text-white rounded-r-lg">
|
||||
<span class="">Quarterly</span>
|
||||
<svg class="ml-1 -mt-0.5 w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#A3A3A3" d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"/></svg>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user