style(Update to 2): Update branding
Renamed to Exalted PoE2 Trade
@@ -8,7 +8,7 @@ import { useData } from 'vitepress'
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
You can download Awakened Poe Trade here. Any other mirrors are not known
|
||||
You can download Exalted Poe Trade here. Any other mirrors are not known
|
||||
to the developer, downloading from them may be unsafe.
|
||||
|
||||
| Download link | Automatic updates | Startup time |
|
||||
|
||||
33
exalted-poe2-trade.code-workspace
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "renderer",
|
||||
"path": "renderer"
|
||||
},
|
||||
{
|
||||
"name": "main",
|
||||
"path": "main"
|
||||
},
|
||||
{
|
||||
"name": "docs",
|
||||
"path": "docs"
|
||||
},
|
||||
{
|
||||
"name": "root",
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"files.exclude": {
|
||||
"main/": true,
|
||||
"renderer/": true,
|
||||
"docs/": true,
|
||||
"dist/": true
|
||||
},
|
||||
"editor.tabSize": 2,
|
||||
"editor.insertSpaces": true,
|
||||
"conventionalCommits.scopes": [
|
||||
"Update to 2"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 841 KiB After Width: | Height: | Size: 712 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 66 KiB |
BIN
main/build/icons/icon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
@@ -10,7 +10,7 @@
|
||||
"fix": "eslint src --fix"
|
||||
},
|
||||
"author": {
|
||||
"name": "Alexander Drozdov"
|
||||
"name": "Garrett Parker"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
2
renderer/package-lock.json
generated
@@ -6394,4 +6394,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +1,63 @@
|
||||
{
|
||||
"name": "exiled-exchange-2-2",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"lint": "eslint --ext .ts,.vue src",
|
||||
"lint-fix": "eslint --ext .ts,.vue src --fix",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"make-index-files": "node src/assets/make-index-files.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "6.x.x",
|
||||
"@sindresorhus/fnv1a": "^3.0.0",
|
||||
"@vueuse/core": "^11.0.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"apexcharts": "^4.0.0",
|
||||
"dot-prop": "9.x.x",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"luxon": "3.x.x",
|
||||
"neverthrow": "^8.0.0",
|
||||
"object-hash": "^3.0.0",
|
||||
"sockette": "^2.0.6",
|
||||
"tailwindcss": "3.x.x",
|
||||
"tippy.js": "^6.2.7",
|
||||
"vue": "3.2.37",
|
||||
"vue-i18n": "^10.0.0",
|
||||
"vue3-apexcharts": "^1.1.1",
|
||||
"vuedraggable": "4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/luxon": "^3.0.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"@types/object-hash": "^3.0.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"autoprefixer": "^10.0.2",
|
||||
"postcss": "^8.2.14",
|
||||
"typescript": "5.6.x",
|
||||
"vite": "^5.0.0",
|
||||
"vue-tsc": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^8.21.0",
|
||||
"eslint-config-standard-with-typescript": "^31.0.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-vue": "^9.1.1"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"tailwindcss/nesting": {},
|
||||
"tailwindcss": {},
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"chrome >= 101"
|
||||
]
|
||||
"name": "exiled-exchange-2-2",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"lint": "eslint --ext .ts,.vue src",
|
||||
"lint-fix": "eslint --ext .ts,.vue src --fix",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"make-index-files": "node src/assets/make-index-files.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "6.x.x",
|
||||
"@sindresorhus/fnv1a": "^3.0.0",
|
||||
"@vueuse/core": "^11.0.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"apexcharts": "^4.0.0",
|
||||
"dot-prop": "9.x.x",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"luxon": "3.x.x",
|
||||
"neverthrow": "^8.0.0",
|
||||
"object-hash": "^3.0.0",
|
||||
"sockette": "^2.0.6",
|
||||
"tailwindcss": "3.x.x",
|
||||
"tippy.js": "^6.2.7",
|
||||
"vue": "3.2.37",
|
||||
"vue-i18n": "^10.0.0",
|
||||
"vue3-apexcharts": "^1.1.1",
|
||||
"vuedraggable": "4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/luxon": "^3.0.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"@types/object-hash": "^3.0.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"autoprefixer": "^10.0.2",
|
||||
"postcss": "^8.2.14",
|
||||
"typescript": "5.6.x",
|
||||
"vite": "^5.0.0",
|
||||
"vue-tsc": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^8.21.0",
|
||||
"eslint-config-standard-with-typescript": "^31.0.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-vue": "^9.1.1"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"tailwindcss/nesting": {},
|
||||
"tailwindcss": {},
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"chrome >= 101"
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 14 KiB |
@@ -13,51 +13,53 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { shallowRef } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Host } from '@/web/background/IPC'
|
||||
import { AppConfig } from '@/web/Config'
|
||||
import { shallowRef } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Host } from '@/web/background/IPC';
|
||||
import { AppConfig } from '@/web/Config';
|
||||
|
||||
const { t } = useI18n()
|
||||
const { t } = useI18n();
|
||||
|
||||
const show = shallowRef(false)
|
||||
const show = shallowRef(false);
|
||||
|
||||
Host.onEvent('MAIN->OVERLAY::overlay-attached', () => {
|
||||
if (!show.value && AppConfig().showAttachNotification) {
|
||||
show.value = true
|
||||
setTimeout(() => { show.value = false }, 2500)
|
||||
}
|
||||
})
|
||||
if (!show.value && AppConfig().showAttachNotification) {
|
||||
show.value = true;
|
||||
setTimeout(() => {
|
||||
show.value = false;
|
||||
}, 2500);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="postcss" module>
|
||||
.widget {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
bottom: 20%;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
bottom: 20%;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@apply bg-gray-800;
|
||||
@apply text-gray-100;
|
||||
@apply rounded;
|
||||
box-shadow: 0px 0px 1px 2px rgb(255 255 255 / 20%);
|
||||
position: relative;
|
||||
display: flex;
|
||||
@apply bg-gray-800;
|
||||
@apply text-gray-100;
|
||||
@apply rounded;
|
||||
box-shadow: 0px 0px 1px 2px rgb(255 255 255 / 20%);
|
||||
}
|
||||
|
||||
.box::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: url('/images/TransferOrb.png') no-repeat top right/contain;
|
||||
right: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 78px;
|
||||
@apply mr-2;
|
||||
pointer-events: none;
|
||||
filter: drop-shadow(2px 4px 6px #000);
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: url('/images/exa.png') no-repeat top right/contain;
|
||||
right: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 78px;
|
||||
@apply mr-2;
|
||||
pointer-events: none;
|
||||
filter: drop-shadow(2px 4px 6px #000);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,62 +1,119 @@
|
||||
<template>
|
||||
<div style="top: 0; left: 0; height: 100%; width: 100%; position: absolute;"
|
||||
class="flex grow h-full pointer-events-none" :class="{
|
||||
'flex-row': clickPosition === 'stash',
|
||||
'flex-row-reverse': clickPosition === 'inventory',
|
||||
}">
|
||||
<div v-if="!isBrowserShown" class="layout-column shrink-0" style="width: var(--game-panel);">
|
||||
</div>
|
||||
<div id="price-window" class="layout-column shrink-0 text-gray-200 pointer-events-auto" style="width: 28.75rem;">
|
||||
<ConversionWarningBanner />
|
||||
<AppTitleBar @close="closePriceCheck" @click="openLeagueSelection" :title="title">
|
||||
<ui-popover v-if="stableOrbCost" trigger="click" boundary="#price-window">
|
||||
<template #target>
|
||||
<button><i class="fas fa-exchange-alt" /> {{ stableOrbCost }}</button>
|
||||
</template>
|
||||
<template #content>
|
||||
<item-quick-price class="text-base" :price="{ min: stableOrbCost, max: stableOrbCost, currency: 'chaos' }"
|
||||
item-img="/images/divine.png" />
|
||||
<div v-for="i in 9" :key="i">
|
||||
<div class="pl-1">{{ i / 10 }} div ⇒ {{ Math.round(stableOrbCost * i / 10) }} c</div>
|
||||
</div>
|
||||
</template>
|
||||
</ui-popover>
|
||||
<i v-else-if="xchgRateLoading()" class="fas fa-dna fa-spin px-2" />
|
||||
<div v-else class="w-8" />
|
||||
</AppTitleBar>
|
||||
<div class="grow layout-column min-h-0 bg-gray-800">
|
||||
<background-info />
|
||||
<check-position-circle v-if="showCheckPos" :position="checkPosition" style="z-index: -1;" />
|
||||
<template v-if="item?.isErr()">
|
||||
<ui-error-box class="m-4">
|
||||
<template #name>{{ t(item.error.name) }}</template>
|
||||
<p>{{ t(item.error.message) }}</p>
|
||||
</ui-error-box>
|
||||
<pre class="bg-gray-900 rounded m-4 overflow-x-hidden p-2">{{ item.error.rawText }}</pre>
|
||||
</template>
|
||||
<template v-else-if="item?.isOk()">
|
||||
<unidentified-resolver :item="item.value" @identify="handleIdentification($event)" />
|
||||
<checked-item v-if="isLeagueSelected" :item="item.value" :advanced-check="advancedCheck" />
|
||||
</template>
|
||||
<div v-if="isBrowserShown" class="bg-gray-900 px-6 py-2 truncate">
|
||||
<i18n-t keypath="app.toggle_browser_hint" tag="div">
|
||||
<span class="bg-gray-400 text-gray-900 rounded px-1">{{ overlayKey }}</span>
|
||||
</i18n-t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<webview v-if="isBrowserShown" ref="iframeEl" class="pointer-events-auto flex-1" width="100%" height="100%" />
|
||||
<div v-else class="layout-column flex-1 min-w-0">
|
||||
<div class="flex" :class="{
|
||||
'flex-row': clickPosition === 'stash',
|
||||
'flex-row-reverse': clickPosition === 'inventory'
|
||||
}">
|
||||
<related-items v-if="item?.isOk()" class="pointer-events-auto" :item="item.value"
|
||||
:click-position="clickPosition" />
|
||||
<rate-limiter-state class="pointer-events-auto" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="top: 0; left: 0; height: 100%; width: 100%; position: absolute"
|
||||
class="flex grow h-full pointer-events-none"
|
||||
:class="{
|
||||
'flex-row': clickPosition === 'stash',
|
||||
'flex-row-reverse': clickPosition === 'inventory',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-if="!isBrowserShown"
|
||||
class="layout-column shrink-0"
|
||||
style="width: var(--game-panel)"
|
||||
></div>
|
||||
<div
|
||||
id="price-window"
|
||||
class="layout-column shrink-0 text-gray-200 pointer-events-auto"
|
||||
style="width: 28.75rem"
|
||||
>
|
||||
<ConversionWarningBanner />
|
||||
<AppTitleBar
|
||||
@close="closePriceCheck"
|
||||
@click="openLeagueSelection"
|
||||
:title="title"
|
||||
>
|
||||
<ui-popover
|
||||
v-if="stableOrbCost"
|
||||
trigger="click"
|
||||
boundary="#price-window"
|
||||
>
|
||||
<template #target>
|
||||
<button>
|
||||
<i class="fas fa-exchange-alt" /> {{ stableOrbCost }}
|
||||
</button>
|
||||
</template>
|
||||
<template #content>
|
||||
<item-quick-price
|
||||
class="text-base"
|
||||
:price="{
|
||||
min: stableOrbCost,
|
||||
max: stableOrbCost,
|
||||
currency: 'chaos',
|
||||
}"
|
||||
item-img="/images/divine.png"
|
||||
/>
|
||||
<div v-for="i in 9" :key="i">
|
||||
<div class="pl-1">
|
||||
{{ i / 10 }} div ⇒ {{ Math.round((stableOrbCost * i) / 10) }} c
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ui-popover>
|
||||
<i v-else-if="xchgRateLoading()" class="fas fa-dna fa-spin px-2" />
|
||||
<div v-else class="w-8" />
|
||||
</AppTitleBar>
|
||||
<div class="grow layout-column min-h-0 bg-gray-800">
|
||||
<background-info />
|
||||
<check-position-circle
|
||||
v-if="showCheckPos"
|
||||
:position="checkPosition"
|
||||
style="z-index: -1"
|
||||
/>
|
||||
<template v-if="item?.isErr()">
|
||||
<ui-error-box class="m-4">
|
||||
<template #name>{{ t(item.error.name) }}</template>
|
||||
<p>{{ t(item.error.message) }}</p>
|
||||
</ui-error-box>
|
||||
<pre class="bg-gray-900 rounded m-4 overflow-x-hidden p-2">{{
|
||||
item.error.rawText
|
||||
}}</pre>
|
||||
</template>
|
||||
<template v-else-if="item?.isOk()">
|
||||
<unidentified-resolver
|
||||
:item="item.value"
|
||||
@identify="handleIdentification($event)"
|
||||
/>
|
||||
<checked-item
|
||||
v-if="isLeagueSelected"
|
||||
:item="item.value"
|
||||
:advanced-check="advancedCheck"
|
||||
/>
|
||||
</template>
|
||||
<div v-if="isBrowserShown" class="bg-gray-900 px-6 py-2 truncate">
|
||||
<i18n-t keypath="app.toggle_browser_hint" tag="div">
|
||||
<span class="bg-gray-400 text-gray-900 rounded px-1">{{
|
||||
overlayKey
|
||||
}}</span>
|
||||
</i18n-t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<webview
|
||||
v-if="isBrowserShown"
|
||||
ref="iframeEl"
|
||||
class="pointer-events-auto flex-1"
|
||||
width="100%"
|
||||
height="100%"
|
||||
/>
|
||||
<div v-else class="layout-column flex-1 min-w-0">
|
||||
<div
|
||||
class="flex"
|
||||
:class="{
|
||||
'flex-row': clickPosition === 'stash',
|
||||
'flex-row-reverse': clickPosition === 'inventory',
|
||||
}"
|
||||
>
|
||||
<related-items
|
||||
v-if="item?.isOk()"
|
||||
class="pointer-events-auto"
|
||||
:item="item.value"
|
||||
:click-position="clickPosition"
|
||||
/>
|
||||
<rate-limiter-state class="pointer-events-auto" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -81,7 +138,11 @@ import ItemQuickPrice from '@/web/ui/ItemQuickPrice.vue'
|
||||
import { PriceCheckWidget, WidgetManager } from '../overlay/interfaces'
|
||||
import ConversionWarningBanner from '../conversion-warn-banner/ConversionWarningBanner.vue'
|
||||
|
||||
type ParseError = { name: string; message: string; rawText: ParsedItem['rawText'] }
|
||||
type ParseError = {
|
||||
name: string;
|
||||
message: string;
|
||||
rawText: ParsedItem['rawText'];
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -107,75 +168,87 @@ export default defineComponent({
|
||||
const wm = inject<WidgetManager>('wm')!
|
||||
const { xchgRate, initialLoading: xchgRateLoading, queuePricesFetch } = usePoeninja()
|
||||
|
||||
nextTick(() => {
|
||||
props.config.wmWants = 'hide'
|
||||
props.config.wmFlags = ['hide-on-blur', 'skip-menu']
|
||||
})
|
||||
nextTick(() => {
|
||||
props.config.wmWants = 'hide';
|
||||
props.config.wmFlags = ['hide-on-blur', 'skip-menu'];
|
||||
});
|
||||
|
||||
const item = shallowRef<null | Result<ParsedItem, ParseError>>(null)
|
||||
const advancedCheck = shallowRef(false)
|
||||
const checkPosition = shallowRef({ x: 1, y: 1 })
|
||||
const item = shallowRef<null | Result<ParsedItem, ParseError>>(null);
|
||||
const advancedCheck = shallowRef(false);
|
||||
const checkPosition = shallowRef({ x: 1, y: 1 });
|
||||
|
||||
MainProcess.onEvent('MAIN->CLIENT::item-text', (e) => {
|
||||
if (e.target !== 'price-check') return
|
||||
MainProcess.onEvent('MAIN->CLIENT::item-text', (e) => {
|
||||
if (e.target !== 'price-check') return;
|
||||
|
||||
if (Host.isElectron && !e.focusOverlay) {
|
||||
// everything in CSS pixels
|
||||
const width = 28.75 * AppConfig().fontSize
|
||||
const screenX = ((e.position.x - window.screenX) > window.innerWidth / 2)
|
||||
? (window.screenX + window.innerWidth) - wm.poePanelWidth.value - width
|
||||
: window.screenX + wm.poePanelWidth.value
|
||||
MainProcess.sendEvent({
|
||||
name: 'OVERLAY->MAIN::track-area',
|
||||
payload: {
|
||||
holdKey: props.config.hotkeyHold,
|
||||
closeThreshold: 2.5 * AppConfig().fontSize,
|
||||
from: e.position,
|
||||
area: {
|
||||
x: screenX,
|
||||
y: window.screenY,
|
||||
width,
|
||||
height: window.innerHeight
|
||||
},
|
||||
dpr: window.devicePixelRatio
|
||||
}
|
||||
})
|
||||
}
|
||||
closeBrowser()
|
||||
wm.show(props.config.wmId)
|
||||
checkPosition.value = e.position
|
||||
advancedCheck.value = e.focusOverlay
|
||||
if (Host.isElectron && !e.focusOverlay) {
|
||||
// everything in CSS pixels
|
||||
const width = 28.75 * AppConfig().fontSize;
|
||||
const screenX =
|
||||
e.position.x - window.screenX > window.innerWidth / 2
|
||||
? window.screenX +
|
||||
window.innerWidth -
|
||||
wm.poePanelWidth.value -
|
||||
width
|
||||
: window.screenX + wm.poePanelWidth.value;
|
||||
MainProcess.sendEvent({
|
||||
name: 'OVERLAY->MAIN::track-area',
|
||||
payload: {
|
||||
holdKey: props.config.hotkeyHold,
|
||||
closeThreshold: 2.5 * AppConfig().fontSize,
|
||||
from: e.position,
|
||||
area: {
|
||||
x: screenX,
|
||||
y: window.screenY,
|
||||
width,
|
||||
height: window.innerHeight,
|
||||
},
|
||||
dpr: window.devicePixelRatio,
|
||||
},
|
||||
});
|
||||
}
|
||||
closeBrowser();
|
||||
wm.show(props.config.wmId);
|
||||
checkPosition.value = e.position;
|
||||
advancedCheck.value = e.focusOverlay;
|
||||
|
||||
item.value = (e.item ? ok(e.item as ParsedItem) : parseClipboard(e.clipboard))
|
||||
.andThen(item => (
|
||||
(item.category === ItemCategory.HeistContract && item.rarity !== ItemRarity.Unique) ||
|
||||
(item.category === ItemCategory.Sentinel && item.rarity !== ItemRarity.Unique))
|
||||
? err('item.unknown')
|
||||
: ok(item))
|
||||
.mapErr(err => ({
|
||||
name: `${err}`,
|
||||
message: `${err}_help`,
|
||||
rawText: e.clipboard
|
||||
}))
|
||||
item.value = (
|
||||
e.item ? ok(e.item as ParsedItem) : parseClipboard(e.clipboard)
|
||||
)
|
||||
.andThen((item) =>
|
||||
(item.category === ItemCategory.HeistContract &&
|
||||
item.rarity !== ItemRarity.Unique) ||
|
||||
(item.category === ItemCategory.Sentinel &&
|
||||
item.rarity !== ItemRarity.Unique)
|
||||
? err('item.unknown')
|
||||
: ok(item)
|
||||
)
|
||||
.mapErr((err) => ({
|
||||
name: `${err}`,
|
||||
message: `${err}_help`,
|
||||
rawText: e.clipboard,
|
||||
}));
|
||||
|
||||
if (item.value.isOk()) {
|
||||
queuePricesFetch()
|
||||
}
|
||||
})
|
||||
if (item.value.isOk()) {
|
||||
queuePricesFetch();
|
||||
}
|
||||
});
|
||||
|
||||
function handleIdentification (identified: ParsedItem) {
|
||||
item.value = ok(identified)
|
||||
}
|
||||
|
||||
MainProcess.onEvent('MAIN->OVERLAY::hide-exclusive-widget', () => {
|
||||
wm.hide(props.config.wmId)
|
||||
})
|
||||
MainProcess.onEvent('MAIN->OVERLAY::hide-exclusive-widget', () => {
|
||||
wm.hide(props.config.wmId);
|
||||
});
|
||||
|
||||
watch(() => props.config.wmWants, (state) => {
|
||||
if (state === 'hide') {
|
||||
closeBrowser()
|
||||
}
|
||||
})
|
||||
watch(
|
||||
() => props.config.wmWants,
|
||||
(state) => {
|
||||
if (state === 'hide') {
|
||||
closeBrowser();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const leagues = useLeagues()
|
||||
const title = computed(() => leagues.selectedId.value || 'Exiled Exchange 2')
|
||||
@@ -195,15 +268,15 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
watch(isBrowserShown, (isShown) => {
|
||||
if (isShown) {
|
||||
wm.setFlag(props.config.wmId, 'hide-on-blur', false)
|
||||
wm.setFlag(props.config.wmId, 'invisible-on-blur', true)
|
||||
} else {
|
||||
wm.setFlag(props.config.wmId, 'invisible-on-blur', false)
|
||||
wm.setFlag(props.config.wmId, 'hide-on-blur', true)
|
||||
}
|
||||
})
|
||||
watch(isBrowserShown, (isShown) => {
|
||||
if (isShown) {
|
||||
wm.setFlag(props.config.wmId, 'hide-on-blur', false);
|
||||
wm.setFlag(props.config.wmId, 'invisible-on-blur', true);
|
||||
} else {
|
||||
wm.setFlag(props.config.wmId, 'invisible-on-blur', false);
|
||||
wm.setFlag(props.config.wmId, 'hide-on-blur', true);
|
||||
}
|
||||
});
|
||||
|
||||
function closePriceCheck () {
|
||||
if (isBrowserShown.value || !Host.isElectron) {
|
||||
@@ -219,7 +292,7 @@ export default defineComponent({
|
||||
wm.show(settings.wmId)
|
||||
}
|
||||
|
||||
const iframeEl = shallowRef<HTMLIFrameElement | null>(null)
|
||||
const iframeEl = shallowRef<HTMLIFrameElement | null>(null);
|
||||
|
||||
function showBrowser (url: string) {
|
||||
wm.setFlag(props.config.wmId, 'has-browser', true)
|
||||
@@ -232,28 +305,28 @@ export default defineComponent({
|
||||
wm.setFlag(props.config.wmId, 'has-browser', false)
|
||||
}
|
||||
|
||||
provide<(url: string) => void>('builtin-browser', showBrowser)
|
||||
provide<(url: string) => void>('builtin-browser', showBrowser);
|
||||
|
||||
const { t } = useI18n()
|
||||
const { t } = useI18n();
|
||||
|
||||
return {
|
||||
t,
|
||||
clickPosition,
|
||||
isBrowserShown,
|
||||
iframeEl,
|
||||
closePriceCheck,
|
||||
title,
|
||||
stableOrbCost,
|
||||
xchgRateLoading,
|
||||
showCheckPos,
|
||||
checkPosition,
|
||||
item,
|
||||
advancedCheck,
|
||||
handleIdentification,
|
||||
overlayKey,
|
||||
isLeagueSelected,
|
||||
openLeagueSelection
|
||||
}
|
||||
}
|
||||
})
|
||||
return {
|
||||
t,
|
||||
clickPosition,
|
||||
isBrowserShown,
|
||||
iframeEl,
|
||||
closePriceCheck,
|
||||
title,
|
||||
stableOrbCost,
|
||||
xchgRateLoading,
|
||||
showCheckPos,
|
||||
checkPosition,
|
||||
item,
|
||||
advancedCheck,
|
||||
handleIdentification,
|
||||
overlayKey,
|
||||
isLeagueSelected,
|
||||
openLeagueSelection,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Host } from '@/web/background/IPC'
|
||||
import { DateTime } from 'luxon'
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Host } from '@/web/background/IPC';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
function checkForUpdates () {
|
||||
Host.sendEvent({
|
||||
@@ -63,31 +63,62 @@ export default defineComponent({
|
||||
setup () {
|
||||
const { t } = useI18n()
|
||||
|
||||
const info = computed(() => {
|
||||
const rawInfo = Host.updateInfo.value
|
||||
switch (rawInfo.state) {
|
||||
case 'initial':
|
||||
return { str1: t('updates.maybe_outdated'), str2: t('updates.never_checked'), action: checkForUpdates, actionText: t('updates.check_now') }
|
||||
case 'checking-for-update':
|
||||
return { str1: t('updates.checking'), str2: t('please_wait') }
|
||||
case 'update-not-available':
|
||||
return { str1: t('updates.latest'), str2: t('updates.last_checked', [fmtTime(rawInfo.checkedAt)]), action: checkForUpdates, actionText: t('updates.check_now') }
|
||||
case 'error':
|
||||
return { str1: t('updates.maybe_outdated'), str2: t('updates.error'), action: openDownloadPage, actionText: t('updates.downloads_page') }
|
||||
case 'update-downloaded':
|
||||
return { str1: t('updates.available', [rawInfo.version]), str2: t('updates.installed_on_exit'), action: quitAndInstall, actionText: t('updates.install_now') }
|
||||
case 'update-available':
|
||||
return (rawInfo.noDownloadReason)
|
||||
? { str1: t('updates.available', [rawInfo.version]), str2: (rawInfo.noDownloadReason === 'not-supported') ? t('updates.download_manually') : t('updates.download_disabled'), action: openDownloadPage, actionText: t('updates.downloads_page') }
|
||||
: { str1: t('updates.available', [rawInfo.version]), str2: t('updates.downloading') }
|
||||
}
|
||||
})
|
||||
const info = computed(() => {
|
||||
const rawInfo = Host.updateInfo.value;
|
||||
switch (rawInfo.state) {
|
||||
case 'initial':
|
||||
return {
|
||||
str1: t('updates.maybe_outdated'),
|
||||
str2: t('updates.never_checked'),
|
||||
action: checkForUpdates,
|
||||
actionText: t('updates.check_now'),
|
||||
};
|
||||
case 'checking-for-update':
|
||||
return { str1: t('updates.checking'), str2: t('please_wait') };
|
||||
case 'update-not-available':
|
||||
return {
|
||||
str1: t('updates.latest'),
|
||||
str2: t('updates.last_checked', [fmtTime(rawInfo.checkedAt)]),
|
||||
action: checkForUpdates,
|
||||
actionText: t('updates.check_now'),
|
||||
};
|
||||
case 'error':
|
||||
return {
|
||||
str1: t('updates.maybe_outdated'),
|
||||
str2: t('updates.error'),
|
||||
action: openDownloadPage,
|
||||
actionText: t('updates.downloads_page'),
|
||||
};
|
||||
case 'update-downloaded':
|
||||
return {
|
||||
str1: t('updates.available', [rawInfo.version]),
|
||||
str2: t('updates.installed_on_exit'),
|
||||
action: quitAndInstall,
|
||||
actionText: t('updates.install_now'),
|
||||
};
|
||||
case 'update-available':
|
||||
return rawInfo.noDownloadReason
|
||||
? {
|
||||
str1: t('updates.available', [rawInfo.version]),
|
||||
str2:
|
||||
rawInfo.noDownloadReason === 'not-supported'
|
||||
? t('updates.download_manually')
|
||||
: t('updates.download_disabled'),
|
||||
action: openDownloadPage,
|
||||
actionText: t('updates.downloads_page'),
|
||||
}
|
||||
: {
|
||||
str1: t('updates.available', [rawInfo.version]),
|
||||
str2: t('updates.downloading'),
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
t,
|
||||
info,
|
||||
version: Host.version
|
||||
}
|
||||
}
|
||||
})
|
||||
return {
|
||||
t,
|
||||
info,
|
||||
version: Host.version,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||