Move to NextJS + other changes

This commit is contained in:
2025-08-25 01:00:52 -07:00
parent e8e9e4d312
commit 342f8101fe
44 changed files with 3265 additions and 1305 deletions

View File

@@ -1,10 +0,0 @@
import { LauncherVersion } from './LauncherVersion'
export class DownloadProgress {
constructor (
public version: LauncherVersion,
public progress: number,
public failed: boolean,
public queued: boolean
) {}
}

View File

@@ -1,12 +0,0 @@
import { LauncherVersion } from './LauncherVersion'
export class DownloadedVersion {
constructor (
public version: LauncherVersion,
public installDate: number = Date.now()
) {}
static import (data: LauncherVersion) {
return new DownloadedVersion(data)
}
}

View File

@@ -1,18 +0,0 @@
import { DownloadedVersion } from './DownloadedVersion'
import { DownloadProgress } from './DownloadProgress'
import { LauncherVersion } from './LauncherVersion'
import { NormalConfig } from './NormalConfig'
import { VersionsConfig } from './VersionsConfig'
export type InstallsProps = {
downloadProgress: DownloadProgress[]
showPopup: boolean
setShowPopup: (v: boolean) => void
setPopupMode: (v: null | number) => void
setFadeOut: (v: boolean) => void
setSelectedVersionList: (v: LauncherVersion[]) => void
setVersionList: (v: null | LauncherVersion[]) => void
downloadedVersionsConfig: VersionsConfig | null
normalConfig: NormalConfig | null
setManagingVersion: (v: DownloadedVersion | null) => void
}

View File

@@ -1,8 +0,0 @@
export interface LauncherVersion {
version: string
displayName: string
platforms: string[]
downloadUrls: string[]
executables: string[]
id: number
}

View File

@@ -1,9 +0,0 @@
export interface LeaderboardEntry {
username: string
userid: bigint
value: bigint
icon: number
overlay: number
birdColor: number[]
overlayColor: number[]
}

View File

@@ -1,14 +0,0 @@
import { SettingsType } from './SettingsType'
export class NormalConfig {
constructor (
public version: string,
public settings: SettingsType = new SettingsType()
) {}
static import (data: any) {
const cfg = new NormalConfig(data.version)
Object.assign(cfg.settings, data.settings)
return cfg
}
}

View File

@@ -1,6 +0,0 @@
export type SettingProps = {
label: string
value: boolean
onChange: (val: boolean) => void
className?: string
}

View File

@@ -1,5 +0,0 @@
import { NormalConfig } from './NormalConfig'
export type SettingsProps = {
normalConfig: NormalConfig | null
}

View File

@@ -1,8 +0,0 @@
export class SettingsType {
constructor (
public checkForNewVersionOnLoad: boolean = true,
public allowNotifications: boolean = true,
public useWineOnUnixWhenNeeded: boolean = false,
public useWindowsRoundedCorners: boolean = false
) {}
}

View File

@@ -1,8 +0,0 @@
import { DownloadProgress } from './DownloadProgress'
export type SidebarProps = {
setShowPopup: (v: boolean) => void
setPopupMode: (v: null | number) => void
setFadeOut: (v: boolean) => void
downloadProgress: DownloadProgress[]
}

View File

@@ -1,11 +0,0 @@
import { DownloadedVersion } from './DownloadedVersion'
export class VersionsConfig {
constructor (public version: string, public list: DownloadedVersion[] = []) {}
static import (data: any) {
const cfg = new VersionsConfig(data.version)
Object.assign(cfg.list, data.list)
return cfg
}
}