Skip to content

Commit 56333c5

Browse files
authored
Added RPM packages to download page (#131)
1 parent ef7ee20 commit 56333c5

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

src/components/base/types/platform.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ export enum PlatformType {
44
MACOSARM = 2,
55
DEBIAN = 3,
66
ARCHLINUX = 4,
7+
FEDORAARM = 5,
8+
FEDORAX86 = 6,
79
}

src/components/buttons/DownloadButton/DownloadButton.tsx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ export const DownloadButton = ({ platformType, owner, repo, version }: DownloadP
4848
setDownloadName(`defguard-client_${version}_amd64.deb`);
4949
break;
5050
}
51+
case PlatformType.FEDORAARM: {
52+
setDownloadName(`defguard-client-${version}-1.aarch64.rpm`);
53+
break;
54+
}
55+
case PlatformType.FEDORAX86: {
56+
setDownloadName(`defguard-client-${version}-1.x86_64.rpm`);
57+
break;
58+
}
5159
}
5260
}, [platform, version]);
5361

@@ -85,7 +93,10 @@ export const DownloadButton = ({ platformType, owner, repo, version }: DownloadP
8593
</div>
8694
</>
8795
)}
88-
{(platform === PlatformType.DEBIAN || platform === PlatformType.ARCHLINUX) && (
96+
{(platform === PlatformType.DEBIAN ||
97+
platform === PlatformType.ARCHLINUX ||
98+
platform === PlatformType.FEDORAARM ||
99+
platform === PlatformType.FEDORAX86) && (
89100
<>
90101
<div className="download-icon">
91102
<LinuxIcon />
@@ -112,6 +123,26 @@ export const DownloadButton = ({ platformType, owner, repo, version }: DownloadP
112123
Debian
113124
</a>
114125
</li>
126+
<li>
127+
<a
128+
onClick={() => {
129+
swapPlatform(PlatformType.FEDORAARM);
130+
setIsLinuxMenuClicked(false);
131+
}}
132+
>
133+
Fedora (ARM)
134+
</a>
135+
</li>
136+
<li>
137+
<a
138+
onClick={() => {
139+
swapPlatform(PlatformType.FEDORAX86);
140+
setIsLinuxMenuClicked(false);
141+
}}
142+
>
143+
Fedora (x86)
144+
</a>
145+
</li>
115146
<li>
116147
<a
117148
onClick={() => {
@@ -199,11 +230,15 @@ export const DownloadButton = ({ platformType, owner, repo, version }: DownloadP
199230
{(platform === PlatformType.DEBIAN ||
200231
platform === PlatformType.MACOSINTEL ||
201232
platform === PlatformType.MACOSARM ||
202-
platform === PlatformType.WINDOWS) && <>Download now</>}
233+
platform === PlatformType.WINDOWS ||
234+
platform === PlatformType.FEDORAX86 ||
235+
platform === PlatformType.FEDORAARM) && <>Download now</>}
203236
{platform === PlatformType.ARCHLINUX && <>AUR package</>}
204237
{platform === PlatformType.DEBIAN && <p>Debian package</p>}
205238
{platform === PlatformType.MACOSINTEL && <p>Apple Intel</p>}
206239
{platform === PlatformType.MACOSARM && <p>Apple ARM</p>}
240+
{platform === PlatformType.FEDORAX86 && <p>Fedora (x86)</p>}
241+
{platform === PlatformType.FEDORAARM && <p>Fedora (ARM)</p>}
207242
</div>
208243
<div className="btn">
209244
{isButtonClicked ? (
@@ -216,7 +251,10 @@ export const DownloadButton = ({ platformType, owner, repo, version }: DownloadP
216251
</div>
217252
</a>
218253
<div className="download-footer">
219-
{(platform === PlatformType.DEBIAN || platform === PlatformType.ARCHLINUX) && (
254+
{(platform === PlatformType.DEBIAN ||
255+
platform === PlatformType.ARCHLINUX ||
256+
platform === PlatformType.FEDORAARM ||
257+
platform === PlatformType.FEDORAX86) && (
220258
<>
221259
<p>
222260
Other ways to install Defguard on linux →{" "}

0 commit comments

Comments
 (0)