33import Button from '@/components/Button/Button'
44import useWebgalTerreAssets from '@/hooks/useWebgalTerreAssets'
55import Link from 'next/link'
6- import { RiGithubFill , RiMicrosoftFill , RiAppleFill , RiUbuntuFill } from 'react-icons/ri'
6+ import { RiGithubFill , RiMicrosoftFill , RiAppleFill , RiUbuntuFill , RiAndroidFill } from 'react-icons/ri'
77import styles from '../Download.module.css'
8- import { useLocale , useTranslations } from 'next-intl'
9- import { i18n } from '@/i18n'
8+ import { useLocale , useTranslations } from 'next-intl'
9+ import { i18n } from '@/i18n'
1010
1111const DownloadWebgalTerre = ( ) => {
1212
@@ -28,20 +28,21 @@ const DownloadWebgalTerre = () => {
2828 : null
2929
3030 const platformMap = [
31- { platform : 'windows' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindows' ) } ,
32- { platform : 'windowsSetup' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsSetup' ) } ,
33- { platform : 'windowsArm64' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsArm64' ) } ,
34- { platform : 'windowsArm64Setup' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsArm64Setup' ) } ,
35- { platform : 'macos' , icon : < RiAppleFill /> , label : t ( 'downloadMacos' ) } ,
36- { platform : 'linux' , icon : < RiUbuntuFill /> , label : t ( 'downloadLinux' ) } ,
37- { platform : 'linuxArm64' , icon : < RiUbuntuFill /> , label : t ( 'downloadLinuxArm64' ) } ,
31+ { platform : 'windows' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindows' ) } ,
32+ { platform : 'windowsSetup' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsSetup' ) } ,
33+ { platform : 'windowsArm64' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsArm64' ) } ,
34+ { platform : 'windowsArm64Setup' , icon : < RiMicrosoftFill /> , label : t ( 'downloadWindowsArm64Setup' ) } ,
35+ { platform : 'macos' , icon : < RiAppleFill /> , label : t ( 'downloadMacos' ) } ,
36+ { platform : 'linux' , icon : < RiUbuntuFill /> , label : t ( 'downloadLinux' ) } ,
37+ { platform : 'linuxArm64' , icon : < RiUbuntuFill /> , label : t ( 'downloadLinuxArm64' ) } ,
38+ { platform : 'android' , icon : < RiAndroidFill /> , label : t ( 'downloadAndroid' ) }
3839 ]
3940
4041 const downloadUrls = webgalTerreAssets ?. downloadUrl
4142 . map ( ( item ) => {
4243 const test = platformMap . find ( platform => item . platform === platform . platform )
4344 if ( test )
44- return { url : item . url , ...test }
45+ return { url : item . url , ...test }
4546 } )
4647
4748 const isZh = locale === 'zh-cn'
@@ -63,44 +64,44 @@ const DownloadWebgalTerre = () => {
6364 < p > < strong > { t ( 'releaseNote' ) } :</ strong > { ! ( releaseNote ) && t ( 'fetching' ) } </ p >
6465 {
6566 releaseNote &&
66- < div dangerouslySetInnerHTML = { { __html : releaseNote } } className = { styles [ 'release-note' ] } />
67+ < div dangerouslySetInnerHTML = { { __html : releaseNote } } className = { styles [ 'release-note' ] } />
6768 }
6869 </ div >
6970 </ div >
7071 < div className = { styles [ 'card-button-gourp' ] } >
7172 < Button terre >
72- < Link href = { webgalTerreUrl } target = { '_blank' } > < RiGithubFill /> { t ( 'gitHubReleases' ) } </ Link >
73+ < Link href = { webgalTerreUrl } target = { '_blank' } > < RiGithubFill /> { t ( 'gitHubReleases' ) } </ Link >
7374 </ Button >
7475 {
7576 downloadUrls &&
7677 downloadUrls . map ( ( item ) =>
7778 item ?. url &&
78- < Button terre key = { item . platform } >
79- < Link href = { item . url } target = '_top' > { item . icon } { item . label } </ Link >
80- </ Button >
79+ < Button terre key = { item . platform } >
80+ < Link href = { item . url } target = '_top' > { item . icon } { item . label } </ Link >
81+ </ Button >
8182 )
8283 }
8384
8485 </ div >
8586 {
8687 isZh && downloadUrls && < div className = { styles . cndownload } >
8788 { /*<details className='space-y-4'>*/ }
88- < div className = 'text-terre select-none' >
89- { t ( 'otherDownloadLinkInfo' ) }
90- </ div >
91- < div className = { styles [ 'card-button-gourp' ] } >
92- {
93- downloadUrls &&
94- downloadUrls . map ( ( item ) =>
95- item ?. url &&
96- < Button terre key = { item . platform } >
97- < Link href = { ghproxyStr + item . url } target = '_top' > { item . icon } { item . label } </ Link >
98- </ Button >
99- )
100- }
101- </ div >
102- { /*</details>*/ }
89+ < div className = 'text-terre select-none' >
90+ { t ( 'otherDownloadLinkInfo' ) }
91+ </ div >
92+ < div className = { styles [ 'card-button-gourp' ] } >
93+ {
94+ downloadUrls &&
95+ downloadUrls . map ( ( item ) =>
96+ item ?. url &&
97+ < Button terre key = { item . platform } >
98+ < Link href = { ghproxyStr + item . url } target = '_top' > { item . icon } { item . label } </ Link >
99+ </ Button >
100+ )
101+ }
103102 </ div >
103+ { /*</details>*/ }
104+ </ div >
104105 }
105106 </ div >
106107 )
0 commit comments