-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge https://github.com/SkyCryptWebsite/SkyCryptv2 into refactor/bes…
…tiary-use-NEU-repo
- Loading branch information
Showing
3 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<script lang="ts"> | ||
import AdditionStat from "$lib/components/AdditionStat.svelte"; | ||
import Chip from "$lib/components/Chip.svelte"; | ||
import Items from "$lib/layouts/stats/Items.svelte"; | ||
import { cn } from "$lib/utils"; | ||
import type { Stats as StatsType } from "$types/stats"; | ||
import { format } from "numerable"; | ||
import { getContext } from "svelte"; | ||
const profile = getContext<StatsType>("profile"); | ||
const isle = profile.crimson_isle; | ||
</script> | ||
|
||
<Items title="Collections" class="flex-col"> | ||
<div slot="text"> | ||
{#if isle.factions.selectedFaction === "none"} | ||
{profile.username} hasn't visited the Crimson Isle yet. | ||
{:else} | ||
<AdditionStat text="Selected Faction" class="capitalize" data={isle.factions.selectedFaction} /> | ||
<AdditionStat text="Mage Reputation" data={isle.factions.magesReputation} /> | ||
<AdditionStat text="Barbarian Reputation" data={isle.factions.barbariansReputation} /> | ||
{/if} | ||
</div> | ||
|
||
{#if isle.kuudra.totalKills} | ||
<div class="flex flex-col gap-4"> | ||
<h3 class="text-xl font-semibold">Kuudra Completions</h3> | ||
<AdditionStat text="Total Completions" data={isle.kuudra.totalKills} /> | ||
<div class="flex flex-wrap gap-4"> | ||
{#each isle.kuudra.tiers as tier} | ||
{@const hasUnlocked = tier.kills} | ||
<Chip image={{ src: tier.texture }} class={cn("h-fit w-fit", { "opacity-50": !hasUnlocked })}> | ||
<div class={cn("flex flex-col")}> | ||
<div class="font-bold"> | ||
<span class="opacity-60">{tier.name}</span> | ||
<div class="text-sm"> | ||
<span class="opacity-60">Kills:</span> | ||
<span class="text-text">{format(tier.kills)}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</Chip> | ||
{/each} | ||
</div> | ||
</div> | ||
{/if} | ||
|
||
{#if isle.dojo.totalPoints} | ||
<div class="flex flex-col gap-4"> | ||
<h3 class="text-xl font-semibold">Dojo Completions</h3> | ||
<AdditionStat text="Total Points" data={format(isle.dojo.totalPoints)} maxed={isle.dojo.totalPoints >= 7000} /> | ||
<div class="flex flex-wrap gap-4"> | ||
{#each isle.dojo.challenges as challenge} | ||
{@const hasMaxed = challenge.points >= 1000} | ||
{@const hasUnlocked = challenge.points} | ||
<Chip image={{ src: challenge.texture }} class={cn("h-fit w-fit", { "opacity-50": !hasUnlocked })}> | ||
<div class={cn("flex flex-col")}> | ||
<div class="font-bold"> | ||
<span class={cn(hasMaxed ? "text-maxed" : "opacity-60")}>{challenge.name}</span> | ||
<div class="text-sm"> | ||
<span class="opacity-60">Points:</span> | ||
<span class="text-text">{format(challenge.points)}</span> | ||
</div> | ||
<div class="text-sm"> | ||
<span class="opacity-60">Rank:</span> | ||
<span class="text-text">{challenge.rank}</span> | ||
</div> | ||
<div class="text-sm"> | ||
<span class="opacity-60">Time:</span> | ||
<span class="text-text">{challenge.formattedTime}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</Chip> | ||
{/each} | ||
</div> | ||
</div> | ||
{/if} | ||
</Items> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<script lang="ts"> | ||
import AdditionStat from "$lib/components/AdditionStat.svelte"; | ||
import Chip from "$lib/components/Chip.svelte"; | ||
import Items from "$lib/layouts/stats/Items.svelte"; | ||
import { cn } from "$lib/utils"; | ||
import type { Stats as StatsType } from "$types/stats"; | ||
import { formatDate, formatDistanceToNowStrict } from "date-fns"; | ||
import { getContext } from "svelte"; | ||
const profile = getContext<StatsType>("profile"); | ||
const rift = profile.rift; | ||
</script> | ||
|
||
<Items title="Rift" class="flex-col"> | ||
<div slot="text"> | ||
<AdditionStat text="Motes" data={rift.motes.purse} asterisk={true}> | ||
<div class="flex flex-col gap-4"> | ||
<div class="text-sm font-bold"> | ||
<span class="text-text/85">Lifetime Motes:</span> | ||
<span class="text-text"> | ||
{rift.motes.lifetime} | ||
</span> | ||
<span class="block font-normal">Total Motes earned in Rift.</span> | ||
</div> | ||
<div class="text-sm font-bold"> | ||
<span class="text-text/85">Motes Orbs:</span> | ||
<span class="text-text"> | ||
{rift.motes.orbs} | ||
</span> | ||
<span class="block font-normal">Amount of Mote Orbs player has picked up inside of the Rift.</span> | ||
</div> | ||
</div> | ||
</AdditionStat> | ||
<AdditionStat text="Enigma Souls" data="{rift.enigma.souls} / {rift.enigma.totalSouls}" maxed={rift.enigma.souls === rift.enigma.totalSouls} asterisk={true}> | ||
<div class="text-sm font-bold"> | ||
<span class="text-text/85">Progress:</span> | ||
<span class="text-text"> | ||
{((rift.enigma.souls / rift.enigma.totalSouls) * 100).toFixed(2)}% | ||
</span> | ||
<span class="block font-normal"> Percentage of Enigma Souls found. </span> | ||
</div> | ||
</AdditionStat> | ||
<AdditionStat text="McGrubber's Burgers" data="{rift.castle.grubberStacks} / {rift.castle.maxBurgers}" maxed={rift.castle.grubberStacks === rift.castle.maxBurgers} /> | ||
</div> | ||
<div class="space-y-4"> | ||
<h3 class="text-xl font-semibold">Timecharms</h3> | ||
<AdditionStat text="Timecharms Obtained" data={rift.timecharms.timecharmsFound} maxed={rift.timecharms.timecharmsFound === 7} /> | ||
<div class="flex flex-wrap gap-4"> | ||
{#each rift.timecharms.timecharms as timecharm} | ||
{@const hasUnlocked = timecharm.unlocked} | ||
<Chip image={{ src: timecharm.texture }} class={cn("h-fit w-fit", { "opacity-50": !hasUnlocked })} variant="tooltip"> | ||
<div class={cn("flex flex-col")}> | ||
<div class="font-bold"> | ||
<span class="opacity-60">{timecharm.name}</span> | ||
<div class="text-sm"> | ||
{#if hasUnlocked} | ||
<span class="opacity-60"> | ||
Obtained {formatDistanceToNowStrict(timecharm.unlockedAt, { | ||
addSuffix: true | ||
})} | ||
</span> | ||
{:else} | ||
<span class="opacity-60">Not Obtained</span> | ||
{/if} | ||
</div> | ||
</div> | ||
</div> | ||
<div slot="tooltip" class="text-sm font-bold"> | ||
<div> | ||
<span class="opacity-85">Obtained:</span> | ||
<span class="text-text"> | ||
{formatDate(timecharm.unlockedAt, "dd MMMM yyyy 'at' HH:mm")} | ||
</span> | ||
</div> | ||
</div> | ||
</Chip> | ||
{/each} | ||
</div> | ||
</div> | ||
</Items> |