diff --git a/src/app/main/game/page.tsx b/src/app/main/game/page.tsx index b8486c5..8952e11 100644 --- a/src/app/main/game/page.tsx +++ b/src/app/main/game/page.tsx @@ -29,7 +29,8 @@ export default function Installs () { linuxUseWine, customDataLocation, needsRevisionUpdate, - launchGame + launchGame, + developerMode } = useGlobal() const params = useSearchParams() @@ -155,6 +156,11 @@ export default function Installs () { onClick={() => setCategory(Number(key))} >
+ {developerMode && ( +

+ {key} +

+ )}

{value}

+ {developerMode && ( +

+ {versionInfo.id} +

+ )}

{versionInfo.displayName}

diff --git a/src/app/main/layout.tsx b/src/app/main/layout.tsx index 13adc7f..8a63ddd 100644 --- a/src/app/main/layout.tsx +++ b/src/app/main/layout.tsx @@ -96,6 +96,7 @@ export default function RootLayout ({ useState('wine %path%') const [theme, setTheme] = useState('dark') const [customDataLocation, setCustomDataLocation] = useState('') + const [developerMode, setDeveloperMode] = useState(false) const [versionsList, setVersionsList] = useState>({}) const [modsList, setModsList] = useState< @@ -645,7 +646,8 @@ export default function RootLayout ({ linuxUseWine: false, linuxWineCommand: 'wine %path%', theme: 'dark', - customDataLocation: '' + customDataLocation: '', + developerMode: false } }) const versionsLocal = await load('versions.json', { @@ -802,6 +804,7 @@ export default function RootLayout ({ watchSettings('customDataLocation', v => setCustomDataLocation(v ?? '') ) + watchSettings('developerMode', v => setDeveloperMode(v ?? false)) watchVersions>('list', v => setVersionsList(v ?? {})) watchVersions>>('mods', v => @@ -871,6 +874,7 @@ export default function RootLayout ({ linuxWineCommand, theme, customDataLocation, + developerMode, versionsList, modsList, movingData, diff --git a/src/app/main/page.tsx b/src/app/main/page.tsx index 536e373..b287bdc 100644 --- a/src/app/main/page.tsx +++ b/src/app/main/page.tsx @@ -23,7 +23,8 @@ export default function Installs () { setSelectedVersionList, setSelectedGame, setCategory, - setManagingGame + setManagingGame, + developerMode } = useGlobal() const router = useRouter() @@ -88,6 +89,9 @@ export default function Installs () { }} >
+ {developerMode && ( +

{i.id}

+ )}

{i.name}

diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index ebd63c9..77021fb 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -19,7 +19,8 @@ import Link from 'next/link' import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { getCurrentWindow } from '@tauri-apps/api/window' import { Lexend } from 'next/font/google' -import React from 'react' +import React, { useState } from 'react' +import { message } from '@tauri-apps/plugin-dialog' const lexend = Lexend({ subsets: ['latin'] @@ -37,13 +38,17 @@ export default function Sidebar () { setCategory, sidebarAlwaysShowGames, linuxUseWine, - setManagingGame + setManagingGame, + settings, + developerMode } = useGlobal() const pathname = usePathname() const params = useSearchParams() const router = useRouter() + const [devModeClicks, setDevModeClicks] = useState(0) + return (