Skip to content

Commit

Permalink
add poe2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
SnosMe committed Dec 6, 2024
1 parent 7d3bfd5 commit e6a91a4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"expiry-map": "^2.0.0",
"file-saver": "^2.0.2",
"idb": "^7.0.0",
"pathofexile-dat": "^10.0.0",
"pathofexile-dat": "^11.0.0",
"pathofexile-dat-schema": "^6.0.1",
"string-metric": "^0.3.3",
"tailwindcss": "^3.0.0",
Expand Down
18 changes: 12 additions & 6 deletions viewer/src/app/workbench/ImportDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@
:disabled="isCdnImportRunning"
:loading="isCdnImportRunning">{{ isCdnImportRunning ? 'Wait...' : 'Import' }}</button>
</div>
<div v-if="latestPoEPatch && poePatch !== latestPoEPatch">
Latest PoE patch is <code class="px-1 border border-gray-300 rounded">{{ latestPoEPatch }}</code>,
and version <code class="px-1 border border-gray-300 rounded">{{ 'TODO' }}</code> for PoE2.
<div v-if="latestPoEPatch">
<p>
Latest PoE patch is <code class="px-1 border border-gray-300 rounded">{{ latestPoEPatch.poe }}</code>,
and version <code class="px-1 border border-gray-300 rounded">{{ latestPoEPatch.poe2 }}</code> for PoE2.
</p>
<p v-if="index.isLoaded && index.loader.patchVersion !== latestPoEPatch.poe && index.loader.patchVersion !== latestPoEPatch.poe2" class="text-red-600">
You can continue to work with cached files.<br>But don't delay updating the patch version, otherwise you may experience download errors.
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -69,7 +74,7 @@ export default defineComponent({
const db = inject<DatSchemasDatabase>('dat-schemas')!
const poePatch = shallowRef(localStorage.getItem('POE_PATCH_VER') || '')
const latestPoEPatch = shallowRef('')
const latestPoEPatch = shallowRef<{ poe: string, poe2: string } | undefined>()
if (poePatch.value && !index.isLoaded) {
cdnImport()
Expand Down Expand Up @@ -106,12 +111,13 @@ export default defineComponent({
}
async function getLatestPoEPatch () {
const res = await fetch('https://raw.githubusercontent.com/poe-tool-dev/latest-patch-version/main/latest.txt')
const version = await res.text()
const res = await fetch('https://poe-versions.obsoleet.org')
const version = await res.json()
latestPoEPatch.value = version
}
return {
index,
poePatch,
latestPoEPatch,
isCdnImportRunning: computed(() => index.loader.progress.value != null),
Expand Down

0 comments on commit e6a91a4

Please sign in to comment.