Merge pull request #207 from ZhenyaGoroh/Script-for-flatpak-installation

Script for flatpak installation
This commit is contained in:
NOCanoa
2024-10-02 20:54:06 +01:00
committed by GitHub

View File

@@ -192,6 +192,9 @@ export default function DownloadPage() {
const linuxAppimageBashScript =
"bash <(curl https://updates.zen-browser.app/appimage.sh)";
const linuxFlatpakScript =
"flatpak install flathub io.github.zen_browser.zen";
return (
<>
<link
@@ -233,7 +236,7 @@ export default function DownloadPage() {
</div>
{selectedLinuxDownloadType === "appimage" && (
<div className="mt-10 rounded-md border bg-surface p-5 shadow">
<div className="flex">
<div className="flex items-center">
<InfoIcon className="size-4" />
<p className="ml-3 font-bold">AppImage users?</p>
</div>
@@ -241,12 +244,25 @@ export default function DownloadPage() {
If you're using an AppImage, you can use the automatic
installer, check it out{" "}
</p>
<pre className="mt-2 flex items-center rounded-md bg-background p-2 text-muted-foreground">
<pre className="mt-2 flex items-center justify-between rounded-md bg-background p-2 text-muted-foreground">
{linuxAppimageBashScript}
<CopyButton
className="ml-3"
valueToCopy={linuxAppimageBashScript}
/>
<CopyButton valueToCopy={linuxAppimageBashScript} />
</pre>
</div>
)}
{selectedLinuxDownloadType === "flatpak" && (
<div className="mt-10 rounded-md border bg-surface p-5 shadow">
<div className="flex items-center">
<InfoIcon className="size-4" />
<p className="ml-3 font-bold">Flatpak users?</p>
</div>
<p className="mt-2 text-muted-foreground">
If you're using Flatpak, you can install Zen Browser with
the following command
</p>
<pre className="mt-2 flex items-center justify-between rounded-md bg-background p-2 text-muted-foreground">
{linuxFlatpakScript}
<CopyButton valueToCopy={linuxFlatpakScript} />
</pre>
</div>
)}
@@ -347,11 +363,11 @@ export default function DownloadPage() {
Choose the architecture of your device, either optimized or
generic.
</FieldDescription>
<div className="flex items-center justify-center">
<div className="flex items-stretch justify-center">
<div
onClick={() => setSelectedArchitecture("specific")}
className={ny(
"mb-2 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedArchitecture === "specific"
? "border-blue-400"
: "",
@@ -368,7 +384,7 @@ export default function DownloadPage() {
<div
onClick={() => setSelectedArchitecture("generic")}
className={ny(
"mb-2 ml-10 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 ml-10 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedArchitecture === "generic"
? "border-blue-400"
: "",
@@ -443,11 +459,11 @@ export default function DownloadPage() {
<FieldDescription>
Choose the type of download you want for Zen for Windows.
</FieldDescription>
<div className="flex items-center justify-center">
<div className="flex items-stretch justify-center">
<div
onClick={() => setSelectedWindowsDownloadType("installer")}
className={ny(
"mb-2 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedWindowsDownloadType === "installer"
? "border-blue-400"
: "",
@@ -464,7 +480,7 @@ export default function DownloadPage() {
<div
onClick={() => setSelectedWindowsDownloadType("portable")}
className={ny(
"mb-2 ml-10 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 ml-10 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedWindowsDownloadType === "portable"
? "border-blue-400"
: "",
@@ -492,11 +508,11 @@ export default function DownloadPage() {
<FieldDescription>
Choose the type of download you want for Zen for Linux.
</FieldDescription>
<div className="flex items-center justify-center">
<div className="flex items-stretch justify-center">
<div
onClick={() => setSelectedLinuxDownloadType("appimage")}
className={ny(
"mb-2 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedLinuxDownloadType === "appimage"
? "border-blue-400"
: "",
@@ -513,7 +529,7 @@ export default function DownloadPage() {
<div
onClick={() => setSelectedLinuxDownloadType("portable")}
className={ny(
"mb-2 ml-5 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 ml-5 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedLinuxDownloadType === "portable"
? "border-blue-400"
: "",
@@ -530,7 +546,7 @@ export default function DownloadPage() {
<div
onClick={() => changeToFlatpak()}
className={ny(
"mb-2 ml-5 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
"mb-2 ml-5 flex flex-1 cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedLinuxDownloadType === "flatpak"
? "border-blue-400"
: "",