@@ -23,15 +23,17 @@ const platforms: Platform[] = [
2323 id : "powershell" ,
2424 name : "Windows (PowerShell)" ,
2525 icon : Monitor ,
26- command : `iwr -Uri "https://tryandromeda.dev/install.ps1" | Invoke-Expression` ,
26+ command :
27+ `iwr -Uri "https://tryandromeda.dev/install.ps1" | Invoke-Expression` ,
2728 downloadUrl : "/install.ps1" ,
2829 color : "blue" ,
2930 } ,
3031 {
3132 id : "cmd" ,
3233 name : "Windows (CMD)" ,
3334 icon : Zap ,
34- command : "curl -L -o install.bat https://tryandromeda.dev/install.bat && install.bat" ,
35+ command :
36+ "curl -L -o install.bat https://tryandromeda.dev/install.bat && install.bat" ,
3537 downloadUrl : "/install.bat" ,
3638 color : "peach" ,
3739 } ,
@@ -40,7 +42,7 @@ const platforms: Platform[] = [
4042export default function InstallToggle ( ) {
4143 const [ selectedPlatform , setSelectedPlatform ] = useState ( "bash" ) ;
4244
43- const currentPlatform = platforms . find ( p => p . id === selectedPlatform ) ! ;
45+ const currentPlatform = platforms . find ( ( p ) => p . id === selectedPlatform ) ! ;
4446
4547 const copyToClipboard = async ( text : string ) => {
4648 try {
@@ -52,63 +54,87 @@ export default function InstallToggle() {
5254 } ;
5355
5456 const downloadScript = ( ) => {
55- const link = document . createElement ( 'a' ) ;
57+ const link = document . createElement ( "a" ) ;
5658 link . href = currentPlatform . downloadUrl ;
57- link . download = currentPlatform . downloadUrl . split ( '/' ) . pop ( ) || ' install' ;
59+ link . download = currentPlatform . downloadUrl . split ( "/" ) . pop ( ) || " install" ;
5860 document . body . appendChild ( link ) ;
5961 link . click ( ) ;
6062 document . body . removeChild ( link ) ;
6163 } ;
6264 return (
63- < div class = "w-full max-w-4xl mx-auto" > { /* Container with consistent theme colors */ }
64- < div class = "relative overflow-hidden bg-base border border-surface1 rounded-2xl shadow-lg" > { /* Header */ }
65+ < div class = "w-full max-w-4xl mx-auto" >
66+ { /* Container with consistent theme colors */ }
67+ < div class = "relative overflow-hidden bg-base border border-surface1 rounded-2xl shadow-lg" >
68+ { /* Header */ }
6569 < div class = "text-center p-6 sm:p-8 pb-4" >
66- < h3 class = "text-xl sm:text-2xl font-bold mb-2 tracking-tight" style = { { color : 'var(--color-text)' } } >
70+ < h3
71+ class = "text-xl sm:text-2xl font-bold mb-2 tracking-tight"
72+ style = { { color : "var(--color-text)" } }
73+ >
6774 Quick Install
6875 </ h3 >
69- < p class = "text-sm sm:text-base font-medium" style = { { color : 'var(--color-subtext1)' } } >
76+ < p
77+ class = "text-sm sm:text-base font-medium"
78+ style = { { color : "var(--color-subtext1)" } }
79+ >
7080 Choose your platform to get started
7181 </ p >
72- </ div > { /* Platform Selection Grid - Smaller boxes */ }
82+ </ div >
83+ { /* Platform Selection Grid - Smaller boxes */ }
7384 < div class = "px-4 sm:px-8 pb-6" >
74- < div class = "grid grid-cols-1 sm:grid-cols-3 gap-3" > { platforms . map ( ( platform ) => {
85+ < div class = "grid grid-cols-1 sm:grid-cols-3 gap-3" >
86+ { platforms . map ( ( platform ) => {
7587 // deno-lint-ignore no-explicit-any
7688 const IconComponent = platform . icon as any ;
7789 const isSelected = selectedPlatform === platform . id ;
78-
90+
7991 return (
8092 < button
8193 key = { platform . id }
8294 type = "button"
83- onClick = { ( ) => setSelectedPlatform ( platform . id ) } class = { `group relative overflow-hidden p-4 rounded-lg border transition-all duration-300 transform ${
95+ onClick = { ( ) => setSelectedPlatform ( platform . id ) }
96+ class = { `group relative overflow-hidden p-4 rounded-lg border transition-all duration-300 transform ${
8497 isSelected
8598 ? `bg-${ platform . color } text-base border-${ platform . color } shadow-lg scale-105`
8699 : "bg-surface0 hover:bg-surface1 border-surface1 hover:border-surface2 hover:scale-102 hover:shadow-md"
87100 } `}
88- style = { isSelected ? {
89- backgroundColor : `var(--color-${ platform . color } )` ,
90- borderColor : `var(--color-${ platform . color } )` ,
91- color : 'var(--color-base)'
92- } : {
93- color : 'var(--color-text)'
94- } } > { /* Icon */ }
101+ style = { isSelected
102+ ? {
103+ backgroundColor : `var(--color-${ platform . color } )` ,
104+ borderColor : `var(--color-${ platform . color } )` ,
105+ color : "var(--color-base)" ,
106+ }
107+ : {
108+ color : "var(--color-text)" ,
109+ } }
110+ >
111+ { /* Icon */ }
95112 < div class = "flex justify-center mb-2" >
96- < div class = { `p-2 rounded-lg transition-colors ${
97- isSelected
98- ? "bg-base/20"
99- : "bg-surface1 group-hover:bg-surface2"
100- } `} > < IconComponent
101- size = { 20 }
113+ < div
114+ class = { `p-2 rounded-lg transition-colors ${
115+ isSelected
116+ ? "bg-base/20"
117+ : "bg-surface1 group-hover:bg-surface2"
118+ } `}
119+ >
120+ < IconComponent
121+ size = { 20 }
102122 class = { isSelected ? "text-base" : "" }
103- style = { isSelected ? { color : 'var(--color-base)' } : { color : 'var(--color-text)' } }
123+ style = { isSelected
124+ ? { color : "var(--color-base)" }
125+ : { color : "var(--color-text)" } }
104126 />
105127 </ div >
106- </ div > { /* Platform name */ }
107- < div class = "text-center" > < div
128+ </ div > { " " }
129+ { /* Platform name */ }
130+ < div class = "text-center" >
131+ < div
108132 class = { `text-xs sm:text-sm font-semibold ${
109133 isSelected ? "text-base" : ""
110134 } `}
111- style = { isSelected ? { color : 'var(--color-base)' } : { color : 'var(--color-text)' } }
135+ style = { isSelected
136+ ? { color : "var(--color-base)" }
137+ : { color : "var(--color-text)" } }
112138 >
113139 { platform . name }
114140 </ div >
@@ -120,31 +146,41 @@ export default function InstallToggle() {
120146 </ div >
121147
122148 { /* Command Section */ }
123- < div class = "px-4 sm:px-8 pb-6 sm:pb-8" > < div class = "bg-mantle rounded-xl border border-surface1 overflow-hidden" >
149+ < div class = "px-4 sm:px-8 pb-6 sm:pb-8" >
150+ < div class = "bg-mantle rounded-xl border border-surface1 overflow-hidden" >
124151 { /* Header with actions */ }
125- < div class = "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-4 bg-surface0 border-b border-surface1" > < h4 class = "text-sm sm:text-base font-semibold flex items-center gap-2" style = { { color : 'var(--color-text)' } } >
126- < Terminal size = { 16 } style = { { color : 'var(--color-subtext1)' } } />
152+ < div class = "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-4 bg-surface0 border-b border-surface1" >
153+ < h4
154+ class = "text-sm sm:text-base font-semibold flex items-center gap-2"
155+ style = { { color : "var(--color-text)" } }
156+ >
157+ < Terminal
158+ size = { 16 }
159+ style = { { color : "var(--color-subtext1)" } }
160+ />
127161 Installation Command
128162 </ h4 >
129- < div class = "flex gap-2" > < button
163+ < div class = "flex gap-2" >
164+ < button
130165 type = "button"
131166 onClick = { downloadScript }
132167 class = "flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200 hover:scale-105 shadow-md hover:shadow-lg"
133168 style = { {
134- backgroundColor : ' var(--color-yellow)' ,
135- color : ' var(--color-base)'
169+ backgroundColor : " var(--color-yellow)" ,
170+ color : " var(--color-base)" ,
136171 } }
137172 title = "Download script"
138173 >
139174 < Download size = { 16 } />
140175 < span class = "hidden sm:inline" > Download</ span >
141- </ button > < button
176+ </ button > { " " }
177+ < button
142178 type = "button"
143179 onClick = { ( ) => copyToClipboard ( currentPlatform . command ) }
144180 class = "flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200 hover:scale-105 shadow-md hover:shadow-lg"
145181 style = { {
146- backgroundColor : ' var(--color-green)' ,
147- color : ' var(--color-base)'
182+ backgroundColor : " var(--color-green)" ,
183+ color : " var(--color-base)" ,
148184 } }
149185 title = "Copy to clipboard"
150186 >
@@ -153,9 +189,12 @@ export default function InstallToggle() {
153189 </ button >
154190 </ div >
155191 </ div >
156- { /* Command display */ }
192+ { /* Command display */ }
157193 < div class = "p-4" >
158- < pre class = "text-sm sm:text-base font-mono leading-relaxed overflow-x-auto" style = { { color : 'var(--color-text)' } } >
194+ < pre
195+ class = "text-sm sm:text-base font-mono leading-relaxed overflow-x-auto"
196+ style = { { color : "var(--color-text)" } }
197+ >
159198 < code > { currentPlatform . command } </ code >
160199 </ pre >
161200 </ div >
@@ -164,9 +203,23 @@ export default function InstallToggle() {
164203
165204 { /* Info note */ }
166205 < div class = "px-4 sm:px-8 pb-6 sm:pb-8" >
167- < div class = "bg-surface0/50 rounded-lg border border-surface1/50 p-4" > < p class = "text-xs sm:text-sm leading-relaxed" style = { { color : 'var(--color-subtext1)' } } >
168- < span class = "font-semibold" style = { { color : 'var(--color-text)' } } > Note:</ span > These scripts automatically detect your platform, download the appropriate binary, and add it to your PATH.{ " " }
169- < span class = "hidden sm:inline" > You can also download and inspect the scripts before running them.</ span >
206+ < div class = "bg-surface0/50 rounded-lg border border-surface1/50 p-4" >
207+ < p
208+ class = "text-xs sm:text-sm leading-relaxed"
209+ style = { { color : "var(--color-subtext1)" } }
210+ >
211+ < span
212+ class = "font-semibold"
213+ style = { { color : "var(--color-text)" } }
214+ >
215+ Note:
216+ </ span > { " " }
217+ These scripts automatically detect your platform, download the
218+ appropriate binary, and add it to your PATH.{ " " }
219+ < span class = "hidden sm:inline" >
220+ You can also download and inspect the scripts before running
221+ them.
222+ </ span >
170223 </ p >
171224 </ div >
172225 </ div >
0 commit comments