mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2024-12-22 06:25:10 +01:00
Add primogem count
This commit is contained in:
parent
dcc87c2e45
commit
fd1b96abc4
3 changed files with 19 additions and 3 deletions
|
@ -16,6 +16,8 @@
|
|||
import dayjs from 'dayjs';
|
||||
import { weaponList } from '../../data/weaponList';
|
||||
|
||||
let numberFormat = Intl.NumberFormat();
|
||||
|
||||
export let id = '';
|
||||
export let name = '';
|
||||
export let legendaryPity = 90;
|
||||
|
@ -249,7 +251,13 @@
|
|||
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
||||
} rounded-xl flex`}
|
||||
>
|
||||
<span class="text-gray-200 whitespace-no-wrap flex-1">Lifetime Pulls</span>
|
||||
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
||||
Lifetime Pulls<br />
|
||||
<span class="flex items-center text-gray-600">
|
||||
<img class="w-4 h-4 mr-2" src="/images/primogem.png" alt="primogem" />
|
||||
{numberFormat.format(total * 160)}
|
||||
</span>
|
||||
</span>
|
||||
{#if isEdit}
|
||||
<Input type="number" min={1} bind:value={totalEdit} />
|
||||
{:else}<span class="font-black text-3xl text-white ml-4">{total}</span>{/if}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script>
|
||||
import { mdiStar } from '@mdi/js';
|
||||
import { onMount } from 'svelte';
|
||||
import Icon from '../../components/Icon.svelte';
|
||||
import { characters } from '../../data/characters';
|
||||
import { weaponList } from '../../data/weaponList';
|
||||
|
||||
import { readSave, updateTime, fromRemote } from '../../stores/saveManager';
|
||||
import SummaryItem from './_summaryItem.svelte';
|
||||
|
||||
let numberFormat = Intl.NumberFormat();
|
||||
|
||||
const types = [
|
||||
{
|
||||
name: 'Character Event',
|
||||
|
@ -28,6 +28,7 @@
|
|||
];
|
||||
|
||||
let loading = true;
|
||||
let totalWish = 0;
|
||||
const avg = {};
|
||||
|
||||
$: if ($fromRemote) {
|
||||
|
@ -43,6 +44,7 @@
|
|||
});
|
||||
|
||||
export function readLocalData() {
|
||||
totalWish = 0;
|
||||
console.log('wish summary read local');
|
||||
|
||||
for (let type of types) {
|
||||
|
@ -53,6 +55,8 @@
|
|||
const pulls = counterData.pulls || [];
|
||||
const total = counterData.total;
|
||||
|
||||
totalWish += total;
|
||||
|
||||
let legendary = 0;
|
||||
let legendaryPity = 0;
|
||||
let legendaryPulls = [];
|
||||
|
@ -141,5 +145,9 @@
|
|||
{#if avg[types[3].id]}
|
||||
<SummaryItem avg={avg[types[3].id]} type={types[3]} />
|
||||
{/if}
|
||||
<div class="bg-item rounded-xl p-4 flex items-center w-full text-white mt-4" style="height: min-content;">
|
||||
Wishes Worth <img class="w-4 h-4 mx-2" src="/images/primogem.png" alt="primogem" />
|
||||
{numberFormat.format(totalWish * 160)}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
BIN
static/images/primogem.png
Normal file
BIN
static/images/primogem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Loading…
Reference in a new issue