mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(website): different download behaviour for Linux
This commit is contained in:
parent
46d2d7e160
commit
bf04e5a15b
@ -14,17 +14,39 @@ export default function DownloadButton({ big }: DownloadButtonProps) {
|
|||||||
useEffect(() => setRecommendedDownload(getRecommendedDownload()), []);
|
useEffect(() => setRecommendedDownload(getRecommendedDownload()), []);
|
||||||
|
|
||||||
return (recommendedDownload &&
|
return (recommendedDownload &&
|
||||||
<Button
|
<>
|
||||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
{recommendedDownload.platform !== "linux"
|
||||||
href={recommendedDownload.url}
|
? (
|
||||||
iconSvg={downloadIcon}
|
<Button
|
||||||
text={<>
|
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||||
Download now{" "}
|
href={recommendedDownload.url}
|
||||||
{big
|
iconSvg={downloadIcon}
|
||||||
? <span class="platform">v{packageJson.version} for {recommendedDownload.name}</span>
|
text={<>
|
||||||
: <span class="platform">for {recommendedDownload.name}</span>
|
Download now{" "}
|
||||||
}
|
{big
|
||||||
</>}
|
? <span class="platform">v{packageJson.version} for {recommendedDownload.name}</span>
|
||||||
/>
|
: <span class="platform">for {recommendedDownload.name}</span>
|
||||||
|
}
|
||||||
|
</>}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||||
|
href="/get-started/"
|
||||||
|
iconSvg={downloadIcon}
|
||||||
|
text={<>
|
||||||
|
Download now{" "}
|
||||||
|
{big
|
||||||
|
? <span class="platform">v{packageJson.version} for Linux</span>
|
||||||
|
: <span class="platform">for Linux</span>
|
||||||
|
}
|
||||||
|
</>}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{big && (
|
||||||
|
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ function HeroSection() {
|
|||||||
|
|
||||||
<div className="download-wrapper">
|
<div className="download-wrapper">
|
||||||
<DownloadButton big />
|
<DownloadButton big />
|
||||||
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
|
||||||
<Button href="./get-started/" className="mobile-only" text="Get started" />
|
<Button href="./get-started/" className="mobile-only" text="Get started" />
|
||||||
<div className="additional-options">
|
<div className="additional-options">
|
||||||
<Button iconSvg={gitHubIcon} outline text="GitHub" href="https://github.com/TriliumNext/Trilium/" openExternally />
|
<Button iconSvg={gitHubIcon} outline text="GitHub" href="https://github.com/TriliumNext/Trilium/" openExternally />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user