diff options
author | mat <github@matdoes.dev> | 2022-05-18 17:59:23 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-05-18 17:59:23 +0000 |
commit | aeebc84c5bbecb29707e4ace0ce515cdde0bb27b (patch) | |
tree | 03a7bb4388896058592e1e4ff8a59a48ee1850b5 /src | |
parent | f1c9ccfa043210d8fffdb7a992241177e37a73d6 (diff) | |
download | skyblock-stats-aeebc84c5bbecb29707e4ace0ce515cdde0bb27b.tar.gz skyblock-stats-aeebc84c5bbecb29707e4ace0ce515cdde0bb27b.tar.bz2 skyblock-stats-aeebc84c5bbecb29707e4ace0ce515cdde0bb27b.zip |
fix item names with formatting codes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/AuctionPriceScatterplot.svelte | 1 | ||||
-rw-r--r-- | src/routes/auctionprices.svelte | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/AuctionPriceScatterplot.svelte b/src/lib/AuctionPriceScatterplot.svelte index 35ef103..3b89149 100644 --- a/src/lib/AuctionPriceScatterplot.svelte +++ b/src/lib/AuctionPriceScatterplot.svelte @@ -114,7 +114,6 @@ class:selected-auction={currentlyPreviewedAuction?.auction?.id === auction?.id} /> {/each} - <!-- {item.auctions} --> </svg> {/if} diff --git a/src/routes/auctionprices.svelte b/src/routes/auctionprices.svelte index 853c7d6..95e062b 100644 --- a/src/routes/auctionprices.svelte +++ b/src/routes/auctionprices.svelte @@ -19,7 +19,7 @@ <script lang="ts"> import Header from '$lib/Header.svelte' import Head from '$lib/Head.svelte' - import { cleanId, type PreviewedAuctionData } from '$lib/utils' + import { cleanId, removeFormattingCode, type PreviewedAuctionData } from '$lib/utils' import type { ItemAuctionsSchema } from '$lib/APITypes' import AuctionPriceScatterplot from '$lib/AuctionPriceScatterplot.svelte' import AuctionPreviewTooltip from '$lib/AuctionPreviewTooltip.svelte' @@ -38,7 +38,7 @@ $: { pageNumber = 0 allMatchingItemIds = Object.entries(auctionItems) - .filter(a => a[1].toLowerCase().includes(queryNormalized)) + .filter(a => removeFormattingCode(a[1].toLowerCase()).includes(queryNormalized)) .map(a => a[0]) } $: { @@ -103,18 +103,18 @@ {@const binAuctions = item.auctions.filter(i => i.bin)} {@const normalAuctions = item.auctions.filter(i => !i.bin)} <div class="item-container"> - <h2>{auctionItems[item.id] ?? cleanId(item.id.toLowerCase())}</h2> + <h2>{removeFormattingCode(auctionItems[item.id] ?? cleanId(item.id.toLowerCase()))}</h2> <div class="auctions-info-text"> {#if binAuctions.length > 0} <p> - Lowest recent BIN: <b> + Cheapest recent BIN: <b> {binAuctions.reduce((a, b) => (a.coins < b.coins ? a : b)).coins.toLocaleString()} coins </b> </p> {/if} {#if normalAuctions.length > 0} <p> - Lowest recent auction: <b> + Cheapest recent auction: <b> {normalAuctions .reduce((a, b) => (a.coins < b.coins ? a : b)) .coins.toLocaleString()} coins @@ -152,7 +152,7 @@ } .item-list { display: grid; - grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(16em, 1fr)); grid-gap: 1em; margin-top: 1em; } |