Temporary fix for todo crashing

caused by redcrest renamed to henna berry
pull/1/head
Made Baruna 2022-12-17 01:33:44 +08:00
parent 81184fb3ca
commit e3cda2fdfa
1 changed files with 26 additions and 5 deletions

View File

@ -6,7 +6,7 @@
import { mdiChevronDown, mdiChevronLeft, mdiChevronRight, mdiClose, mdiInformation, mdiLoading } from '@mdi/js';
import { todos, loading } from '../stores/todo';
import { ar, wl } from '../stores/server';
import { itemList } from '../data/itemList';
import { itemList as itemListData } from '../data/itemList';
import Masonry from '../components/Masonry.svelte';
import Icon from '../components/Icon.svelte';
import Button from '../components/Button.svelte';
@ -17,6 +17,11 @@
const { open: openModal, close: closeModal } = getContext('simple-modal');
const itemList = {
...itemListData,
redcrest: { id: 'henna_berry', name: 'Henna Berry' },
};
let refreshLayout;
let columnCount = 1;
let numberFormat = Intl.NumberFormat();
@ -311,7 +316,11 @@
<td class="border-b border-gray-700 py-1">
<span class={`${amount === 0 ? 'line-through text-gray-600' : 'text-white'} block`}>
<span class="w-6 inline-block">
<img class="h-6 inline-block mr-1" src={`/images/items/${id}.png`} alt={itemList[id].name} />
<img
class="h-6 inline-block mr-1"
src={`/images/items/${itemList[id].id}.png`}
alt={itemList[id].name}
/>
</span>
{itemList[id].name}
</span>
@ -347,7 +356,11 @@
<td class="border-b border-gray-700 py-1">
<span class="text-white block">
<span class="w-6 inline-block">
<img class="h-6 inline-block mr-1" src={`/images/items/${id}.png`} alt={itemList[id].name} />
<img
class="h-6 inline-block mr-1"
src={`/images/items/${itemList[id].id}.png`}
alt={itemList[id].name}
/>
</span>
{itemGroup[id].name}
</span>
@ -382,7 +395,11 @@
<td class="border-b border-gray-700 py-1">
<span class={`${amount === 0 ? 'line-through text-gray-600' : 'text-white'} block mb-1`}>
<span class="w-6 inline-block">
<img class="h-6 inline-block mr-1" src={`/images/items/${id}.png`} alt={itemList[id].name} />
<img
class="h-6 inline-block mr-1"
src={`/images/items/${itemList[id].id}.png`}
alt={itemList[id].name}
/>
</span>
{itemList[id].name}
</span>
@ -467,7 +484,11 @@
<td class="border-b border-gray-700 py-1">
<span class={amount === 0 ? 'line-through text-gray-600' : 'text-white'}>
<span class="w-6 inline-block">
<img class="h-6 inline-block mr-1" src={`/images/items/${id}.png`} alt={itemList[id].name} />
<img
class="h-6 inline-block mr-1"
src={`/images/items/${itemList[id].id}.png`}
alt={itemList[id].name}
/>
</span>
{itemList[id].name}
</span>