Skip to content

Commit 3808b61

Browse files
committed
Add F-Droid badge
1 parent b24c640 commit 3808b61

File tree

7 files changed

+99
-20
lines changed

7 files changed

+99
-20
lines changed

vault-web/public/config.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"oauth2ClientId": "7ZEK2BNCEVYEJIZC5OR3TR6PQDUJ4NP3",
44
"oauth2ClientSecret": "VWTMENEWUYWH6G523CEV5CWOCHH7FMECW36PPQENOASYYZOQJOSGQXSR2Y62N3HB",
55
"appStoreUrl": "https://apps.apple.com/app/koofr-vault/id6468869124",
6-
"googlePlayUrl": "https://play.google.com/store/apps/details?id=net.koofr.vault"
6+
"googlePlayUrl": "https://play.google.com/store/apps/details?id=net.koofr.vault",
7+
"fDroidUrl": "https://f-droid.org/en/packages/net.koofr.vault/"
78
}
3.68 KB
Loading
7.29 KB
Loading

vault-web/src/components/intro/IntroModal.tsx

+35-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ import {
1010
useState,
1111
} from 'react';
1212

13+
import appStoreImage from '../../assets/images/apps/app-store.png';
14+
import appStore2xImage from '../../assets/images/apps/app-store@2x.png';
15+
import fDroidImage from '../../assets/images/apps/f-droid.png';
16+
import fDroid2xImage from '../../assets/images/apps/f-droid@2x.png';
17+
import googlePlayImage from '../../assets/images/apps/google-play.png';
18+
import googlePlay2xImage from '../../assets/images/apps/google-play@2x.png';
1319
import intro01Image from '../../assets/images/intro/intro-01.png';
1420
import intro012xImage from '../../assets/images/intro/intro-01@2x.png';
1521
import intro02Image from '../../assets/images/intro/intro-02.png';
16-
import googlePlayImage from '../../assets/images/apps/google-play.png';
17-
import googlePlay2xImage from '../../assets/images/apps/google-play@2x.png';
18-
import appStoreImage from '../../assets/images/apps/app-store.png';
19-
import appStore2xImage from '../../assets/images/apps/app-store@2x.png';
2022
import intro022xImage from '../../assets/images/intro/intro-02@2x.png';
2123
import intro03Image from '../../assets/images/intro/intro-03.png';
2224
import intro032xImage from '../../assets/images/intro/intro-03@2x.png';
@@ -36,6 +38,7 @@ import introEndImage from '../../assets/images/intro/intro-end.png';
3638
import introEnd2xImage from '../../assets/images/intro/intro-end@2x.png';
3739
import introStartImage from '../../assets/images/intro/intro-start.png';
3840
import introStart2xImage from '../../assets/images/intro/intro-start@2x.png';
41+
import { useConfig } from '../../config';
3942
import { buttonStyle } from '../../styles/mixins/buttons';
4043
import { imgRetinaBase } from '../../styles/mixins/images';
4144

@@ -51,7 +54,6 @@ import {
5154
ModalHeader,
5255
ModalTitle,
5356
} from '../modal/Modal';
54-
import { useConfig } from '../../config';
5557

5658
const introButtonColor = '#2286f7';
5759
const introButtonColorHover = '#0870e6';
@@ -322,7 +324,8 @@ const IntroStep5 = memo(() => {
322324
</p>
323325
</div>
324326
{config.appStoreUrl !== undefined ||
325-
config.googlePlayUrl !== undefined ? (
327+
config.googlePlayUrl !== undefined ||
328+
config.fDroidUrl !== undefined ? (
326329
<div
327330
className={css`
328331
${bp.small} {
@@ -359,7 +362,14 @@ const IntroStep5 = memo(() => {
359362
) : null}
360363

361364
{config.appStoreUrl !== undefined ? (
362-
<a href={config.appStoreUrl} target="_blank" rel="noreferrer">
365+
<a
366+
href={config.appStoreUrl}
367+
target="_blank"
368+
rel="noreferrer"
369+
className={css`
370+
margin-right: 20px;
371+
`}
372+
>
363373
<RetinaImage
364374
image={appStoreImage}
365375
image2x={appStore2xImage}
@@ -368,6 +378,24 @@ const IntroStep5 = memo(() => {
368378
/>
369379
</a>
370380
) : null}
381+
382+
{config.fDroidUrl !== undefined ? (
383+
<a
384+
href={config.fDroidUrl}
385+
target="_blank"
386+
rel="noreferrer"
387+
className={css`
388+
margin-right: 20px;
389+
`}
390+
>
391+
<RetinaImage
392+
image={fDroidImage}
393+
image2x={fDroid2xImage}
394+
width={123}
395+
height={36}
396+
/>
397+
</a>
398+
) : null}
371399
</div>
372400
) : null}
373401
</div>

vault-web/src/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface Config {
66
oauth2ClientSecret: string;
77
appStoreUrl?: string;
88
googlePlayUrl?: string;
9+
fDroidUrl?: string;
910
}
1011

1112
export async function loadConfig(): Promise<Config> {

vault-web/src/pages/LandingPageOfficial.tsx

+35-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ import { css, cx } from '@emotion/css';
33
import { memo } from 'react';
44
import Typewriter from 'typewriter-effect';
55

6+
import appStoreImage from '../assets/images/apps/app-store.png';
7+
import appStore2xImage from '../assets/images/apps/app-store@2x.png';
8+
import fDroidImage from '../assets/images/apps/f-droid.png';
9+
import fDroid2xImage from '../assets/images/apps/f-droid@2x.png';
10+
import googlePlayImage from '../assets/images/apps/google-play.png';
11+
import googlePlay2xImage from '../assets/images/apps/google-play@2x.png';
612
import arrowDownImage from '../assets/images/landing/arrow-down.png';
713
import arrowDown2xImage from '../assets/images/landing/arrow-down@2x.png';
814
import arrowRightImage from '../assets/images/landing/arrow-right.png';
915
import arrowRight2xImage from '../assets/images/landing/arrow-right@2x.png';
10-
import googlePlayImage from '../assets/images/apps/google-play.png';
11-
import googlePlay2xImage from '../assets/images/apps/google-play@2x.png';
12-
import appStoreImage from '../assets/images/apps/app-store.png';
13-
import appStore2xImage from '../assets/images/apps/app-store@2x.png';
1416
import graphic1Image from '../assets/images/landing/graphic-1.png';
1517
import graphic12xImage from '../assets/images/landing/graphic-1@2x.png';
1618
import graphic2Image from '../assets/images/landing/graphic-2.png';
@@ -38,10 +40,10 @@ import { BaseAnchorButton } from '../components/Button';
3840
import { GitRelease } from '../components/GitRelease';
3941
import { GitRevision } from '../components/GitRevision';
4042
import { RetinaImage } from '../components/RetinaImage';
43+
import { useConfig } from '../config';
4144
import { buttonStyle } from '../styles/mixins/buttons';
4245
import { allStates } from '../styles/mixins/hover';
4346
import { useDocumentTitle } from '../utils/useDocumentTitle';
44-
import { useConfig } from '../config';
4547

4648
const landingButtonStyle = buttonStyle(
4749
'#1683fb',
@@ -314,7 +316,8 @@ export const LandingPageOfficial = memo(() => {
314316
</BaseAnchorButton>
315317

316318
{config.appStoreUrl !== undefined ||
317-
config.googlePlayUrl !== undefined ? (
319+
config.googlePlayUrl !== undefined ||
320+
config.fDroidUrl !== undefined ? (
318321
<div
319322
className={css`
320323
display: flex;
@@ -341,7 +344,14 @@ export const LandingPageOfficial = memo(() => {
341344
) : null}
342345

343346
{config.appStoreUrl !== undefined ? (
344-
<a href={config.appStoreUrl} target="_blank" rel="noreferrer">
347+
<a
348+
href={config.appStoreUrl}
349+
target="_blank"
350+
rel="noreferrer"
351+
className={css`
352+
margin-right: 20px;
353+
`}
354+
>
345355
<RetinaImage
346356
image={appStoreImage}
347357
image2x={appStore2xImage}
@@ -350,6 +360,24 @@ export const LandingPageOfficial = memo(() => {
350360
/>
351361
</a>
352362
) : null}
363+
364+
{config.fDroidUrl !== undefined ? (
365+
<a
366+
href={config.fDroidUrl}
367+
target="_blank"
368+
rel="noreferrer"
369+
className={css`
370+
margin-right: 20px;
371+
`}
372+
>
373+
<RetinaImage
374+
image={fDroidImage}
375+
image2x={fDroid2xImage}
376+
width={123}
377+
height={36}
378+
/>
379+
</a>
380+
) : null}
353381
</div>
354382
) : null}
355383
</div>

vault-web/src/pages/MobilePage.tsx

+26-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { useLocation } from 'react-router-dom';
44

55
import appStoreImage from '../assets/images/apps/app-store.png';
66
import appStore2xImage from '../assets/images/apps/app-store@2x.png';
7+
import fDroidImage from '../assets/images/apps/f-droid.png';
8+
import fDroid2xImage from '../assets/images/apps/f-droid@2x.png';
79
import googlePlayImage from '../assets/images/apps/google-play.png';
810
import googlePlay2xImage from '../assets/images/apps/google-play@2x.png';
911
import { LinkButton } from '../components/Button';
@@ -75,12 +77,13 @@ export const MobilePage = memo(() => {
7577
</p>
7678

7779
{config.appStoreUrl !== undefined ||
78-
config.googlePlayUrl !== undefined ? (
80+
config.googlePlayUrl !== undefined ||
81+
config.fDroidUrl !== undefined ? (
7982
<div
8083
className={css`
8184
display: flex;
82-
flex-direction: row;
83-
margin: 0 0 30px;
85+
flex-direction: column;
86+
margin: 0 0 20px;
8487
`}
8588
>
8689
{config.googlePlayUrl !== undefined ? (
@@ -89,7 +92,7 @@ export const MobilePage = memo(() => {
8992
target="_blank"
9093
rel="noreferrer"
9194
className={css`
92-
margin-right: 20px;
95+
margin-bottom: 15px;
9396
`}
9497
>
9598
<RetinaImage
@@ -102,7 +105,14 @@ export const MobilePage = memo(() => {
102105
) : null}
103106

104107
{config.appStoreUrl !== undefined ? (
105-
<a href={config.appStoreUrl} target="_blank" rel="noreferrer">
108+
<a
109+
href={config.appStoreUrl}
110+
target="_blank"
111+
rel="noreferrer"
112+
className={css`
113+
margin-bottom: 15px;
114+
`}
115+
>
106116
<RetinaImage
107117
image={appStoreImage}
108118
image2x={appStore2xImage}
@@ -111,6 +121,17 @@ export const MobilePage = memo(() => {
111121
/>
112122
</a>
113123
) : null}
124+
125+
{config.fDroidUrl !== undefined ? (
126+
<a href={config.fDroidUrl} target="_blank" rel="noreferrer">
127+
<RetinaImage
128+
image={fDroidImage}
129+
image2x={fDroid2xImage}
130+
width={123}
131+
height={36}
132+
/>
133+
</a>
134+
) : null}
114135
</div>
115136
) : null}
116137

0 commit comments

Comments
 (0)