This commit is contained in:
MuslemRahimi 2024-06-20 20:54:28 +02:00
parent ddeed42306
commit f6a00edb9d
5 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<script lang='ts'> <script lang='ts'>
import {stockTicker, screenWidth, userRegion, getCache, setCache} from '$lib/store'; import {analystEstimateComponent, stockTicker, screenWidth, userRegion, getCache, setCache} from '$lib/store';
import InfoModal from '$lib/components/InfoModal.svelte'; import InfoModal from '$lib/components/InfoModal.svelte';
import { LayerCake, Html } from 'layercake'; import { LayerCake, Html } from 'layercake';
@ -87,6 +87,11 @@ const getAnalystEstimate = async (ticker) => {
// Cache the data for this specific tickerID with a specific name 'getAnalystEstimate' // Cache the data for this specific tickerID with a specific name 'getAnalystEstimate'
setCache(ticker, analystEstimateList, 'getAnalystEstimate'); setCache(ticker, analystEstimateList, 'getAnalystEstimate');
} }
if(analystEstimateList?.length !== 0) {
$analystEstimateComponent = true;
} else {
$analystEstimateComponent = false;
}
}; };

View File

@ -69,6 +69,7 @@ export const darkPoolComponent = writable(<boolean>(false));
export const enterpriseComponent = writable(<boolean>(false)); export const enterpriseComponent = writable(<boolean>(false));
export const varComponent = writable(<boolean>(false)); export const varComponent = writable(<boolean>(false));
export const sentimentComponent = writable(<boolean>(false)); export const sentimentComponent = writable(<boolean>(false));
export const analystEstimateComponent = writable(<boolean>(false));
export const strategyId = writable(<string> ("")); export const strategyId = writable(<string> (""));

View File

@ -242,7 +242,7 @@ async function loadSearchData() {
--> -->
<!-- End Image --> <!-- End Image -->
<span class="text-center flex-1 justify-center items-center text-white text-sm sm:text-[1rem]"> <span class="text-center flex-1 justify-center items-center text-white text-[1rem]">
We provide high quality We provide high quality
<span style="font-weight: 520;" class="text-[#9DED1E] italic">Wallstreet Data</span> <span style="font-weight: 520;" class="text-[#9DED1E] italic">Wallstreet Data</span>
to to
@ -254,22 +254,22 @@ async function loadSearchData() {
<!-- Start Search button --> <!-- Start Search button -->
{#if !data?.user} {#if !data?.user}
<div class="flex flex-col gap-y-4 justify-center items-center mt-8 mb-6 m-auto w-full max-w-3xl"> <div class="flex flex-col gap-y-4 justify-center items-center mt-8 mb-6 m-auto w-full max-w-3xl">
<a href="/register" class="flex flex-row items-center px-6 py-3 bg-[#9DED1E] text-black rounded-full font-medium transition duration-150 ease-in-out group"> <a href="/register" style="font-weight: 500" class="flex flex-row items-center px-6 py-3 bg-[#9DED1E] text-black text-[1rem] sm:text-lg rounded-full transition duration-150 ease-in-out group">
<span>Start Free Trial</span> <span>Start Free Trial</span>
<span class="ml-2 mt-0.5 tracking-normal group-hover:translate-x-0.5 transition-transform duration-150 ease-in-out"> <span class="ml-2 mt-0.5 tracking-normal group-hover:translate-x-0.5 transition-transform duration-150 ease-in-out">
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g transform="rotate(90 12 12)"><g fill="none"><path d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z"/><path fill="black" d="M13.06 3.283a1.5 1.5 0 0 0-2.12 0L5.281 8.939a1.5 1.5 0 0 0 2.122 2.122L10.5 7.965V19.5a1.5 1.5 0 0 0 3 0V7.965l3.096 3.096a1.5 1.5 0 1 0 2.122-2.122L13.06 3.283Z"/></g></g></svg> <svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g transform="rotate(90 12 12)"><g fill="none"><path d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z"/><path fill="black" d="M13.06 3.283a1.5 1.5 0 0 0-2.12 0L5.281 8.939a1.5 1.5 0 0 0 2.122 2.122L10.5 7.965V19.5a1.5 1.5 0 0 0 3 0V7.965l3.096 3.096a1.5 1.5 0 1 0 2.122-2.122L13.06 3.283Z"/></g></g></svg>
</span> </span>
</a> </a>
<div class="flex flex-row items-center gap-x-5 justify-center m-auto mt-3 w-ful"> <div class="flex flex-row items-center gap-x-5 justify-center m-auto mt-3 w-ful">
<span class="text-white text-xs sm:text-sm"> <span class="text-white text-sm sm:text-lg">
<svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg> <svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>
No credit card required No credit card required
</span > </span >
<span class="text-white text-xs sm:text-sm"> <span class="text-white text-sm sm:text-lg">
<svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg> <svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>
7 Days Free Trial 7 Days Free Trial
</span > </span >
<span class="text-white text-xs sm:text-sm hidden sm:block"> <span class="text-white text-sm sm:text-lg hidden sm:block">
<svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg> <svg class="w-5 h-5 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="#9DED1E" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>
Instant Access Instant Access
</span > </span >

View File

@ -1,7 +1,6 @@
import { error, fail, redirect } from "@sveltejs/kit"; import { error, fail, redirect } from "@sveltejs/kit";
import { validateData } from "$lib/utils"; import { validateData } from "$lib/utils";
import { loginUserSchema, registerUserSchema } from "$lib/schemas"; import { loginUserSchema, registerUserSchema } from "$lib/schemas";
import { oauthState, oauthVerifier, oauthProvider } from '$lib/store';
export const actions = { export const actions = {
@ -129,9 +128,6 @@ export const actions = {
maxAge: 60 maxAge: 60
}); });
oauthState.update( value => state);
oauthVerifier.update( value => verifier);
oauthProvider.update( value => providerSelected);
redirect(302,authProviderRedirect); redirect(302,authProviderRedirect);

View File

@ -3,7 +3,7 @@
import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts';
import { TrackingModeExitMode } from 'lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts';
import {getCache, setCache, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import {getCache, setCache, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store';
import { onDestroy, onMount } from 'svelte'; import { onDestroy, onMount } from 'svelte';
import BullBearSay from '$lib/components/BullBearSay.svelte'; import BullBearSay from '$lib/components/BullBearSay.svelte';
import CommunitySentiment from '$lib/components/CommunitySentiment.svelte'; import CommunitySentiment from '$lib/components/CommunitySentiment.svelte';
@ -1294,7 +1294,7 @@ function changeChartType() {
<Lazy> <Lazy>
<div class="w-full m-auto sm:pl-6 sm:pb-6 sm:pt-6"> <div class="w-full m-auto sm:pl-6 sm:pb-6 sm:pt-6 {!$analystEstimateComponent ? 'hidden' : ''}">
{#await import('$lib/components/AnalystEstimate.svelte') then {default: Comp}} {#await import('$lib/components/AnalystEstimate.svelte') then {default: Comp}}
<svelte:component this={Comp} data={data}/> <svelte:component this={Comp} data={data}/>
{/await} {/await}