mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-26 06:35:45 +00:00
closes #781
This commit is contained in:
@@ -24,9 +24,6 @@ export const selected = computed<string | undefined>({
|
||||
}
|
||||
})
|
||||
|
||||
export const isPublic = computed<boolean | undefined>(() =>
|
||||
selected.value ? isPublicLeague(selected.value) : undefined)
|
||||
|
||||
export function isPublicLeague (id: string) {
|
||||
return tradeLeagues.value.some(league => id === league.id)
|
||||
}
|
||||
@@ -58,7 +55,7 @@ export async function load () {
|
||||
}
|
||||
}
|
||||
|
||||
function isRegularLeague (id: string) {
|
||||
export function isRegularLeague (id: string) {
|
||||
// not a Private League (PL01)
|
||||
// not a Race Event (.RE01)
|
||||
return /^[A-Za-z ]+$/.test(id)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { shallowRef, watch } from 'vue'
|
||||
import { AppConfig } from '@/web/Config'
|
||||
import { MainProcess } from '@/web/background/IPC'
|
||||
import { selected as selectedLeague, isPublic as isPublicLeague } from './Leagues'
|
||||
import { selected as selectedLeague, isPublicLeague } from './Leagues'
|
||||
|
||||
interface NinjaDenseInfo {
|
||||
chaos: number
|
||||
@@ -20,7 +20,7 @@ const RETRY_TIME = 2 * 60 * 1000
|
||||
const UPDATE_TIME = 16 * 60 * 1000
|
||||
|
||||
async function load (force: boolean = false) {
|
||||
if (!selectedLeague.value || !isPublicLeague.value || AppConfig().realm !== 'pc-ggg') return
|
||||
if (!selectedLeague.value || !isPublicLeague(selectedLeague.value) || AppConfig().realm !== 'pc-ggg') return
|
||||
const leagueAtStartOfLoad = selectedLeague.value
|
||||
|
||||
if (!force && (Date.now() - lastUpdateTime) < UPDATE_TIME) return
|
||||
|
||||
@@ -63,7 +63,7 @@ import { CATEGORY_TO_TRADE_ID, createTradeRequest } from './trade/pathofexile-tr
|
||||
import { AppConfig } from '@/web/Config'
|
||||
import { FilterPreset } from './filters/interfaces'
|
||||
import { PriceCheckWidget } from '../overlay/interfaces'
|
||||
import { selected as selectedLeague, isPublic as isPublicLeague } from '@/web/background/Leagues'
|
||||
import { selected as selectedLeague, isRegularLeague } from '@/web/background/Leagues'
|
||||
|
||||
let _showSupportLinksCounter = 0
|
||||
|
||||
@@ -173,7 +173,7 @@ export default defineComponent({
|
||||
const showPredictedPrice = computed(() => {
|
||||
if (!widget.value.requestPricePrediction ||
|
||||
AppConfig().language !== 'en' ||
|
||||
!isPublicLeague.value) return false
|
||||
!isRegularLeague(selectedLeague.value!)) return false
|
||||
|
||||
if (presets.value.active === 'Base item') return false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user