1+ import { useTheme } from '../hooks/useTheme' ;
12import useRandomIcon from '../hooks/useRandomIcon' ;
23import useDownloadLink from '../hooks/useDownloadLink' ;
34
4- function ActionButtons ( { downloadUrl, isMobile } ) {
5+ const BASE_URL = 'https://raw.githubusercontent.com/Balackburn/Apollo/refs/heads/main' ;
6+ const REDIRECT = 'https://intradeus.github.io/http-protocol-redirector?r=' ;
7+ const BASE = import . meta. env . BASE_URL ;
8+
9+ const SOURCES = [
10+ {
11+ title : 'Standard' ,
12+ description : 'Apollo + ImprovedCustomApi' ,
13+ json : 'apps.json' ,
14+ } ,
15+ {
16+ title : 'No Extensions' ,
17+ description : 'Fewer App IDs (1 vs 7) — ideal for free developer accounts' ,
18+ json : 'apps_noext.json' ,
19+ } ,
20+ {
21+ title : 'GLASS' ,
22+ description : 'Liquid Glass UI Patch (iOS 26+)' ,
23+ json : 'apps_glass.json' ,
24+ } ,
25+ {
26+ title : 'No Extensions + GLASS' ,
27+ description : 'Both options combined (iOS 26+)' ,
28+ json : 'apps_noext_glass.json' ,
29+ } ,
30+ ] ;
31+
32+ function SourceButtons ( { jsonFile, isDark } ) {
33+ const folder = isDark ? 'DARK' : 'LIGHT' ;
34+ const jsonUrl = `${ BASE_URL } /${ jsonFile } ` ;
35+
36+ const buttons = [
37+ {
38+ href : `${ REDIRECT } altstore://source?url=${ jsonUrl } ` ,
39+ alt : 'Add to AltStore' ,
40+ img : `${ BASE } images/buttons/${ folder } /Altstore.png` ,
41+ } ,
42+ {
43+ href : `${ REDIRECT } feather://source/${ jsonUrl } ` ,
44+ alt : 'Add to Feather' ,
45+ img : `${ BASE } images/buttons/${ folder } /Feather.png` ,
46+ } ,
47+ {
48+ href : `${ REDIRECT } sidestore://source?url=${ jsonUrl } ` ,
49+ alt : 'Add to SideStore' ,
50+ img : `${ BASE } images/buttons/${ folder } /Sidestore.png` ,
51+ } ,
52+ {
53+ href : jsonUrl ,
54+ alt : 'Direct URL' ,
55+ img : `${ BASE } images/buttons/${ folder } /DirectURL.png` ,
56+ } ,
57+ ] ;
58+
559 return (
6- < div className = { `app__buttons ${ isMobile ? 'app__buttons--mobile container' : 'app__buttons--desktop' } ` } >
7- < a
8- className = "app__button-ios"
9- href = "altstore://source/?url=https://balackburn.github.io/Apollo/apps.json"
10- target = "_blank"
11- rel = "noreferrer"
12- title = "Add to Altstore"
13- >
14- < img alt = "Add to Altstore" src = { isMobile ? '/images/UI/image_4.webp' : '/images/UI/image_1.webp' } />
15- </ a >
16- < a
17- className = "app__button-web"
18- href = "https://github.com/Balackburn/Apollo"
19- target = "_blank"
20- rel = "noreferrer"
21- title = "See on Github"
22- >
23- < img alt = "See on Github" src = { isMobile ? '/images/UI/image_5.webp' : '/images/UI/image_2.webp' } />
60+ < div className = "source-buttons" >
61+ { buttons . map ( ( btn ) => (
62+ < a key = { btn . alt } href = { btn . href } target = "_blank" rel = "noreferrer" title = { btn . alt } >
63+ < img alt = { btn . alt } src = { btn . img } />
64+ </ a >
65+ ) ) }
66+ </ div >
67+ ) ;
68+ }
69+
70+ function BottomLinks ( { downloadUrl, isDark } ) {
71+ const folder = isDark ? 'DARK' : 'LIGHT' ;
72+
73+ return (
74+ < div className = "bottom-links" >
75+ < a href = { downloadUrl } target = "_blank" rel = "noreferrer" title = ".ipa Download" >
76+ < img alt = ".ipa Download" src = { `${ BASE } images/buttons/${ folder } /Download.png` } />
2477 </ a >
25- < a
26- className = "app__button-download"
27- href = { downloadUrl }
28- target = "_blank"
29- rel = "noreferrer"
30- title = ".ipa download"
31- >
32- < img alt = ".ipa download" src = "/images/UI/image_3.webp" />
78+ < a href = "https://github.com/Balackburn/Apollo" target = "_blank" rel = "noreferrer" title = "GitHub" >
79+ < img alt = "GitHub" src = { `${ BASE } images/buttons/${ folder } /Github.png` } />
3380 </ a >
3481 </ div >
3582 ) ;
@@ -38,6 +85,7 @@ function ActionButtons({ downloadUrl, isMobile }) {
3885export default function Header ( ) {
3986 const iconSrc = useRandomIcon ( ) ;
4087 const downloadUrl = useDownloadLink ( ) ;
88+ const { isDark } = useTheme ( ) ;
4189
4290 return (
4391 < >
@@ -47,11 +95,20 @@ export default function Header() {
4795 </ div >
4896 < div className = "app__infos" >
4997 < h1 className = "app__name" > Apollo for Reddit</ h1 >
50- < p className = "app__description" > The award-winning Reddit app !</ p >
51- < ActionButtons downloadUrl = { downloadUrl } isMobile = { false } />
98+ < p className = "app__description" > The award-winning Reddit app !</ p >
5299 </ div >
53100 </ header >
54- < ActionButtons downloadUrl = { downloadUrl } isMobile = { true } />
101+
102+ < section className = "app__sources container" >
103+ { SOURCES . map ( ( source ) => (
104+ < div key = { source . title } className = "source-section" >
105+ < h2 className = "source-title" > { source . title } </ h2 >
106+ < p className = "source-desc" > { source . description } </ p >
107+ < SourceButtons jsonFile = { source . json } isDark = { isDark } />
108+ </ div >
109+ ) ) }
110+ < BottomLinks downloadUrl = { downloadUrl } isDark = { isDark } />
111+ </ section >
55112 </ >
56113 ) ;
57114}
0 commit comments