Wish input improvement
parent
55e4334848
commit
ed7c514bcc
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (!isEdit) return;
|
if (!isEdit) return;
|
||||||
|
if (editType === 'unknown_3_star') return;
|
||||||
|
|
||||||
type = selectOptions.find((e) => e.value === editType);
|
type = selectOptions.find((e) => e.value === editType);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function submitWishTally() {
|
||||||
|
|
||||||
const data = process(id);
|
const data = process(id);
|
||||||
if (data === null) continue;
|
if (data === null) continue;
|
||||||
// if (data.hasManualInput) continue;
|
if (data.hasManualInput) continue;
|
||||||
|
|
||||||
console.log('processing wish tally', id);
|
console.log('processing wish tally', id);
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ export async function submitWishTally() {
|
||||||
if (total === 0) continue;
|
if (total === 0) continue;
|
||||||
|
|
||||||
const pityCount = [...banner[i].pityCount].map((e) => e || 0);
|
const pityCount = [...banner[i].pityCount].map((e) => e || 0);
|
||||||
|
if (pityCount.length > 90) continue;
|
||||||
|
|
||||||
const rarePity = banner[i].rarePity;
|
const rarePity = banner[i].rarePity;
|
||||||
const legendaryCount = banner[i].legendary.length;
|
const legendaryCount = banner[i].legendary.length;
|
||||||
const rareCount = banner[i].rare.character.length + banner[i].rare.weapon.length;
|
const rareCount = banner[i].rare.character.length + banner[i].rare.weapon.length;
|
||||||
|
@ -59,6 +61,7 @@ export async function submitWishTally() {
|
||||||
legendaryPulls.push(...includedRarePulls);
|
legendaryPulls.push(...includedRarePulls);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log(pityCount);
|
||||||
// console.log(legendaryPulls);
|
// console.log(legendaryPulls);
|
||||||
// console.log(rarePity);
|
// console.log(rarePity);
|
||||||
// console.log(legendaryCount, rareCount, total);
|
// console.log(legendaryCount, rareCount, total);
|
||||||
|
|
|
@ -117,6 +117,10 @@
|
||||||
"manualButton": "Enable Manual Input",
|
"manualButton": "Enable Manual Input",
|
||||||
"errorBanner": "Banner time missmatch! Please adjust your server on settings page. Still not working? please leave a message on Discord 😅",
|
"errorBanner": "Banner time missmatch! Please adjust your server on settings page. Still not working? please leave a message on Discord 😅",
|
||||||
"globalWishTally": "Global Wish Tally",
|
"globalWishTally": "Global Wish Tally",
|
||||||
|
"pityTooltip": [
|
||||||
|
"Shows your current {rarity} pity",
|
||||||
|
"{count} pulls to guaranteed {rarity}"
|
||||||
|
],
|
||||||
"import": {
|
"import": {
|
||||||
"title": "Import Wish History",
|
"title": "Import Wish History",
|
||||||
"faqsButton": "FAQ - READ FIRST",
|
"faqsButton": "FAQ - READ FIRST",
|
||||||
|
@ -300,7 +304,8 @@
|
||||||
"totalThisBanner": "Total pull on this banner",
|
"totalThisBanner": "Total pull on this banner",
|
||||||
"worth": "Worth",
|
"worth": "Worth",
|
||||||
"loading": "Loading... (If this stuck, change your server on settings page)",
|
"loading": "Loading... (If this stuck, change your server on settings page)",
|
||||||
"guaranteed": "The next 5★ is guaranteed to be the promotional character or weapon"
|
"guaranteed": "The next 5★ is guaranteed to be the promotional character or weapon",
|
||||||
|
"unknown_3_star": "Unknown"
|
||||||
},
|
},
|
||||||
"tally": {
|
"tally": {
|
||||||
"title": "Wish Tally",
|
"title": "Wish Tally",
|
||||||
|
@ -576,4 +581,4 @@
|
||||||
"title": "Achievement",
|
"title": "Achievement",
|
||||||
"of": "of"
|
"of": "of"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -88,6 +88,10 @@
|
||||||
"manualButton": "Nyalakan Input Manual",
|
"manualButton": "Nyalakan Input Manual",
|
||||||
"errorBanner": "Waktu banner salah! Coba sesuaikan server di halaman settings. Masih gak bisa? tolong chat di Discord 😅",
|
"errorBanner": "Waktu banner salah! Coba sesuaikan server di halaman settings. Masih gak bisa? tolong chat di Discord 😅",
|
||||||
"globalWishTally": "Perhitungan Pity Wish Global",
|
"globalWishTally": "Perhitungan Pity Wish Global",
|
||||||
|
"pityTooltip": [
|
||||||
|
"Ini adalah pity {rarity} sekarang",
|
||||||
|
"{count}x wish lagi untuk dijamin {rarity}"
|
||||||
|
],
|
||||||
"import": {
|
"import": {
|
||||||
"title": "Import Riwayat Wish",
|
"title": "Import Riwayat Wish",
|
||||||
"faqsButton": "FAQS - BACA DULU",
|
"faqsButton": "FAQS - BACA DULU",
|
||||||
|
|
|
@ -75,6 +75,11 @@
|
||||||
index: i,
|
index: i,
|
||||||
...e,
|
...e,
|
||||||
});
|
});
|
||||||
|
} else if (e.type === 'unknown_3_star' && showRarity[2]) {
|
||||||
|
sorted.push({
|
||||||
|
index: i,
|
||||||
|
...e,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +233,7 @@
|
||||||
id: 'unknown_3_star',
|
id: 'unknown_3_star',
|
||||||
time: dayjs().unix(),
|
time: dayjs().unix(),
|
||||||
pity: 1,
|
pity: 1,
|
||||||
|
manualInput: true,
|
||||||
})),
|
})),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -278,7 +284,7 @@
|
||||||
<div
|
<div
|
||||||
class={`${
|
class={`${
|
||||||
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
||||||
} rounded-xl flex`}
|
} rounded-xl flex relative`}
|
||||||
>
|
>
|
||||||
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
||||||
{$t('wish.lifetimePulls')}<br />
|
{$t('wish.lifetimePulls')}<br />
|
||||||
|
@ -294,9 +300,16 @@
|
||||||
<div
|
<div
|
||||||
class={`${
|
class={`${
|
||||||
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
||||||
} rounded-xl flex`}
|
} rounded-xl flex group relative`}
|
||||||
title={`${legendaryPity - legendary} pulls to guaranteed 5 star`}
|
|
||||||
>
|
>
|
||||||
|
{#if !isEdit}
|
||||||
|
<div class="group-hover:flex hidden absolute left-0 pl-2 items-center z-10" style="max-width: 80%;">
|
||||||
|
<div class="bg-gray-200 text-gray-900 px-4 py-2 rounded-xl text-sm md:text-base">
|
||||||
|
<p>{$t('wish.pityTooltip.0', { values: { rarity: '5★' } })}</p>
|
||||||
|
<p>{$t('wish.pityTooltip.1', { values: { count: legendaryPity - legendary, rarity: '5★' } })}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
||||||
5
|
5
|
||||||
<Icon path={mdiStar} size={0.75} className="mb-1" />
|
<Icon path={mdiStar} size={0.75} className="mb-1" />
|
||||||
|
@ -310,9 +323,16 @@
|
||||||
<div
|
<div
|
||||||
class={`${
|
class={`${
|
||||||
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
isEdit ? 'bg-item flex-col py-2' : 'bg-background flex-row items-center justify-center mb-2 p-4'
|
||||||
} rounded-xl flex`}
|
} rounded-xl flex group relative`}
|
||||||
title={`${10 - rare} pulls to guaranteed 4 star`}
|
|
||||||
>
|
>
|
||||||
|
{#if !isEdit}
|
||||||
|
<div class="group-hover:flex hidden absolute left-0 pl-2 items-center z-10" style="max-width: 80%;">
|
||||||
|
<div class="bg-gray-200 text-gray-900 px-4 py-2 rounded-xl text-sm md:text-base">
|
||||||
|
<p>{$t('wish.pityTooltip.0', { values: { rarity: '4★' } })}</p>
|
||||||
|
<p>{$t('wish.pityTooltip.1', { values: { count: 10 - rare, rarity: '4★' } })}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
<span class="text-gray-200 whitespace-no-wrap flex-1">
|
||||||
4
|
4
|
||||||
<Icon path={mdiStar} size={0.75} className="mb-1" />
|
<Icon path={mdiStar} size={0.75} className="mb-1" />
|
||||||
|
@ -370,6 +390,9 @@
|
||||||
<button on:click={() => toggleShowRarity(2)} class={`pill normal ${showRarity[2] ? 'active' : ''}`}>
|
<button on:click={() => toggleShowRarity(2)} class={`pill normal ${showRarity[2] ? 'active' : ''}`}>
|
||||||
3 <Icon path={mdiStar} size={0.75} className="mb-1" />
|
3 <Icon path={mdiStar} size={0.75} className="mb-1" />
|
||||||
</button>
|
</button>
|
||||||
|
<a href="/wish/{id}" class="pill normal">
|
||||||
|
<Icon path={mdiTableOfContents} color="white" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -378,7 +401,11 @@
|
||||||
<th class="border-b border-gray-700 text-gray-400 font-display text-right">Pity</th>
|
<th class="border-b border-gray-700 text-gray-400 font-display text-right">Pity</th>
|
||||||
</tr>
|
</tr>
|
||||||
{#each sortedPull as pull}
|
{#each sortedPull as pull}
|
||||||
<tr on:click={manualInput ? () => openEditModal(pull.index, pull.type, pull.id, pull.time, pull.pity) : () => {}}>
|
<tr
|
||||||
|
on:click={manualInput
|
||||||
|
? () => openEditModal(pull.index, pull.type, pull.id, pull.time, pull.pity)
|
||||||
|
: () => {}}
|
||||||
|
>
|
||||||
{#if pull.type === 'character'}
|
{#if pull.type === 'character'}
|
||||||
<td
|
<td
|
||||||
class={`border-b border-gray-700 py-1 pl-2 font-semibold ${
|
class={`border-b border-gray-700 py-1 pl-2 font-semibold ${
|
||||||
|
@ -399,6 +426,8 @@
|
||||||
: 'text-primary'
|
: 'text-primary'
|
||||||
}`}>{weaponList[pull.id].name}</td
|
}`}>{weaponList[pull.id].name}</td
|
||||||
>
|
>
|
||||||
|
{:else if pull.type === 'unknown_3_star'}
|
||||||
|
<td class="border-b border-gray-700 py-1 pl-2 font-semibold text-primary">Unknown</td>
|
||||||
{/if}
|
{/if}
|
||||||
<td class="border-b border-gray-700 text-sm py-1 px-2 whitespace-no-wrap" style="font-family: monospace;"
|
<td class="border-b border-gray-700 text-sm py-1 px-2 whitespace-no-wrap" style="font-family: monospace;"
|
||||||
>{dayjs.unix(pull.time).format('YYYY-MM-DD HH:mm:ss')}</td
|
>{dayjs.unix(pull.time).format('YYYY-MM-DD HH:mm:ss')}</td
|
||||||
|
|
|
@ -54,6 +54,7 @@ module.exports = {
|
||||||
borderColor: ['responsive', 'hover', 'focus', 'focus-within', 'disabled'],
|
borderColor: ['responsive', 'hover', 'focus', 'focus-within', 'disabled'],
|
||||||
opacity: ['group-hover', 'responsive', 'hover', 'focus', 'disabled'],
|
opacity: ['group-hover', 'responsive', 'hover', 'focus', 'disabled'],
|
||||||
borderWidth: ['responsive', 'last', 'hover', 'focus'],
|
borderWidth: ['responsive', 'last', 'hover', 'focus'],
|
||||||
|
display: ['responsive', 'group-hover'],
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
future: {
|
future: {
|
||||||
|
|
Loading…
Reference in New Issue