Improve downloads page
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
input {
|
||||
@apply bg-[rgb(72,72,96)] focus:bg-[rgb(96,96,120)] border border-[rgb(96,96,120)] focus:border-[rgb(120,120,144)] rounded-lg px-4 py-2 inline-block transition-all duration-200 cursor-pointer focus:cursor-text outline-0;
|
||||
@apply bg-[rgb(72,72,96)] focus:bg-[rgb(96,96,120)] border border-[rgb(96,96,120)] focus:border-[rgb(120,120,144)] rounded-lg px-4 py-2 inline-block transition-all duration-200 cursor-pointer focus:cursor-text;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
'use client'
|
||||
|
||||
import Link from 'next/link'
|
||||
import { Metadata } from 'next'
|
||||
import { HomeButton } from '../components/HomeButton'
|
||||
import { DiscordButton } from '../components/DiscordButton'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Lncvrt Games - Download'
|
||||
}
|
||||
import { useEffect, useState } from 'react'
|
||||
import axios from 'axios'
|
||||
|
||||
export default function DownloadPage () {
|
||||
const [platform, setPlatform] = useState<string>('')
|
||||
const [version, setVersion] = useState<string | number | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
document.title = 'Lncvrt Games - Download'
|
||||
;(async () => {
|
||||
try {
|
||||
const result = await axios.get('/api/launcher/loader/latest')
|
||||
setVersion(result.data)
|
||||
} catch {
|
||||
setVersion(-1)
|
||||
}
|
||||
})()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className='box'>
|
||||
<HomeButton />
|
||||
@@ -16,60 +30,99 @@ export default function DownloadPage () {
|
||||
<p className='text-center text-[18px] mb-2'>
|
||||
The official downloads for Lncvrt Games Launcher
|
||||
</p>
|
||||
<div className='downloads'>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-win-x64.msi'
|
||||
draggable={false}
|
||||
<div className='flex justify-center'>
|
||||
<select
|
||||
value={platform}
|
||||
onChange={e => setPlatform(e.target.value)}
|
||||
className=''
|
||||
>
|
||||
Windows (x64)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-win-arm64.msi'
|
||||
draggable={false}
|
||||
>
|
||||
Windows (arm64)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-macos-silicon.dmg'
|
||||
draggable={false}
|
||||
>
|
||||
macOS (apple silicon)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-macos-intel.dmg'
|
||||
draggable={false}
|
||||
>
|
||||
macOS (intel)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-linux.deb'
|
||||
draggable={false}
|
||||
>
|
||||
Linux (debian)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-linux.rpm'
|
||||
draggable={false}
|
||||
>
|
||||
Linux (rehl/fedora)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-linux.AppImage'
|
||||
draggable={false}
|
||||
>
|
||||
Linux (appimage/universal)
|
||||
</Link>
|
||||
<Link
|
||||
href='https://aur.archlinux.org/packages/lncvrt-games-launcher'
|
||||
draggable={false}
|
||||
>
|
||||
Linux (aur/archlinux)
|
||||
</Link>
|
||||
<option value=''>Select platform</option>
|
||||
<option value='windows'>Windows</option>
|
||||
<option value='macos'>macOS</option>
|
||||
<option value='linux'>Linux</option>
|
||||
<option value='android'>Android</option>
|
||||
<option value='ios'>iOS</option>
|
||||
</select>
|
||||
</div>
|
||||
{(platform == 'windows' || platform == 'macos' || platform == 'linux') &&
|
||||
(version === null || version === -1 ? (
|
||||
<p className='mt-2 text-center'>
|
||||
Looking for mobile downloads? Select your game{' '}
|
||||
<Link href='/'>here</Link>
|
||||
{version === null ? 'Loading' : 'Failed to get latest version'}
|
||||
</p>
|
||||
) : (
|
||||
<div className='downloads'>
|
||||
{platform == 'windows' && (
|
||||
<>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-win-x64.msi`}
|
||||
draggable={false}
|
||||
>
|
||||
Windows 64-bit (x64)
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-win-arm64.msi`}
|
||||
draggable={false}
|
||||
>
|
||||
Windows ARM 64-bit
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
{platform == 'macos' && (
|
||||
<>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-macos-silicon.dmg`}
|
||||
draggable={false}
|
||||
>
|
||||
macOS Apple Silicon (M1, M2, etc.)
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-macos-intel.dmg`}
|
||||
draggable={false}
|
||||
>
|
||||
macOS Intel (x64)
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
{platform == 'linux' && (
|
||||
<>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-linux.deb`}
|
||||
draggable={false}
|
||||
>
|
||||
Linux Debian/Ubuntu (.deb)
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-linux.rpm`}
|
||||
draggable={false}
|
||||
>
|
||||
Linux Fedora/REHL (.rpm)
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-${version}-linux.AppImage`}
|
||||
draggable={false}
|
||||
>
|
||||
Linux AppImage (Universal)
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://aur.archlinux.org/packages/lncvrt-games-launcher`}
|
||||
draggable={false}
|
||||
>
|
||||
Arch Linux (AUR)
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
{!(
|
||||
platform == 'windows' ||
|
||||
platform == 'macos' ||
|
||||
platform == 'linux'
|
||||
) && (
|
||||
<p className='mt-2 text-center'>
|
||||
Mobile releases can be found at the bottom of a games page here{' '}
|
||||
<Link href='/'>here</Link>.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
* {
|
||||
@apply outline-0;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply bg-[rgb(24,24,48)] text-[rgb(200,200,250)] select-none flex items-center justify-center min-h-screen;
|
||||
}
|
||||
@@ -44,7 +48,8 @@ body {
|
||||
}
|
||||
|
||||
.downloads a,
|
||||
button {
|
||||
button,
|
||||
select {
|
||||
@apply bg-[rgb(72,72,96)] hover:bg-[rgb(96,96,120)] border border-[rgb(96,96,120)] hover:border-[rgb(120,120,144)] hover:-translate-y-0.5 rounded-lg px-4 py-2 inline-block transition-all duration-200 cursor-pointer;
|
||||
}
|
||||
|
||||
@@ -57,5 +62,5 @@ button {
|
||||
}
|
||||
|
||||
p a {
|
||||
@apply text-cyan-300 underline;
|
||||
@apply text-white underline;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user