Skip to content

Commit

Permalink
fix(style): lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Dec 26, 2024
1 parent 592235c commit 23666b9
Show file tree
Hide file tree
Showing 4 changed files with 1,563 additions and 1,454 deletions.
15 changes: 11 additions & 4 deletions components/DownloadBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
</template>

<script setup lang="ts">
import { getLatestRelease, getStoreRelease, type LatestReleaseResponse } from '@/getLatestRelease'
import {
getLatestRelease,
getStoreRelease,
type LatestReleaseResponse,
} from '@/getLatestRelease'
import { getBrowserOs } from '@/getBrowserOs'
import { useI18n } from 'vue-i18n'
import { GITHUB_RELEASE_URL, URL_RELEASE_BASE } from '@/constants'
Expand All @@ -43,10 +47,13 @@ const { data }: { data: Ref<LatestReleaseResponse | undefined> } =
const os = computed(() => getBrowserOs(navigator))
const storeRelease = computed(() => os.value ? getStoreRelease({ os: os.value }) : null)
const downloadRelease = computed(() => os.value ? getLatestRelease({ os: os.value, data: data.value }) : null)
const storeRelease = computed(() =>
os.value ? getStoreRelease({ os: os.value }) : null,
)
const downloadRelease = computed(() =>
os.value ? getLatestRelease({ os: os.value, data: data.value }) : null,
)
const release = computed(() => storeRelease.value ?? downloadRelease.value)
</script>

<style lang="scss">
Expand Down
13 changes: 5 additions & 8 deletions getLatestRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@ export function getLatestRelease({
data: LatestReleaseResponse | undefined
}): Release | null {
if (data) {
const macRelease: ReleaseAsset = data.assets.find(
(asset: ReleaseAsset) => {
return asset.browser_download_url.includes('myWitWallet.dmg')
},
) ?? { browser_download_url: GITHUB_RELEASE_URL, name: null }
const linuxRelease: ReleaseAsset = data.assets.find(
(asset: ReleaseAsset) =>
asset.browser_download_url.includes('linux.tar.gz'),
const macRelease: ReleaseAsset = data.assets.find((asset: ReleaseAsset) => {
return asset.browser_download_url.includes('myWitWallet.dmg')
}) ?? { browser_download_url: GITHUB_RELEASE_URL, name: null }
const linuxRelease: ReleaseAsset = data.assets.find((asset: ReleaseAsset) =>
asset.browser_download_url.includes('linux.tar.gz'),
) ?? { browser_download_url: GITHUB_RELEASE_URL, name: null }

const release: Record<string, Release> = {
Expand Down
Loading

0 comments on commit 23666b9

Please # to comment.