Skip to content

Commit

Permalink
fix: update windows release url
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Jan 26, 2024
1 parent d1f9152 commit 0e9b700
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ node_modules
.env
dist
.DS_Store
assets/.DS_Store
assets/svg/.DS_Store
1 change: 1 addition & 0 deletions components/DownloadBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
v-if="release.platform"
class="link"
:href="release.releaseUrl"
target="_blank"
:download="release.downloadName"
>
<ElButton class="btn" type="primary">
Expand Down
2 changes: 1 addition & 1 deletion getBrowserOs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEFAULT_OS } from './constants'

export function getBrowserOs(navigator: any) {
const supportedOs = ['Win', 'Mac', 'Linux', 'MacIntel']
const supportedOs = ['Mac', 'Linux', 'MacIntel']
const platform = navigator.platform
return supportedOs.find((os) => platform.includes(os)) || DEFAULT_OS
}
9 changes: 3 additions & 6 deletions getLatestRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ export async function getLatestRelease(navigator: any): Promise<Release> {
const linuxRelease = await result.data.assets.find((asset: any) =>
asset.browser_download_url.includes('linux.tar.gz')
)
const windowsRelease = await result.data.assets.find((asset: any) =>
asset.browser_download_url.includes('myWitWallet-windows.zip')
)
const release: Record<string, Release> = {
linux: {
platform: 'GNU / Linux',
Expand All @@ -28,13 +25,13 @@ export async function getLatestRelease(navigator: any): Promise<Release> {
},
win: {
platform: 'Windows',
releaseUrl: windowsRelease.browser_download_url,
downloadName: windowsRelease.name,
releaseUrl: 'https://apps.microsoft.com/detail/9PN09DKWPL57',
downloadName: 'myWitWallet',
},
mac: {
platform: 'Mac OS',
releaseUrl: macRelease.browser_download_url,
downloadName: windowsRelease.name,
downloadName: macRelease.name,
},
}
return release[os]
Expand Down

0 comments on commit 0e9b700

Please sign in to comment.