style(Update to 2): Update branding

Renamed to Exalted PoE2 Trade
This commit is contained in:
kvan7
2024-12-10 15:47:06 -06:00
committed by Kvan7
parent c3d6c69d9d
commit fd4917ca7f
22 changed files with 414 additions and 275 deletions

View File

@@ -8,7 +8,7 @@ import { useData } from 'vitepress'
const { theme } = useData() const { theme } = useData()
</script> </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. to the developer, downloading from them may be unsafe.
| Download link | Automatic updates | Startup time | | Download link | Automatic updates | Startup time |

View 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"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 712 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

After

Width:  |  Height:  |  Size: 66 KiB

BIN
main/build/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -10,7 +10,7 @@
"fix": "eslint src --fix" "fix": "eslint src --fix"
}, },
"author": { "author": {
"name": "Alexander Drozdov" "name": "Garrett Parker"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -13,21 +13,23 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { shallowRef } from 'vue' import { shallowRef } from 'vue';
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n';
import { Host } from '@/web/background/IPC' import { Host } from '@/web/background/IPC';
import { AppConfig } from '@/web/Config' 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', () => { Host.onEvent('MAIN->OVERLAY::overlay-attached', () => {
if (!show.value && AppConfig().showAttachNotification) { if (!show.value && AppConfig().showAttachNotification) {
show.value = true show.value = true;
setTimeout(() => { show.value = false }, 2500) setTimeout(() => {
show.value = false;
}, 2500);
} }
}) });
</script> </script>
<style lang="postcss" module> <style lang="postcss" module>
@@ -51,7 +53,7 @@ Host.onEvent('MAIN->OVERLAY::overlay-attached', () => {
.box::before { .box::before {
position: absolute; position: absolute;
content: ''; content: '';
background: url('/images/TransferOrb.png') no-repeat top right/contain; background: url('/images/exa.png') no-repeat top right/contain;
right: 100%; right: 100%;
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@@ -1,23 +1,52 @@
<template> <template>
<div style="top: 0; left: 0; height: 100%; width: 100%; position: absolute;" <div
class="flex grow h-full pointer-events-none" :class="{ 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': clickPosition === 'stash',
'flex-row-reverse': clickPosition === 'inventory', 'flex-row-reverse': clickPosition === 'inventory',
}"> }"
<div v-if="!isBrowserShown" class="layout-column shrink-0" style="width: var(--game-panel);"> >
</div> <div
<div id="price-window" class="layout-column shrink-0 text-gray-200 pointer-events-auto" style="width: 28.75rem;"> 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 /> <ConversionWarningBanner />
<AppTitleBar @close="closePriceCheck" @click="openLeagueSelection" :title="title"> <AppTitleBar
<ui-popover v-if="stableOrbCost" trigger="click" boundary="#price-window"> @close="closePriceCheck"
@click="openLeagueSelection"
:title="title"
>
<ui-popover
v-if="stableOrbCost"
trigger="click"
boundary="#price-window"
>
<template #target> <template #target>
<button><i class="fas fa-exchange-alt" /> {{ stableOrbCost }}</button> <button>
<i class="fas fa-exchange-alt" /> {{ stableOrbCost }}
</button>
</template> </template>
<template #content> <template #content>
<item-quick-price class="text-base" :price="{ min: stableOrbCost, max: stableOrbCost, currency: 'chaos' }" <item-quick-price
item-img="/images/divine.png" /> class="text-base"
:price="{
min: stableOrbCost,
max: stableOrbCost,
currency: 'chaos',
}"
item-img="/images/divine.png"
/>
<div v-for="i in 9" :key="i"> <div v-for="i in 9" :key="i">
<div class="pl-1">{{ i / 10 }} div {{ Math.round(stableOrbCost * i / 10) }} c</div> <div class="pl-1">
{{ i / 10 }} div {{ Math.round((stableOrbCost * i) / 10) }} c
</div>
</div> </div>
</template> </template>
</ui-popover> </ui-popover>
@@ -26,33 +55,61 @@
</AppTitleBar> </AppTitleBar>
<div class="grow layout-column min-h-0 bg-gray-800"> <div class="grow layout-column min-h-0 bg-gray-800">
<background-info /> <background-info />
<check-position-circle v-if="showCheckPos" :position="checkPosition" style="z-index: -1;" /> <check-position-circle
v-if="showCheckPos"
:position="checkPosition"
style="z-index: -1"
/>
<template v-if="item?.isErr()"> <template v-if="item?.isErr()">
<ui-error-box class="m-4"> <ui-error-box class="m-4">
<template #name>{{ t(item.error.name) }}</template> <template #name>{{ t(item.error.name) }}</template>
<p>{{ t(item.error.message) }}</p> <p>{{ t(item.error.message) }}</p>
</ui-error-box> </ui-error-box>
<pre class="bg-gray-900 rounded m-4 overflow-x-hidden p-2">{{ item.error.rawText }}</pre> <pre class="bg-gray-900 rounded m-4 overflow-x-hidden p-2">{{
item.error.rawText
}}</pre>
</template> </template>
<template v-else-if="item?.isOk()"> <template v-else-if="item?.isOk()">
<unidentified-resolver :item="item.value" @identify="handleIdentification($event)" /> <unidentified-resolver
<checked-item v-if="isLeagueSelected" :item="item.value" :advanced-check="advancedCheck" /> :item="item.value"
@identify="handleIdentification($event)"
/>
<checked-item
v-if="isLeagueSelected"
:item="item.value"
:advanced-check="advancedCheck"
/>
</template> </template>
<div v-if="isBrowserShown" class="bg-gray-900 px-6 py-2 truncate"> <div v-if="isBrowserShown" class="bg-gray-900 px-6 py-2 truncate">
<i18n-t keypath="app.toggle_browser_hint" tag="div"> <i18n-t keypath="app.toggle_browser_hint" tag="div">
<span class="bg-gray-400 text-gray-900 rounded px-1">{{ overlayKey }}</span> <span class="bg-gray-400 text-gray-900 rounded px-1">{{
overlayKey
}}</span>
</i18n-t> </i18n-t>
</div> </div>
</div> </div>
</div> </div>
<webview v-if="isBrowserShown" ref="iframeEl" class="pointer-events-auto flex-1" width="100%" height="100%" /> <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 v-else class="layout-column flex-1 min-w-0">
<div class="flex" :class="{ <div
class="flex"
:class="{
'flex-row': clickPosition === 'stash', 'flex-row': clickPosition === 'stash',
'flex-row-reverse': clickPosition === 'inventory' 'flex-row-reverse': clickPosition === 'inventory',
}"> }"
<related-items v-if="item?.isOk()" class="pointer-events-auto" :item="item.value" >
:click-position="clickPosition" /> <related-items
v-if="item?.isOk()"
class="pointer-events-auto"
:item="item.value"
:click-position="clickPosition"
/>
<rate-limiter-state class="pointer-events-auto" /> <rate-limiter-state class="pointer-events-auto" />
</div> </div>
</div> </div>
@@ -81,7 +138,11 @@ import ItemQuickPrice from '@/web/ui/ItemQuickPrice.vue'
import { PriceCheckWidget, WidgetManager } from '../overlay/interfaces' import { PriceCheckWidget, WidgetManager } from '../overlay/interfaces'
import ConversionWarningBanner from '../conversion-warn-banner/ConversionWarningBanner.vue' 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({ export default defineComponent({
components: { components: {
@@ -108,23 +169,27 @@ export default defineComponent({
const { xchgRate, initialLoading: xchgRateLoading, queuePricesFetch } = usePoeninja() const { xchgRate, initialLoading: xchgRateLoading, queuePricesFetch } = usePoeninja()
nextTick(() => { nextTick(() => {
props.config.wmWants = 'hide' props.config.wmWants = 'hide';
props.config.wmFlags = ['hide-on-blur', 'skip-menu'] props.config.wmFlags = ['hide-on-blur', 'skip-menu'];
}) });
const item = shallowRef<null | Result<ParsedItem, ParseError>>(null) const item = shallowRef<null | Result<ParsedItem, ParseError>>(null);
const advancedCheck = shallowRef(false) const advancedCheck = shallowRef(false);
const checkPosition = shallowRef({ x: 1, y: 1 }) const checkPosition = shallowRef({ x: 1, y: 1 });
MainProcess.onEvent('MAIN->CLIENT::item-text', (e) => { MainProcess.onEvent('MAIN->CLIENT::item-text', (e) => {
if (e.target !== 'price-check') return if (e.target !== 'price-check') return;
if (Host.isElectron && !e.focusOverlay) { if (Host.isElectron && !e.focusOverlay) {
// everything in CSS pixels // everything in CSS pixels
const width = 28.75 * AppConfig().fontSize const width = 28.75 * AppConfig().fontSize;
const screenX = ((e.position.x - window.screenX) > window.innerWidth / 2) const screenX =
? (window.screenX + window.innerWidth) - wm.poePanelWidth.value - width e.position.x - window.screenX > window.innerWidth / 2
: window.screenX + wm.poePanelWidth.value ? window.screenX +
window.innerWidth -
wm.poePanelWidth.value -
width
: window.screenX + wm.poePanelWidth.value;
MainProcess.sendEvent({ MainProcess.sendEvent({
name: 'OVERLAY->MAIN::track-area', name: 'OVERLAY->MAIN::track-area',
payload: { payload: {
@@ -135,47 +200,55 @@ export default defineComponent({
x: screenX, x: screenX,
y: window.screenY, y: window.screenY,
width, width,
height: window.innerHeight height: window.innerHeight,
}, },
dpr: window.devicePixelRatio dpr: window.devicePixelRatio,
},
});
} }
}) closeBrowser();
} wm.show(props.config.wmId);
closeBrowser() checkPosition.value = e.position;
wm.show(props.config.wmId) advancedCheck.value = e.focusOverlay;
checkPosition.value = e.position
advancedCheck.value = e.focusOverlay
item.value = (e.item ? ok(e.item as ParsedItem) : parseClipboard(e.clipboard)) item.value = (
.andThen(item => ( e.item ? ok(e.item as ParsedItem) : parseClipboard(e.clipboard)
(item.category === ItemCategory.HeistContract && item.rarity !== ItemRarity.Unique) || )
(item.category === ItemCategory.Sentinel && item.rarity !== ItemRarity.Unique)) .andThen((item) =>
(item.category === ItemCategory.HeistContract &&
item.rarity !== ItemRarity.Unique) ||
(item.category === ItemCategory.Sentinel &&
item.rarity !== ItemRarity.Unique)
? err('item.unknown') ? err('item.unknown')
: ok(item)) : ok(item)
.mapErr(err => ({ )
.mapErr((err) => ({
name: `${err}`, name: `${err}`,
message: `${err}_help`, message: `${err}_help`,
rawText: e.clipboard rawText: e.clipboard,
})) }));
if (item.value.isOk()) { if (item.value.isOk()) {
queuePricesFetch() queuePricesFetch();
} }
}) });
function handleIdentification (identified: ParsedItem) { function handleIdentification (identified: ParsedItem) {
item.value = ok(identified) item.value = ok(identified)
} }
MainProcess.onEvent('MAIN->OVERLAY::hide-exclusive-widget', () => { MainProcess.onEvent('MAIN->OVERLAY::hide-exclusive-widget', () => {
wm.hide(props.config.wmId) wm.hide(props.config.wmId);
}) });
watch(() => props.config.wmWants, (state) => { watch(
() => props.config.wmWants,
(state) => {
if (state === 'hide') { if (state === 'hide') {
closeBrowser() closeBrowser();
} }
}) }
);
const leagues = useLeagues() const leagues = useLeagues()
const title = computed(() => leagues.selectedId.value || 'Exiled Exchange 2') const title = computed(() => leagues.selectedId.value || 'Exiled Exchange 2')
@@ -197,13 +270,13 @@ export default defineComponent({
watch(isBrowserShown, (isShown) => { watch(isBrowserShown, (isShown) => {
if (isShown) { if (isShown) {
wm.setFlag(props.config.wmId, 'hide-on-blur', false) wm.setFlag(props.config.wmId, 'hide-on-blur', false);
wm.setFlag(props.config.wmId, 'invisible-on-blur', true) wm.setFlag(props.config.wmId, 'invisible-on-blur', true);
} else { } else {
wm.setFlag(props.config.wmId, 'invisible-on-blur', false) wm.setFlag(props.config.wmId, 'invisible-on-blur', false);
wm.setFlag(props.config.wmId, 'hide-on-blur', true) wm.setFlag(props.config.wmId, 'hide-on-blur', true);
} }
}) });
function closePriceCheck () { function closePriceCheck () {
if (isBrowserShown.value || !Host.isElectron) { if (isBrowserShown.value || !Host.isElectron) {
@@ -219,7 +292,7 @@ export default defineComponent({
wm.show(settings.wmId) wm.show(settings.wmId)
} }
const iframeEl = shallowRef<HTMLIFrameElement | null>(null) const iframeEl = shallowRef<HTMLIFrameElement | null>(null);
function showBrowser (url: string) { function showBrowser (url: string) {
wm.setFlag(props.config.wmId, 'has-browser', true) wm.setFlag(props.config.wmId, 'has-browser', true)
@@ -232,9 +305,9 @@ export default defineComponent({
wm.setFlag(props.config.wmId, 'has-browser', false) 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 { return {
t, t,
@@ -252,8 +325,8 @@ export default defineComponent({
handleIdentification, handleIdentification,
overlayKey, overlayKey,
isLeagueSelected, isLeagueSelected,
openLeagueSelection openLeagueSelection,
} };
} },
}) });
</script> </script>

View File

@@ -30,10 +30,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, computed } from 'vue' import { defineComponent, computed } from 'vue';
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n';
import { Host } from '@/web/background/IPC' import { Host } from '@/web/background/IPC';
import { DateTime } from 'luxon' import { DateTime } from 'luxon';
function checkForUpdates () { function checkForUpdates () {
Host.sendEvent({ Host.sendEvent({
@@ -64,30 +64,61 @@ export default defineComponent({
const { t } = useI18n() const { t } = useI18n()
const info = computed(() => { const info = computed(() => {
const rawInfo = Host.updateInfo.value const rawInfo = Host.updateInfo.value;
switch (rawInfo.state) { switch (rawInfo.state) {
case 'initial': case 'initial':
return { str1: t('updates.maybe_outdated'), str2: t('updates.never_checked'), action: checkForUpdates, actionText: t('updates.check_now') } return {
str1: t('updates.maybe_outdated'),
str2: t('updates.never_checked'),
action: checkForUpdates,
actionText: t('updates.check_now'),
};
case 'checking-for-update': case 'checking-for-update':
return { str1: t('updates.checking'), str2: t('please_wait') } return { str1: t('updates.checking'), str2: t('please_wait') };
case 'update-not-available': case 'update-not-available':
return { str1: t('updates.latest'), str2: t('updates.last_checked', [fmtTime(rawInfo.checkedAt)]), action: checkForUpdates, actionText: t('updates.check_now') } return {
str1: t('updates.latest'),
str2: t('updates.last_checked', [fmtTime(rawInfo.checkedAt)]),
action: checkForUpdates,
actionText: t('updates.check_now'),
};
case 'error': case 'error':
return { str1: t('updates.maybe_outdated'), str2: t('updates.error'), action: openDownloadPage, actionText: t('updates.downloads_page') } return {
str1: t('updates.maybe_outdated'),
str2: t('updates.error'),
action: openDownloadPage,
actionText: t('updates.downloads_page'),
};
case 'update-downloaded': case 'update-downloaded':
return { str1: t('updates.available', [rawInfo.version]), str2: t('updates.installed_on_exit'), action: quitAndInstall, actionText: t('updates.install_now') } return {
str1: t('updates.available', [rawInfo.version]),
str2: t('updates.installed_on_exit'),
action: quitAndInstall,
actionText: t('updates.install_now'),
};
case 'update-available': case 'update-available':
return (rawInfo.noDownloadReason) 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') } 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 { return {
t, t,
info, info,
version: Host.version version: Host.version,
} };
} },
}) });
</script> </script>