Improve downloads page
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
input {
|
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 Link from 'next/link'
|
||||||
import { Metadata } from 'next'
|
|
||||||
import { HomeButton } from '../components/HomeButton'
|
import { HomeButton } from '../components/HomeButton'
|
||||||
import { DiscordButton } from '../components/DiscordButton'
|
import { DiscordButton } from '../components/DiscordButton'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
export const metadata: Metadata = {
|
import axios from 'axios'
|
||||||
title: 'Lncvrt Games - Download'
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function DownloadPage () {
|
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 (
|
return (
|
||||||
<div className='box'>
|
<div className='box'>
|
||||||
<HomeButton />
|
<HomeButton />
|
||||||
@@ -16,60 +30,99 @@ export default function DownloadPage () {
|
|||||||
<p className='text-center text-[18px] mb-2'>
|
<p className='text-center text-[18px] mb-2'>
|
||||||
The official downloads for Lncvrt Games Launcher
|
The official downloads for Lncvrt Games Launcher
|
||||||
</p>
|
</p>
|
||||||
<div className='downloads'>
|
<div className='flex justify-center'>
|
||||||
<Link
|
<select
|
||||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-win-x64.msi'
|
value={platform}
|
||||||
draggable={false}
|
onChange={e => setPlatform(e.target.value)}
|
||||||
|
className=''
|
||||||
>
|
>
|
||||||
Windows (x64)
|
<option value=''>Select platform</option>
|
||||||
</Link>
|
<option value='windows'>Windows</option>
|
||||||
<Link
|
<option value='macos'>macOS</option>
|
||||||
href='https://games-r2.lncvrt.xyz/lncvrt-games-launcher/Lncvrt-Games-Launcher-1.0.3-win-arm64.msi'
|
<option value='linux'>Linux</option>
|
||||||
draggable={false}
|
<option value='android'>Android</option>
|
||||||
>
|
<option value='ios'>iOS</option>
|
||||||
Windows (arm64)
|
</select>
|
||||||
</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>
|
|
||||||
</div>
|
</div>
|
||||||
<p className='mt-2 text-center'>
|
{(platform == 'windows' || platform == 'macos' || platform == 'linux') &&
|
||||||
Looking for mobile downloads? Select your game{' '}
|
(version === null || version === -1 ? (
|
||||||
<Link href='/'>here</Link>
|
<p className='mt-2 text-center'>
|
||||||
</p>
|
{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>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
* {
|
||||||
|
@apply outline-0;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-[rgb(24,24,48)] text-[rgb(200,200,250)] select-none flex items-center justify-center min-h-screen;
|
@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,
|
.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;
|
@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 {
|
p a {
|
||||||
@apply text-cyan-300 underline;
|
@apply text-white underline;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user