Skip to content

Commit bd2977e

Browse files
authored
Merge pull request #658 from MoYingJi/fix/website
fix(website): 临时修复些小问题和不太顺眼的地方
2 parents 54ba8e6 + 0be76fe commit bd2977e

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

docs/.vitepress/components/DownloadPage.vue

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
<div class="card-header">
3333
<span class="magic-icon">✨</span>
3434
<div class="header-text">
35-
您的设备应该是 <strong>{{ platformName }}</strong>
35+
您的设备应该是
36+
<span class="spacer"></span>
37+
<strong>{{ platformName }}</strong>
3638
<span class="spacer"></span>
3739
<span v-if="archName" class="tag tag-theme">
3840
{{ archName }}
@@ -242,7 +244,7 @@ const getExtensionName = (name: string) => {
242244
const getArchDisplay = (name: string, platformId: string) => {
243245
const n = name.toLowerCase();
244246
if (n.includes("arm64") || n.includes("aarch64")) return "ARM64";
245-
if (n.includes("x64") || n.includes("amd64")) return "x64";
247+
if (n.includes("x64") || n.includes("x86_64") || n.includes("amd64")) return "x64";
246248
if (n.includes("ia32") || n.includes("x86")) return "32位 (x86)";
247249
248250
if (platformId === "windows") return "x86 / x64 兼容";
@@ -260,8 +262,8 @@ const sortAssets = (assets: GitHubAsset[]) => {
260262
return assets.sort((a, b) => {
261263
const nA = a.name.toLowerCase();
262264
const nB = b.name.toLowerCase();
263-
const isX64A = nA.includes("x64") || nA.includes("amd64");
264-
const isX64B = nB.includes("x64") || nB.includes("amd64");
265+
const isX64A = nA.includes("x64") || nA.includes("x86_64") || nA.includes("amd64");
266+
const isX64B = nB.includes("x64") || nB.includes("x86_64") || nB.includes("amd64");
265267
if (isX64A && !isX64B) return -1;
266268
if (!isX64A && isX64B) return 1;
267269
return 0;
@@ -271,7 +273,7 @@ const sortAssets = (assets: GitHubAsset[]) => {
271273
const isArchCompatible = (name: string, targetArch: string) => {
272274
const n = name.toLowerCase();
273275
const isArmAsset = n.includes("arm64") || n.includes("aarch64");
274-
const is32BitAsset = n.includes("ia32") || n.includes("x86");
276+
const is32BitAsset = n.includes("ia32") || (n.includes("x86") && !n.includes("x86_64"));
275277
276278
if (targetArch === "arm64") {
277279
return isArmAsset;
@@ -330,7 +332,7 @@ const recommendedAssets = computed(() => {
330332
if (dmg) result.push(dmg);
331333
} else if (p === "linux") {
332334
const appImage = assets.find(
333-
(f) => f.name.toLowerCase().endsWith(".appimage") && isArchCompatible(f.name, arch),
335+
(f) => f.name.endsWith(".AppImage") && isArchCompatible(f.name, arch),
334336
);
335337
const deb = assets.find((f) => f.name.endsWith(".deb") && isArchCompatible(f.name, arch));
336338
@@ -404,23 +406,23 @@ const classifiedAssets = computed<PlatformGroup[]>(() => {
404406
icon: "🐧",
405407
groups: [
406408
{
407-
title: "通用运行包",
408-
desc: "AppImage",
409-
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".appimage"))),
409+
title: "AppImage",
410+
desc: "通用运行包",
411+
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".AppImage"))),
410412
},
411413
{
412-
title: "Debian / Ubuntu / Linux Mint...",
413-
desc: "DEB 安装包",
414+
title: "Debian ",
415+
desc: "Debian / Ubuntu / Linux Mint...",
414416
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".deb"))),
415417
},
416418
{
417-
title: "RedHat / Fedora / AlmaLinux...",
418-
desc: "RPM 安装包",
419+
title: "RPM 包",
420+
desc: "Red Hat / Fedora / AlmaLinux...",
419421
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".rpm"))),
420422
},
421423
{
422-
title: "Arch Linux / Manjaro...",
423-
desc: "Pacman 安装包",
424+
title: "Pacman 包",
425+
desc: "Arch Linux / Manjaro...",
424426
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".pacman"))),
425427
},
426428
{

0 commit comments

Comments
 (0)