Spaces:
Running
Running
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 +4 -0
- public/assets/linux-logo.svg +4 -0
- public/assets/windows-logo.svg +4 -0
- src/pages/Download.jsx +81 -29
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 |
-
//
|
| 138 |
-
function
|
| 139 |
return (
|
| 140 |
-
<Box
|
| 141 |
-
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
| 143 |
);
|
| 144 |
}
|
| 145 |
|
| 146 |
-
|
| 147 |
-
function LinuxIcon({ sx = {} }) {
|
| 148 |
return (
|
| 149 |
-
<Box
|
| 150 |
-
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
| 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 |
-
{
|
| 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.
|
| 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 |
<>
|