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: { trade: {
offline: false, offline: false,
onlineInLeague: false, onlineInLeague: false,
listingType: "merchant", // FIXME: Change to merchant/instantBuyout when ready
listingType: "online",
listed: undefined, listed: undefined,
currency: opts.currency, currency: opts.currency,
league: opts.league, league: opts.league,

View File

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

View File

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

View File

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

View File

@@ -286,6 +286,7 @@ export interface PricingResult {
relativeDate: string; relativeDate: string;
priceAmount: number; priceAmount: number;
priceCurrency: string; priceCurrency: string;
priceCurrencyRank?: number;
isMine: boolean; isMine: boolean;
hasNote: boolean; hasNote: boolean;
isMerchant: boolean; isMerchant: boolean;
@@ -1008,6 +1009,13 @@ export async function requestResults(
pseudoMods, pseudoMods,
extended, 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 { return {
id: result.id, id: result.id,
itemLevel: itemLevel:
@@ -1026,6 +1034,7 @@ export async function requestResults(
}) ?? "", }) ?? "",
priceAmount: result.listing.price?.amount ?? 0, priceAmount: result.listing.price?.amount ?? 0,
priceCurrency: result.listing.price?.currency ?? "no price", priceCurrency: result.listing.price?.currency ?? "no price",
priceCurrencyRank,
hasNote: result.item.note != null, hasNote: result.item.note != null,
isMine: result.listing.account.name === opts.accountName, isMine: result.listing.account.name === opts.accountName,
// FIXME: actually calc this // FIXME: actually calc this