Remove legacy interaction option

This commit is contained in:
2026-02-14 12:41:35 -07:00
parent 2ad54f976b
commit 105913503c
5 changed files with 15 additions and 160 deletions

View File

@@ -9,5 +9,5 @@
} }
.downloads-entry { .downloads-entry {
@apply flex justify-between items-center m-2 p-2 rounded-lg text-gray-200 text-lg transition-colors bg-(--col2) hover:bg-(--col3) border border-(--col4) hover:border-(--col5); @apply flex justify-between items-center m-2 p-2 rounded-lg text-gray-200 text-lg transition-colors bg-(--col2) hover:bg-(--col3) border border-(--col4) hover:border-(--col5) cursor-pointer;
} }

View File

@@ -8,7 +8,7 @@ import { useSearchParams } from 'next/navigation'
import { platform } from '@tauri-apps/plugin-os' import { platform } from '@tauri-apps/plugin-os'
import { faWarning } from '@fortawesome/free-solid-svg-icons' import { faWarning } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { ask } from '@tauri-apps/plugin-dialog' import { ask, message } from '@tauri-apps/plugin-dialog'
import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs'
import { writeVersionsConfig } from '../util/BazookaManager' import { writeVersionsConfig } from '../util/BazookaManager'
@@ -20,7 +20,6 @@ export default function Installs () {
setFadeOut, setFadeOut,
setSelectedVersionList, setSelectedVersionList,
downloadedVersionsConfig, downloadedVersionsConfig,
downloadProgress,
normalConfig, normalConfig,
setManagingVersion, setManagingVersion,
getVersionInfo, getVersionInfo,
@@ -123,21 +122,9 @@ export default function Installs () {
return ( return (
<div <div
key={key} key={key}
className={`downloads-entry ${ className={'downloads-entry'}
normalConfig?.settings.useLegacyInteractButtons title={'Click to view category'}
? '' onClick={() => setCategory(Number(key))}
: 'cursor-pointer'
}`}
title={
normalConfig?.settings.useLegacyInteractButtons
? ''
: 'Click to view category'
}
onClick={() => {
if (normalConfig?.settings.useLegacyInteractButtons)
return
setCategory(Number(key))
}}
> >
<div className='h-18 w-screen relative'> <div className='h-18 w-screen relative'>
<p className='text-2xl'>{value}</p> <p className='text-2xl'>{value}</p>
@@ -171,17 +158,6 @@ export default function Installs () {
})()} })()}
</p> </p>
</div> </div>
<button
className='button absolute right-0 bottom-0'
hidden={
!normalConfig?.settings.useLegacyInteractButtons
}
title='Click to view category'
onClick={() => setCategory(Number(key))}
>
Installs
</button>
</div> </div>
</div> </div>
) )
@@ -217,33 +193,23 @@ export default function Installs () {
.map(entry => ( .map(entry => (
<div <div
key={entry} key={entry}
className={`downloads-entry ${ className={'downloads-entry'}
normalConfig?.settings.useLegacyInteractButtons ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
? ''
: 'cursor-pointer'
}`}
title={ title={
normalConfig?.settings.useLegacyInteractButtons || 'Click to launch game. Right-click to manage this version install'
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
? ''
: 'Click to launch game. Right-click to manage this version install'
} }
onClick={async () => { onClick={async () => {
if ( if (
normalConfig?.settings.useLegacyInteractButtons ||
needsRevisionUpdate( needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision, getVersionInfo(entry)?.lastRevision,
entry entry
) )
) ) {
await message(
"Can't launch game. Need revision update.",
{ title: 'Error launching game', kind: 'error' }
)
return return
}
const verInfo = getVersionInfo(entry) const verInfo = getVersionInfo(entry)
if (verInfo == undefined) return if (verInfo == undefined) return
const gameInfo = getGameInfo(verInfo.game) const gameInfo = getGameInfo(verInfo.game)
@@ -262,15 +228,6 @@ export default function Installs () {
}} }}
onContextMenu={e => { onContextMenu={e => {
e.preventDefault() e.preventDefault()
if (
normalConfig?.settings.useLegacyInteractButtons ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
)
return
setManagingVersion(entry) setManagingVersion(entry)
setPopupMode(2) setPopupMode(2)
setShowPopup(true) setShowPopup(true)
@@ -346,58 +303,6 @@ export default function Installs () {
> >
View Info View Info
</button> </button>
<button
className='button'
hidden={
!normalConfig?.settings.useLegacyInteractButtons ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
}
onClick={e => {
e.stopPropagation()
setManagingVersion(entry)
setPopupMode(2)
setShowPopup(true)
setFadeOut(false)
}}
title='Click to manage this version install'
>
Manage
</button>
<button
className='button'
onClick={e => {
e.stopPropagation()
const verInfo = getVersionInfo(entry)
if (verInfo == undefined) return
const gameInfo = getGameInfo(verInfo.game)
if (gameInfo == undefined) return
invoke('launch_game', {
name: verInfo.id,
executable: verInfo.executable,
displayName: verInfo.displayName,
useWine: !!(
platform() === 'linux' &&
verInfo.wine &&
normalConfig?.settings.useWineOnUnixWhenNeeded
),
wineCommand:
normalConfig?.settings.wineOnUnixCommand
})
}}
hidden={
!normalConfig?.settings.useLegacyInteractButtons ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
}
title='Click to launch game'
>
Launch
</button>
<button <button
className='button' className='button'
onClick={async e => { onClick={async e => {

View File

@@ -68,18 +68,9 @@ export default function Installs () {
.map(i => ( .map(i => (
<div <div
key={i.id} key={i.id}
className={`downloads-entry ${ className={'downloads-entry'}
normalConfig?.settings.useLegacyInteractButtons title={'Click to view game installs'}
? ''
: 'cursor-pointer'
}`}
title={
normalConfig?.settings.useLegacyInteractButtons
? ''
: 'Click to view game installs'
}
onClick={() => { onClick={() => {
if (normalConfig?.settings.useLegacyInteractButtons) return
setCategory(-1) setCategory(-1)
router.push('/game?id=' + i.id) router.push('/game?id=' + i.id)
}} }}
@@ -128,18 +119,6 @@ export default function Installs () {
<p>{i.verified ? 'Verified' : 'Unverified'}</p> <p>{i.verified ? 'Verified' : 'Unverified'}</p>
</div> </div>
</div> </div>
<div
className='button absolute right-0 bottom-0'
hidden={!normalConfig?.settings.useLegacyInteractButtons}
title='Click to view game installs'
onClick={() => {
setCategory(-1)
router.push('/game?id=' + i.id)
}}
>
Installs
</div>
</div> </div>
</div> </div>
)) ))

View File

@@ -11,8 +11,6 @@ export default function Settings () {
const [allowNotifications, setAllowNotifications] = useState(false) const [allowNotifications, setAllowNotifications] = useState(false)
const [alwaysShowGamesInSidebar, setAlwaysShowGamesInSidebar] = const [alwaysShowGamesInSidebar, setAlwaysShowGamesInSidebar] =
useState(false) useState(false)
const [useLegacyInteractButtons, setUseLegacyInteractButtons] =
useState(false)
const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false) const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false)
const [wineOnUnixCommand, setWineOnUnixCommand] = useState('wine %path%') const [wineOnUnixCommand, setWineOnUnixCommand] = useState('wine %path%')
const [theme, setTheme] = useState(0) const [theme, setTheme] = useState(0)
@@ -27,9 +25,6 @@ export default function Settings () {
setAlwaysShowGamesInSidebar( setAlwaysShowGamesInSidebar(
normalConfig.settings.alwaysShowGamesInSidebar normalConfig.settings.alwaysShowGamesInSidebar
) )
setUseLegacyInteractButtons(
normalConfig.settings.useLegacyInteractButtons
)
setUseWineOnUnixWhenNeeded( setUseWineOnUnixWhenNeeded(
normalConfig.settings.useWineOnUnixWhenNeeded normalConfig.settings.useWineOnUnixWhenNeeded
) )
@@ -92,29 +87,6 @@ export default function Settings () {
}} }}
title="This setting will make it so when you are on a page like this, the games won't disappear." title="This setting will make it so when you are on a page like this, the games won't disappear."
/> />
<Setting
label='Show Installs/Launch/Manage Buttons'
value={useLegacyInteractButtons}
onChange={async () => {
if (!normalConfig) return
setUseLegacyInteractButtons(!useLegacyInteractButtons)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
useLegacyInteractButtons: !useLegacyInteractButtons
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
useLegacyInteractButtons: !useLegacyInteractButtons
}
})
}}
title='Enable the legacy method of using the installs/launch/manage buttons. In the future this setting may be removed so try and get used to the new method.'
/>
<Setting <Setting
label='Use wine when needed to launch games' label='Use wine when needed to launch games'
value={useWineOnUnixWhenNeeded} value={useWineOnUnixWhenNeeded}

View File

@@ -2,7 +2,6 @@ export class SettingsType {
constructor ( constructor (
public allowNotifications: boolean = true, public allowNotifications: boolean = true,
public alwaysShowGamesInSidebar: boolean = true, public alwaysShowGamesInSidebar: boolean = true,
public useLegacyInteractButtons: boolean = false,
public useWineOnUnixWhenNeeded: boolean = false, public useWineOnUnixWhenNeeded: boolean = false,
public wineOnUnixCommand: string = 'wine %path%', public wineOnUnixCommand: string = 'wine %path%',
public theme: number = 0 public theme: number = 0