refactor(download): streamline import statements and code formatting in download.astro

- Consolidated import statements for improved readability.
- Standardized code formatting for consistency.
- Maintained existing functionality while enhancing code clarity.
This commit is contained in:
taroj1205 2025-05-16 12:30:58 +12:00
parent 6a7bd311c0
commit dd86c639ac
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7

View file

@ -1,41 +1,36 @@
---
import Description from "~/components/Description.astro";
import DownloadScript from "~/components/download/DownloadScript.astro";
import PlatformDownload from "~/components/download/PlatformDownload.astro";
import { getReleasesWithChecksums } from "~/components/download/release-data";
import Layout from "~/layouts/Layout.astro";
import { getChecksums } from "~/utils/githubChecksums";
import { getLocale, getUI } from "~/utils/i18n";
import Description from '~/components/Description.astro'
import DownloadScript from '~/components/download/DownloadScript.astro'
import PlatformDownload from '~/components/download/PlatformDownload.astro'
import { getReleasesWithChecksums } from '~/components/download/release-data'
import Layout from '~/layouts/Layout.astro'
import { getChecksums } from '~/utils/githubChecksums'
import { getLocale, getUI } from '~/utils/i18n'
import { icon, library } from "@fortawesome/fontawesome-svg-core";
import {
faApple,
faGithub,
faLinux,
faWindows,
} from "@fortawesome/free-brands-svg-icons";
import ExternalLinkIcon from "~/icons/ExternalLink.astro";
import LockIcon from "~/icons/LockIcon.astro";
import { icon, library } from '@fortawesome/fontawesome-svg-core'
import { faApple, faGithub, faLinux, faWindows } from '@fortawesome/free-brands-svg-icons'
import ExternalLinkIcon from '~/icons/ExternalLink.astro'
import LockIcon from '~/icons/LockIcon.astro'
export { getStaticPaths } from "~/utils/i18n";
export { getStaticPaths } from '~/utils/i18n'
const locale = getLocale(Astro);
const locale = getLocale(Astro)
const {
routes: { download },
layout,
} = getUI(locale);
} = getUI(locale)
library.add(faWindows, faLinux, faApple, faGithub);
const windowsIcon = icon({ prefix: "fab", iconName: "windows" });
const linuxIcon = icon({ prefix: "fab", iconName: "linux" });
const appleIcon = icon({ prefix: "fab", iconName: "apple" });
const githubIcon = icon({ prefix: "fab", iconName: "github" });
library.add(faWindows, faLinux, faApple, faGithub)
const windowsIcon = icon({ prefix: 'fab', iconName: 'windows' })
const linuxIcon = icon({ prefix: 'fab', iconName: 'linux' })
const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
const githubIcon = icon({ prefix: 'fab', iconName: 'github' })
const checksums = await getChecksums();
const releases = getReleasesWithChecksums(checksums);
const checksums = await getChecksums()
const releases = getReleasesWithChecksums(checksums)
const platformNames = download.platformNames;
const platformDescriptions = download.platformDescriptions;
const platformNames = download.platformNames
const platformDescriptions = download.platformDescriptions
---
<DownloadScript />