From 7e9e5f2aa73c42e235bcfae54280beca37a64eb5 Mon Sep 17 00:00:00 2001 From: azedval Date: Thu, 27 Mar 2025 10:10:28 +0300 Subject: [PATCH] feat: :sparkles: change download page --- components/StartPage/Download.js | 31 ++++++++++++++++++++----------- public/locales/en/start-page.json | 5 +++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/components/StartPage/Download.js b/components/StartPage/Download.js index d693eb8e..1aadcb07 100644 --- a/components/StartPage/Download.js +++ b/components/StartPage/Download.js @@ -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) @@ -99,9 +100,17 @@ function Download({ t, onClose }) {

{t('Download.p2')}

{isAvailableCurrentOs ? ( - - {t('Download.link')} - + <> + + {t('Download.linkObs')} + + + {t('Download.linkBible')} + + ) : ( allLinks.map((download) => (