mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-12-13 11:36:28 +00:00
@@ -39,12 +39,14 @@
|
||||
"Update to 2"
|
||||
],
|
||||
"cSpell.words": [
|
||||
"Atzoatl",
|
||||
"corruptionjewel",
|
||||
"Defences",
|
||||
"DIVCARD",
|
||||
"divinable",
|
||||
"edps",
|
||||
"ilvl",
|
||||
"Kalandra",
|
||||
"keybinds",
|
||||
"Knockback",
|
||||
"nonunique",
|
||||
|
||||
@@ -35,6 +35,7 @@ export function createFilters(
|
||||
trade: {
|
||||
offline: false,
|
||||
onlineInLeague: false,
|
||||
merchant: false,
|
||||
listed: undefined,
|
||||
currency: opts.currency,
|
||||
league: opts.league,
|
||||
|
||||
@@ -79,6 +79,7 @@ export interface ItemFilters {
|
||||
trade: {
|
||||
offline: boolean;
|
||||
onlineInLeague: boolean;
|
||||
merchant: boolean;
|
||||
listed: string | undefined;
|
||||
currency: string | undefined;
|
||||
league: string;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<td class="px-2 whitespace-nowrap">
|
||||
<span
|
||||
:class="{
|
||||
'line-through': result.priceCurrency === 'chaos',
|
||||
'line-through': false,
|
||||
}"
|
||||
>{{ result.priceAmount }} {{ result.priceCurrency }}</span
|
||||
>
|
||||
@@ -47,7 +47,10 @@
|
||||
</td>
|
||||
<td class="pr-2 pl-4 whitespace-nowrap">
|
||||
<div class="inline-flex items-center">
|
||||
<div class="account-status" :class="result.accountStatus"></div>
|
||||
<div
|
||||
class="account-status"
|
||||
:class="result.isMerchant ? 'merchant' : result.accountStatus"
|
||||
></div>
|
||||
<div class="ml-1 font-sans text-xs">
|
||||
{{ result.relativeDate }}
|
||||
</div>
|
||||
|
||||
@@ -430,10 +430,14 @@ export default defineComponent({
|
||||
height: 0.375rem;
|
||||
border-radius: 100%;
|
||||
|
||||
&.online {
|
||||
&.merchant {
|
||||
/* */
|
||||
}
|
||||
|
||||
&.online {
|
||||
@apply bg-pink-400;
|
||||
}
|
||||
|
||||
&.offline {
|
||||
@apply bg-red-600;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import { ModifierType } from "@/parser/modifiers";
|
||||
import { Cache } from "./Cache";
|
||||
import { filterInPseudo } from "../filters/pseudo";
|
||||
import { parseAffixStrings } from "@/parser/Parser";
|
||||
import { rand } from "@vueuse/core";
|
||||
|
||||
export const CATEGORY_TO_TRADE_ID = new Map([
|
||||
[ItemCategory.Map, "map"],
|
||||
@@ -287,6 +288,7 @@ export interface PricingResult {
|
||||
priceCurrency: string;
|
||||
isMine: boolean;
|
||||
hasNote: boolean;
|
||||
isMerchant: boolean;
|
||||
accountName: string;
|
||||
accountStatus: "offline" | "online" | "afk";
|
||||
ign: string;
|
||||
@@ -317,6 +319,11 @@ export function createTradeRequest(
|
||||
};
|
||||
const { query } = body;
|
||||
|
||||
if (filters.trade.merchant) {
|
||||
// FIXME: actually do something
|
||||
console.log("do something cause merchant");
|
||||
}
|
||||
|
||||
if (filters.trade.currency) {
|
||||
propSet(
|
||||
query.filters,
|
||||
@@ -1021,6 +1028,7 @@ export async function requestResults(
|
||||
priceCurrency: result.listing.price?.currency ?? "no price",
|
||||
hasNote: result.item.note != null,
|
||||
isMine: result.listing.account.name === opts.accountName,
|
||||
isMerchant: rand(0, 2) !== 0,
|
||||
ign: result.listing.account.lastCharacterName,
|
||||
accountName: result.listing.account.name,
|
||||
accountStatus: result.listing.account.online
|
||||
|
||||
Reference in New Issue
Block a user