Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions components/StartPage/Download.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,33 @@ function Download({ t, onClose }) {
fetchVersion()
}, [])

const getDownloadLink = () => {
const getDownloadLink = (type) => {
if (os.os === 'Windows') {
return os.architecture === '64-bit'
? `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-x64-${version}.exe`
: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-ia32-${version}.exe`
? `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-x64-${version}-${type}.exe`
: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-ia32-${version}-${type}.exe`
} else if (os.os === 'Linux') {
return `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}.deb`
return `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}-${type}.deb`
}
return '#'
}

const allLinks = [
{
label: 'Windows 64-bit',
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-x64-${version}.exe`,
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-x64-${version}-obs.exe`,
},
{
label: 'Windows 32-bit',
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-ia32-${version}.exe`,
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL-win-ia32-${version}-obs.exe`,
},
{
label: 'Linux .deb',
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}.deb`,
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}-bible.deb`,
},
{
label: 'Linux AppImage',
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}.AppImage`,
link: `https://github.com/hiscoder-com/level-desktop/releases/download/v${version}/LEVEL_${version}-bible.AppImage`,
},
]
const isAvailableCurrentOs = availableOs.includes(os.os)
Expand All @@ -99,9 +100,17 @@ function Download({ t, onClose }) {
</ol>
<p>{t('Download.p2')}</p>
{isAvailableCurrentOs ? (
<Link href={getDownloadLink()} className="font-bold text-th-primary-100">
{t('Download.link')}
</Link>
<>
<Link href={getDownloadLink('obs')} className="font-bold text-th-primary-100">
{t('Download.linkObs')}
</Link>
<Link
href={getDownloadLink('bible')}
className="font-bold text-th-primary-100"
>
{t('Download.linkBible')}
</Link>
</>
) : (
allLinks.map((download) => (
<Link
Expand Down
5 changes: 3 additions & 2 deletions public/locales/en/start-page.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"li2": "Run the file and follow the installation prompts.",
"li3": "Once installed, open the program to explore the test project and familiarize yourself with the platform.",
"p2": "We hope you enjoy using LEVEL! Stay tuned for updates and future releases for other operating systems.",
"link": "Download LEVEL Desktop"
"linkObs": "Download LEVEL Desktop with OBS project",
"linkBible": "Download LEVEL Desktop with Bible project"
},
"Iagree": "I agree",
"Idecline": "I decline",
Expand Down Expand Up @@ -92,4 +93,4 @@
"text": "And this gospel of the kingdom will be preached in the whole world for a testimony to all the nations, and then the end will come."
},
"YourMessageHasBeenSent": "Your message has been sent"
}
}