mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 09:20:00 +02:00
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:
parent
6a7bd311c0
commit
dd86c639ac
1 changed files with 23 additions and 28 deletions
|
@ -1,41 +1,36 @@
|
||||||
---
|
---
|
||||||
import Description from "~/components/Description.astro";
|
import Description from '~/components/Description.astro'
|
||||||
import DownloadScript from "~/components/download/DownloadScript.astro";
|
import DownloadScript from '~/components/download/DownloadScript.astro'
|
||||||
import PlatformDownload from "~/components/download/PlatformDownload.astro";
|
import PlatformDownload from '~/components/download/PlatformDownload.astro'
|
||||||
import { getReleasesWithChecksums } from "~/components/download/release-data";
|
import { getReleasesWithChecksums } from '~/components/download/release-data'
|
||||||
import Layout from "~/layouts/Layout.astro";
|
import Layout from '~/layouts/Layout.astro'
|
||||||
import { getChecksums } from "~/utils/githubChecksums";
|
import { getChecksums } from '~/utils/githubChecksums'
|
||||||
import { getLocale, getUI } from "~/utils/i18n";
|
import { getLocale, getUI } from '~/utils/i18n'
|
||||||
|
|
||||||
import { icon, library } from "@fortawesome/fontawesome-svg-core";
|
import { icon, library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import { faApple, faGithub, faLinux, faWindows } from '@fortawesome/free-brands-svg-icons'
|
||||||
faApple,
|
import ExternalLinkIcon from '~/icons/ExternalLink.astro'
|
||||||
faGithub,
|
import LockIcon from '~/icons/LockIcon.astro'
|
||||||
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 {
|
const {
|
||||||
routes: { download },
|
routes: { download },
|
||||||
layout,
|
layout,
|
||||||
} = getUI(locale);
|
} = getUI(locale)
|
||||||
|
|
||||||
library.add(faWindows, faLinux, faApple, faGithub);
|
library.add(faWindows, faLinux, faApple, faGithub)
|
||||||
const windowsIcon = icon({ prefix: "fab", iconName: "windows" });
|
const windowsIcon = icon({ prefix: 'fab', iconName: 'windows' })
|
||||||
const linuxIcon = icon({ prefix: "fab", iconName: "linux" });
|
const linuxIcon = icon({ prefix: 'fab', iconName: 'linux' })
|
||||||
const appleIcon = icon({ prefix: "fab", iconName: "apple" });
|
const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
const githubIcon = icon({ prefix: "fab", iconName: "github" });
|
const githubIcon = icon({ prefix: 'fab', iconName: 'github' })
|
||||||
|
|
||||||
const checksums = await getChecksums();
|
const checksums = await getChecksums()
|
||||||
const releases = getReleasesWithChecksums(checksums);
|
const releases = getReleasesWithChecksums(checksums)
|
||||||
|
|
||||||
const platformNames = download.platformNames;
|
const platformNames = download.platformNames
|
||||||
const platformDescriptions = download.platformDescriptions;
|
const platformDescriptions = download.platformDescriptions
|
||||||
---
|
---
|
||||||
|
|
||||||
<DownloadScript />
|
<DownloadScript />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue