mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 17:30:01 +02:00
refactor: fix buttons
This commit is contained in:
parent
5125bf91f2
commit
942a73d53c
2 changed files with 222 additions and 220 deletions
|
@ -12,11 +12,7 @@ import MoonIcon from '../icons/MoonIcon.astro'
|
||||||
<button
|
<button
|
||||||
id="theme-toggle"
|
id="theme-toggle"
|
||||||
type="button"
|
type="button"
|
||||||
class:list={[
|
class:list={['rounded-lg p-2.5 outline-none', className]}
|
||||||
'rounded-lg p-2.5 outline-none',
|
|
||||||
'bg-muted/50 shadow-sm',
|
|
||||||
className,
|
|
||||||
]}
|
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
|
|
|
@ -261,6 +261,7 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
<script>
|
<script>
|
||||||
|
document.addEventListener('astro:page-load', () => {
|
||||||
const releases = {
|
const releases = {
|
||||||
macos: {
|
macos: {
|
||||||
intel: 'zen.macos-x86_64.dmg',
|
intel: 'zen.macos-x86_64.dmg',
|
||||||
|
@ -353,7 +354,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
"input[type='radio']:checked",
|
"input[type='radio']:checked",
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
selectedArch = selectedRadio.value
|
selectedArch = selectedRadio.value
|
||||||
document.getElementById('linux-target-download')?.classList.add('hidden')
|
document
|
||||||
|
.getElementById('linux-target-download')
|
||||||
|
?.classList.add('hidden')
|
||||||
|
|
||||||
const linuxDownload = document.getElementById(
|
const linuxDownload = document.getElementById(
|
||||||
'form-linux-download',
|
'form-linux-download',
|
||||||
|
@ -388,7 +391,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
if (selectedArch) {
|
if (selectedArch) {
|
||||||
// Go back to architecture selection
|
// Go back to architecture selection
|
||||||
if (selectedOS === 'linux') {
|
if (selectedOS === 'linux') {
|
||||||
document.getElementById('form-linux-download')?.classList.add('hidden')
|
document
|
||||||
|
.getElementById('form-linux-download')
|
||||||
|
?.classList.add('hidden')
|
||||||
document
|
document
|
||||||
.getElementById('linux-target-download')
|
.getElementById('linux-target-download')
|
||||||
?.classList.remove('hidden')
|
?.classList.remove('hidden')
|
||||||
|
@ -404,7 +409,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
} else if (selectedOS) {
|
} else if (selectedOS) {
|
||||||
// Go back to OS selection
|
// Go back to OS selection
|
||||||
if (selectedOS === 'macos') {
|
if (selectedOS === 'macos') {
|
||||||
document.getElementById('form-macos-download')?.classList.add('hidden')
|
document
|
||||||
|
.getElementById('form-macos-download')
|
||||||
|
?.classList.add('hidden')
|
||||||
} else if (selectedOS === 'linux') {
|
} else if (selectedOS === 'linux') {
|
||||||
document
|
document
|
||||||
.getElementById('linux-target-download')
|
.getElementById('linux-target-download')
|
||||||
|
@ -511,7 +518,6 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
||||||
//downloadRelease("windows", selectedArch as string, "zip");
|
//downloadRelease("windows", selectedArch as string, "zip");
|
||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener('astro:page-load', () => {
|
|
||||||
filloutDefaultOS()
|
filloutDefaultOS()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue