tfrere HF Staff commited on
Commit
d355989
·
1 Parent(s): 3e570cf

fix: Windows download page improvements - Fix .msi.zip.sig being downloaded instead of .msi - Add Windows beta warning with admin privileges notice - Extract platform icons to external SVG files (white fill) - Add Beta badge on Windows platform card

Browse files
public/assets/apple-logo.svg ADDED
public/assets/linux-logo.svg ADDED
public/assets/windows-logo.svg ADDED
src/pages/Download.jsx CHANGED
@@ -12,7 +12,6 @@ import {
12
  CircularProgress,
13
  } from '@mui/material';
14
  import DownloadIcon from '@mui/icons-material/Download';
15
- import AppleIcon from '@mui/icons-material/Apple';
16
  import CheckCircleIcon from '@mui/icons-material/CheckCircle';
17
  import OpenInNewIcon from '@mui/icons-material/OpenInNew';
18
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
@@ -27,32 +26,24 @@ const PLATFORMS = {
27
  subtitle: 'Apple Silicon',
28
  arch: 'M1, M2, M3, M4',
29
  format: '.dmg',
30
- icon: AppleIcon,
31
- color: '#a3a3a3',
32
  },
33
  'darwin-x86_64': {
34
  name: 'macOS',
35
  subtitle: 'Intel',
36
  arch: 'x86_64',
37
  format: '.dmg',
38
- icon: AppleIcon,
39
- color: '#a3a3a3',
40
  },
41
  'windows-x86_64': {
42
  name: 'Windows',
43
  subtitle: '64-bit',
44
  arch: 'x86_64',
45
  format: '.msi',
46
- icon: null,
47
- color: '#0078d4',
48
  },
49
  'linux-x86_64': {
50
  name: 'Linux',
51
  subtitle: 'Debian/Ubuntu',
52
  arch: 'x86_64',
53
  format: '.deb',
54
- icon: null,
55
- color: '#e95420',
56
  },
57
  };
58
 
@@ -134,29 +125,53 @@ function parseReleaseChanges(body) {
134
  return changes;
135
  }
136
 
137
- // Windows Icon
138
- function WindowsIcon({ sx = {} }) {
139
  return (
140
- <Box component="svg" viewBox="0 0 24 24" sx={{ width: 32, height: 32, ...sx }}>
141
- <path fill="currentColor" d="M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.9-1.801" />
142
- </Box>
 
 
 
143
  );
144
  }
145
 
146
- // Linux Icon
147
- function LinuxIcon({ sx = {} }) {
148
  return (
149
- <Box component="svg" viewBox="0 0 24 24" sx={{ width: 32, height: 32, ...sx }}>
150
- <path fill="currentColor" d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489.117.779.456 1.511 1.044 2.127.473.497.986.902 1.504 1.238.518.336 1.03.62 1.523.836.483.23.93.42 1.297.606.368.187.656.37.83.544.36.364.575.747.658 1.162.084.416.036.864-.132 1.307-.168.443-.45.879-.808 1.257-.358.378-.79.698-1.232.919-.443.22-.893.337-1.284.337-.392 0-.722-.116-.963-.337-.241-.22-.393-.544-.429-.954-.037-.41.04-.894.198-1.402.159-.509.397-1.041.678-1.54.282-.5.606-.968.937-1.352.33-.383.666-.68.966-.844.3-.163.562-.193.742-.05.18.142.278.429.25.802-.028.373-.182.83-.457 1.284-.275.455-.67.908-1.137 1.27-.467.362-1.006.632-1.557.746-.55.113-1.112.069-1.612-.155-.5-.223-.938-.627-1.24-1.155-.3-.53-.463-1.183-.423-1.89.04-.706.284-1.467.716-2.183.43-.715 1.047-1.386 1.786-1.923.74-.538 1.603-.944 2.503-1.173.9-.23 1.837-.284 2.718-.173.88.11 1.705.385 2.4.786.694.4 1.26.927 1.63 1.52.37.593.545 1.252.482 1.9-.062.648-.362 1.286-.855 1.824-.492.537-1.178.974-1.96 1.24-.783.267-1.664.36-2.527.276-.863-.085-1.707-.347-2.41-.785-.703-.438-1.266-1.052-1.58-1.764-.315-.713-.38-1.524-.174-2.303.206-.78.682-1.528 1.356-2.105.674-.578 1.546-.985 2.486-1.173.94-.188 1.948-.156 2.866.127.917.284 1.744.769 2.343 1.445.6.675.972 1.54 1.022 2.478.05.938-.222 1.949-.793 2.85-.572.902-1.443 1.694-2.516 2.218-1.073.523-2.35.78-3.633.69-1.284-.09-2.575-.528-3.653-1.305-1.078-.778-1.944-1.895-2.436-3.22-.493-1.326-.612-2.86-.27-4.386.34-1.525 1.14-3.04 2.34-4.287 1.2-1.246 2.798-2.224 4.584-2.683 1.786-.46 3.76-.402 5.554.248 1.794.65 3.408 1.89 4.516 3.548 1.11 1.658 1.713 3.733 1.62 5.83-.093 2.098-.882 4.218-2.25 5.99-1.37 1.77-3.318 3.19-5.54 4.002-2.223.81-4.72 1.013-7.08.528-2.36-.485-4.583-1.656-6.263-3.35-1.68-1.693-2.816-3.91-3.153-6.292-.337-2.382.127-4.929 1.344-7.14 1.218-2.212 3.19-4.09 5.528-5.3 2.338-1.21 5.043-1.754 7.707-1.483 2.663.27 5.286 1.353 7.382 3.063 2.097 1.71 3.667 4.048 4.377 6.632.71 2.583.56 5.413-.577 7.948-1.137 2.534-3.14 4.774-5.648 6.265-2.508 1.492-5.52 2.235-8.503 2.05-2.983-.186-5.938-1.3-8.283-3.166C2.997 19.41 1.26 16.792.433 13.906c-.828-2.886-.745-6.04.336-8.896C1.85 2.152 4.023-.06 6.698.8" />
151
- </Box>
 
 
 
152
  );
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  // Platform Card component
156
  function PlatformCard({ platformKey, url, isActive, onClick }) {
157
  const platform = PLATFORMS[platformKey];
158
- const Icon = platform?.icon;
159
  const isComingSoon = platformKey.includes('darwin-x86_64') || platformKey.includes('linux');
 
160
 
161
  return (
162
  <Card
@@ -200,6 +215,24 @@ function PlatformCard({ platformKey, url, isActive, onClick }) {
200
  }}
201
  />
202
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
 
204
  <CardContent
205
  component="a"
@@ -225,13 +258,7 @@ function PlatformCard({ platformKey, url, isActive, onClick }) {
225
  borderRadius: 3,
226
  backgroundColor: 'rgba(255, 255, 255, 0.05)',
227
  }}>
228
- {Icon ? (
229
- <Icon sx={{ fontSize: 32, color: platform?.color || 'white' }} />
230
- ) : platformKey.includes('windows') ? (
231
- <WindowsIcon sx={{ color: platform?.color }} />
232
- ) : (
233
- <LinuxIcon sx={{ color: platform?.color }} />
234
- )}
235
  </Box>
236
 
237
  <Box sx={{ textAlign: 'center' }}>
@@ -312,8 +339,8 @@ export default function Download() {
312
  platforms['darwin-x86_64'] = { url };
313
  }
314
 
315
- // Windows - .msi
316
- if (name.includes('.msi')) {
317
  platforms['windows-x86_64'] = { url };
318
  }
319
 
@@ -546,6 +573,31 @@ export default function Download() {
546
  >
547
  {currentPlatform?.subtitle} • {currentPlatform?.format?.replace('.', '').toUpperCase()} package
548
  </Typography>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  </>
550
  ) : (
551
  <>
 
12
  CircularProgress,
13
  } from '@mui/material';
14
  import DownloadIcon from '@mui/icons-material/Download';
 
15
  import CheckCircleIcon from '@mui/icons-material/CheckCircle';
16
  import OpenInNewIcon from '@mui/icons-material/OpenInNew';
17
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
 
26
  subtitle: 'Apple Silicon',
27
  arch: 'M1, M2, M3, M4',
28
  format: '.dmg',
 
 
29
  },
30
  'darwin-x86_64': {
31
  name: 'macOS',
32
  subtitle: 'Intel',
33
  arch: 'x86_64',
34
  format: '.dmg',
 
 
35
  },
36
  'windows-x86_64': {
37
  name: 'Windows',
38
  subtitle: '64-bit',
39
  arch: 'x86_64',
40
  format: '.msi',
 
 
41
  },
42
  'linux-x86_64': {
43
  name: 'Linux',
44
  subtitle: 'Debian/Ubuntu',
45
  arch: 'x86_64',
46
  format: '.deb',
 
 
47
  },
48
  };
49
 
 
125
  return changes;
126
  }
127
 
128
+ // Platform Icons - all use external SVG files with white fill
129
+ function AppleIcon() {
130
  return (
131
+ <Box
132
+ component="img"
133
+ src="/assets/apple-logo.svg"
134
+ alt="Apple"
135
+ sx={{ width: 32, height: 32 }}
136
+ />
137
  );
138
  }
139
 
140
+ function WindowsIcon() {
 
141
  return (
142
+ <Box
143
+ component="img"
144
+ src="/assets/windows-logo.svg"
145
+ alt="Windows"
146
+ sx={{ width: 32, height: 32 }}
147
+ />
148
  );
149
  }
150
 
151
+ function LinuxIcon() {
152
+ return (
153
+ <Box
154
+ component="img"
155
+ src="/assets/linux-logo.svg"
156
+ alt="Linux"
157
+ sx={{ width: 32, height: 32 }}
158
+ />
159
+ );
160
+ }
161
+
162
+ // Get platform icon component
163
+ function getPlatformIcon(platformKey) {
164
+ if (platformKey.includes('darwin')) return <AppleIcon />;
165
+ if (platformKey.includes('windows')) return <WindowsIcon />;
166
+ if (platformKey.includes('linux')) return <LinuxIcon />;
167
+ return null;
168
+ }
169
+
170
  // Platform Card component
171
  function PlatformCard({ platformKey, url, isActive, onClick }) {
172
  const platform = PLATFORMS[platformKey];
 
173
  const isComingSoon = platformKey.includes('darwin-x86_64') || platformKey.includes('linux');
174
+ const isBeta = platformKey.includes('windows');
175
 
176
  return (
177
  <Card
 
215
  }}
216
  />
217
  )}
218
+ {/* Beta tag for Windows */}
219
+ {isBeta && !isComingSoon && (
220
+ <Chip
221
+ label="Beta"
222
+ size="small"
223
+ sx={{
224
+ position: 'absolute',
225
+ top: 8,
226
+ right: 8,
227
+ backgroundColor: 'rgba(59, 130, 246, 0.2)',
228
+ color: '#3b82f6',
229
+ fontSize: 10,
230
+ fontWeight: 700,
231
+ height: 20,
232
+ '& .MuiChip-label': { px: 1 },
233
+ }}
234
+ />
235
+ )}
236
 
237
  <CardContent
238
  component="a"
 
258
  borderRadius: 3,
259
  backgroundColor: 'rgba(255, 255, 255, 0.05)',
260
  }}>
261
+ {getPlatformIcon(platformKey)}
 
 
 
 
 
 
262
  </Box>
263
 
264
  <Box sx={{ textAlign: 'center' }}>
 
339
  platforms['darwin-x86_64'] = { url };
340
  }
341
 
342
+ // Windows - .msi (exclude .sig signature files)
343
+ if (name.endsWith('.msi')) {
344
  platforms['windows-x86_64'] = { url };
345
  }
346
 
 
573
  >
574
  {currentPlatform?.subtitle} • {currentPlatform?.format?.replace('.', '').toUpperCase()} package
575
  </Typography>
576
+
577
+ {/* Windows Beta Warning */}
578
+ {detectedPlatform?.startsWith('windows') && (
579
+ <Box
580
+ sx={{
581
+ mt: 3,
582
+ p: 2.5,
583
+ background: 'linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)',
584
+ border: '1px solid rgba(59, 130, 246, 0.3)',
585
+ borderRadius: 2,
586
+ maxWidth: 500,
587
+ mx: 'auto',
588
+ }}
589
+ >
590
+ <Typography
591
+ variant="body2"
592
+ sx={{
593
+ color: 'rgba(255,255,255,0.8)',
594
+ fontWeight: 500,
595
+ }}
596
+ >
597
+ ⚠️ Windows version is currently in Beta — installation requires <strong style={{ color: 'rgba(255,255,255,0.9)' }}>administrator privileges</strong>.
598
+ </Typography>
599
+ </Box>
600
+ )}
601
  </>
602
  ) : (
603
  <>