diff --git a/renderer/src/web/Config.ts b/renderer/src/web/Config.ts index 9b4dbea56..1d4ebc0af 100644 --- a/renderer/src/web/Config.ts +++ b/renderer/src/web/Config.ts @@ -190,6 +190,7 @@ export const defaultConfig = (): Config => ({ smartInitialSearch: true, lockedInitialSearch: true, activateStockFilter: false, + activateOfflineFilter: false, builtinBrowser: false, hotkey: 'D', hotkeyHold: 'Ctrl', @@ -532,6 +533,13 @@ function upgradeConfig (_config: Config): Config { config.configVersion = 16 } + if (config.configVersion < 17) { + config.widgets.find(w => w.wmType === 'price-check')! + .activateOfflineFilter = false + + config.configVersion = 17 + } + return config as unknown as Config } diff --git a/renderer/src/web/overlay/widgets.ts b/renderer/src/web/overlay/widgets.ts index 317c04275..4ee3e860e 100644 --- a/renderer/src/web/overlay/widgets.ts +++ b/renderer/src/web/overlay/widgets.ts @@ -40,6 +40,7 @@ export interface PriceCheckWidget extends Widget { smartInitialSearch: boolean lockedInitialSearch: boolean activateStockFilter: boolean + activateOfflineFilter: boolean showCursor: boolean requestPricePrediction: boolean builtinBrowser: boolean diff --git a/renderer/src/web/price-check/CheckedItem.vue b/renderer/src/web/price-check/CheckedItem.vue index b5b9be088..eb9659407 100644 --- a/renderer/src/web/price-check/CheckedItem.vue +++ b/renderer/src/web/price-check/CheckedItem.vue @@ -110,6 +110,7 @@ export default defineComponent({ chaosPriceThreshold: widget.value.chaosPriceThreshold, collapseListings: widget.value.collapseListings, activateStockFilter: widget.value.activateStockFilter, + activateOfflineFilter: widget.value.activateOfflineFilter, searchStatRange: widget.value.searchStatRange, useEn: (AppConfig().language === 'cmn-Hant' && AppConfig().realm === 'pc-ggg'), currency: (prevItem && diff --git a/renderer/src/web/price-check/filters/create-item-filters.ts b/renderer/src/web/price-check/filters/create-item-filters.ts index 843551211..810adde63 100644 --- a/renderer/src/web/price-check/filters/create-item-filters.ts +++ b/renderer/src/web/price-check/filters/create-item-filters.ts @@ -13,6 +13,7 @@ interface CreateOptions { currency: string | undefined collapseListings: 'app' | 'api' activateStockFilter: boolean + activateOfflineFilter: boolean exact: boolean useEn: boolean } @@ -24,7 +25,7 @@ export function createFilters ( const filters: ItemFilters = { searchExact: {}, trade: { - offline: false, + offline: opts.activateOfflineFilter, onlineInLeague: false, listed: undefined, currency: opts.currency, diff --git a/renderer/src/web/price-check/filters/create-presets.ts b/renderer/src/web/price-check/filters/create-presets.ts index 5335be944..cbdd1724e 100644 --- a/renderer/src/web/price-check/filters/create-presets.ts +++ b/renderer/src/web/price-check/filters/create-presets.ts @@ -14,6 +14,7 @@ export function createPresets ( currency: string | undefined collapseListings: 'app' | 'api' activateStockFilter: boolean + activateOfflineFilter: boolean searchStatRange: number useEn: boolean } diff --git a/renderer/src/web/settings/price-check.vue b/renderer/src/web/settings/price-check.vue index e1966da87..0a8491560 100644 --- a/renderer/src/web/settings/price-check.vue +++ b/renderer/src/web/settings/price-check.vue @@ -70,7 +70,14 @@
-
{{ t(':show_prediction') }} www.poeprices.info
+
{{ t('Always show offline transactions') }}
+
+ {{ t('Yes') }} + {{ t('No') }} +
+
+
+
{{ t(':show_prediction') }} www.poeprices.info
{{ t('Yes') }} {{ t('No') }} @@ -152,6 +159,7 @@ export default defineComponent({ accountName: configModelValue(() => props.config, 'accountName'), showSeller: configModelValue(() => configWidget.value, 'showSeller'), activateStockFilter: configModelValue(() => configWidget.value, 'activateStockFilter'), + activateOfflineFilter: configModelValue(() => configWidget.value, 'activateOfflineFilter'), showCursor: configModelValue(() => configWidget.value, 'showCursor'), builtinBrowser: configModelValue(() => configWidget.value, 'builtinBrowser'), requestPricePrediction: configModelValue(() => configWidget.value, 'requestPricePrediction'),