make things a bit nicer for league start

This commit is contained in:
kvan7
2025-08-29 07:12:24 -05:00
parent 32b98801c6
commit a1ae212978
5 changed files with 29 additions and 4 deletions

View File

@@ -40,7 +40,8 @@ export function createFilters(
trade: {
offline: false,
onlineInLeague: false,
listingType: "merchant",
// FIXME: Change to merchant/instantBuyout when ready
listingType: "online",
listed: undefined,
currency: opts.currency,
league: opts.league,

View File

@@ -32,9 +32,9 @@
t("Merchant Only")
}}</ui-toggle>
</div> -->
<ui-radio v-model="filters.trade.listingType" value="merchant">{{
<!-- <ui-radio v-model="filters.trade.listingType" value="merchant">{{
t("Merchant Only")
}}</ui-radio>
}}</ui-radio> -->
<ui-radio v-model="filters.trade.listingType" value="onlineleague">{{
t(":in_league_toggle")
}}</ui-radio>

View File

@@ -47,9 +47,16 @@
</td>
<td class="pr-2 pl-4 whitespace-nowrap">
<div class="inline-flex items-center">
<!-- FIXME: Change to merchant to be merchant/instantBuyout -->
<div
class="account-status"
:class="result.isMerchant ? 'merchant' : result.accountStatus"
:class="
result.isMerchant
? 'merchant'
: result.accountStatus === 'online'
? 'merchant'
: result.accountStatus
"
></div>
<div class="ml-1 font-sans text-xs">
{{ result.relativeDate }}

View File

@@ -286,5 +286,13 @@ export default defineComponent({
&.afk {
@apply bg-orange-500;
}
&.rank-2 {
@apply bg-blue-600;
}
&.rank-3 {
@apply bg-yellow-600;
}
}
</style>

View File

@@ -286,6 +286,7 @@ export interface PricingResult {
relativeDate: string;
priceAmount: number;
priceCurrency: string;
priceCurrencyRank?: number;
isMine: boolean;
hasNote: boolean;
isMerchant: boolean;
@@ -1008,6 +1009,13 @@ export async function requestResults(
pseudoMods,
extended,
};
let priceCurrencyRank: PricingResult["priceCurrencyRank"];
// FIXME: Find a way to determine the price rank
if (rand(0, 2) === 0) {
priceCurrencyRank = rand(0, 2) ? 3 : 2;
}
return {
id: result.id,
itemLevel:
@@ -1026,6 +1034,7 @@ export async function requestResults(
}) ?? "",
priceAmount: result.listing.price?.amount ?? 0,
priceCurrency: result.listing.price?.currency ?? "no price",
priceCurrencyRank,
hasNote: result.item.note != null,
isMine: result.listing.account.name === opts.accountName,
// FIXME: actually calc this