Skip to content

Commit b9b106c

Browse files
committed
Download Update sections
1 parent 4759497 commit b9b106c

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

src/assets/icons/icons.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export { default as TelegramSolidIcon } from '@icons/telegram-solid-rounded.svg'
7373
export { default as InformationCircleSolidIcon } from '@icons/information-circle-solid-rounded.svg'
7474
export { default as PolicySolidIcon } from '@icons/policy-solid-rounded.svg'
7575
export { default as BrushSolidIcon } from '@icons/brush-solid-rounded.svg'
76-
export { default as CodeIcon } from '@icons/code-stroke-rounded.svg'
76+
7777
export { default as SunCloudAngledRainZap01Icon } from '@icons/sun-cloud-angled-rain-zap-01-stroke-rounded.svg'
7878
export { default as Wallet02Icon } from '@icons/wallet-02-stroke-rounded.svg'
7979
export { default as DashboardSquare02SolidIcon } from '@icons/dashboard-square-02-solid-rounded.svg'
@@ -125,6 +125,8 @@ export { default as HumiditySolidIcon } from '@icons/humidity-solid-rounded.svg'
125125

126126
export { default as EyeSolidIcon } from '@icons/eye-solid-rounded.svg'
127127
export { default as NaturalFoodSolidIcon } from '@icons/natural-food-solid-rounded.svg'
128-
export { default as AndroidSolidIcon } from '@icons/android-solid-rounded.svg'
128+
129129

130130
export { default as GithubSolidIcon } from '@icons/github-solid-rounded.svg'
131+
132+
export { default as AndroidSolidIcon } from '@icons/android-solid-rounded.svg'

src/assets/icons/src/code-stroke-rounded.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/screens/Update/ForceUpdate.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { AndroidSolidIcon, CodeSolidIcon, GithubSolidIcon } from '@assets/icons/icons'
1+
import { AndroidSolidIcon, GithubSolidIcon } from '@assets/icons/icons'
22
import BackHeader from '@components/BackHeader'
33
import Btn from '@components/Button'
44
import { Gap12 } from '@components/Gap'
55
import RoundedIcon from '@components/RoundedIcon'
66
import { SettGroup, SettOption, SettText, SettWrapper } from '@components/Settings'
77
import type { RouteProp } from '@react-navigation/native'
8-
import { GITHUB_LATEST_RELEASE, GITHUB_REPO, LATEST_APK_FILE } from '@utils/constants'
8+
import { GITHUB_LATEST_RELEASE, GITHUB_REPO } from '@utils/constants'
99
import type { StackNav } from '@utils/types'
1010
import React, { useEffect } from 'react'
1111
import { BackHandler, Linking, ToastAndroid, View } from 'react-native'
@@ -69,27 +69,21 @@ export default function ForceUpdate({
6969
<UpdateAvailableUI version={version} size={size} whatsNew={whatsNew} />
7070
</View>
7171
<View className='mt-2 px-10'>
72-
<Btn title='Download Update' onPress={() => Linking.openURL(LATEST_APK_FILE)} />
72+
<Btn title='Download Update' onPress={() => Linking.openURL(GITHUB_LATEST_RELEASE)} />
7373
</View>
7474
<SettGroup title='Download Options' className='mt-3'>
7575
<SettOption
7676
title='Download From Github'
77-
Icon={<RoundedIcon Icon={GithubSolidIcon} className='bg-black' />}
77+
Icon={<RoundedIcon Icon={AndroidSolidIcon} className='bg-green-500' />}
7878
arrow
7979
onPress={() => Linking.openURL(GITHUB_LATEST_RELEASE)}
8080
/>
8181
<SettOption
8282
title='Source on Github'
83-
Icon={<RoundedIcon Icon={CodeSolidIcon} className='bg-accent' />}
83+
Icon={<RoundedIcon Icon={GithubSolidIcon} className='bg-black' />}
8484
onPress={() => Linking.openURL(GITHUB_REPO)}
8585
arrow
8686
/>
87-
<SettOption
88-
title='Download APK'
89-
Icon={<RoundedIcon Icon={AndroidSolidIcon} className='bg-green-500' />}
90-
arrow
91-
onPress={() => Linking.openURL(LATEST_APK_FILE)}
92-
/>
9387
</SettGroup>
9488
<SettText>
9589
Download size may vary. The Download Now button will redirect you to the GitHub and you can download the

src/utils/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ export const WEATHER_CACHE_TIME = 1000 * 60 * 10 // 10 minutes
44

55
export const GITHUB_REPO = 'https://github.com/codeAbinash/tech-triangle'
66
export const GITHUB_LATEST_RELEASE = 'https://github.com/codeAbinash/tech-triangle/releases/latest'
7-
8-
// TO the latest releases Tech-Triangle.apk file
9-
export const LATEST_APK_FILE = 'https://github.com/codeAbinah/tech-triangle/releases/latest/download/Tech-Triangle.apk'

0 commit comments

Comments
 (0)