Rename "unix wine" to "linux wine"

This commit is contained in:
Lncvrt committed 2026-03-24 22:50:09 -07:00
1 parent e7a61872b7
commit 387bd54ce2
5 files changed
+34 -33

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ type GlobalCtxType = {
settings: Store | null
notificationsAllowed: boolean
sidebarAlwaysShowGames: boolean
unixUseWine: boolean
unixWineCommand: string
linuxUseWine: boolean
linuxWineCommand: string
theme: string
}
+7 -7
View File
@@ -31,8 +31,8 @@ export default function Installs () {
setDownloadedVersionsConfig,
downloadVersions,
downloadProgress,
unixUseWine,
unixWineCommand
linuxUseWine,
linuxWineCommand
} = useGlobal()
const params = useSearchParams()
@@ -130,7 +130,7 @@ export default function Installs () {
const info = getVersionInfo(v)
if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine)
if (platform() == 'linux' && info.wine && !linuxUseWine)
return false
return info.game === id && info.category === Number(key)
@@ -165,7 +165,7 @@ export default function Installs () {
if (
platform() == 'linux' &&
info.wine &&
!unixUseWine
!linuxUseWine
)
return false
return (
@@ -196,7 +196,7 @@ export default function Installs () {
.filter(v => {
const info = getVersionInfo(v)
if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine)
if (platform() == 'linux' && info.wine && !linuxUseWine)
return false
return (
info.game === id &&
@@ -291,9 +291,9 @@ export default function Installs () {
useWine: !!(
platform() == 'linux' &&
verInfo.wine &&
unixUseWine
linuxUseWine
),
wineCommand: unixWineCommand
wineCommand: linuxWineCommand
})
}}
onContextMenu={e => {
+14 -13
View File
@@ -90,8 +90,9 @@ export default function RootLayout ({
useState<boolean>(false)
const [sidebarAlwaysShowGames, setSidebarAlwaysShowGames] =
useState<boolean>(false)
const [unixUseWine, setUnixUseWine] = useState<boolean>(false)
const [unixWineCommand, setUnixWineCommand] = useState<string>('wine %path%')
const [linuxUseWine, setLinuxUseWine] = useState<boolean>(false)
const [linuxWineCommand, setLinuxWineCommand] =
useState<string>('wine %path%')
const [theme, setTheme] = useState<string>('dark')
function getSpecialVersionsList (game?: number): GameVersion[] {
@@ -102,7 +103,7 @@ export default function RootLayout ({
v => !Object.keys(downloadedVersionsConfig?.list ?? []).includes(v.id)
)
.filter(v => {
if (platformName == 'linux' && v.wine && unixUseWine) return false
if (platformName == 'linux' && v.wine && linuxUseWine) return false
if (game && v.game != game) return false
if (category != -1 && v.category != category) return false
@@ -155,7 +156,7 @@ export default function RootLayout ({
} | null {
if (!downloadedVersionsConfig || !serverVersionList) return null
const allowWine = platformName !== 'linux' || unixUseWine
const allowWine = platformName !== 'linux' || linuxUseWine
const installed = Object.keys(downloadedVersionsConfig.list).filter(v => {
const info = getVersionInfo(v)
@@ -363,8 +364,8 @@ export default function RootLayout ({
version: client,
notificationsAllowed: true,
sidebarAlwaysShowGames: true,
unixUseWine: false,
unixWineCommand: 'wine %path%',
linuxUseWine: false,
linuxWineCommand: 'wine %path%',
theme: 'dark'
}
})
@@ -408,12 +409,12 @@ export default function RootLayout ({
)
if (raw.settings.useWineOnUnixWhenNeeded)
settingsLocal?.set(
'unixUseWine',
'linuxUseWine',
Boolean(raw.settings.useWineOnUnixWhenNeeded)
)
if (raw.settings.wineOnUnixCommand)
settingsLocal?.set(
'unixWineCommand',
'linuxWineCommand',
String(raw.settings.wineOnUnixCommand)
)
if (raw.settings.theme) {
@@ -707,9 +708,9 @@ export default function RootLayout ({
watch<boolean>('sidebarAlwaysShowGames', v =>
setSidebarAlwaysShowGames(v ?? true)
)
watch<boolean>('unixUseWine', v => setUnixUseWine(v ?? false))
watch<string>('unixWineCommand', v =>
setUnixWineCommand(v ?? 'wine %path%')
watch<boolean>('linuxUseWine', v => setLinuxUseWine(v ?? false))
watch<string>('linuxWineCommand', v =>
setLinuxWineCommand(v ?? 'wine %path%')
)
return () => {
@@ -793,8 +794,8 @@ export default function RootLayout ({
settings,
notificationsAllowed,
sidebarAlwaysShowGames,
unixUseWine,
unixWineCommand,
linuxUseWine,
linuxWineCommand,
theme
}}
>
+9 -9
View File
@@ -11,8 +11,8 @@ export default function Settings () {
version,
notificationsAllowed,
sidebarAlwaysShowGames,
unixUseWine,
unixWineCommand,
linuxUseWine,
linuxWineCommand,
theme
} = useGlobal()
@@ -40,22 +40,22 @@ export default function Settings () {
title="This setting will make it so when you are on a page like this, the games won't disappear."
/>
<Setting
label='Use wine when needed to launch games'
value={unixUseWine}
label='Use wine if needed'
value={linuxUseWine}
onChange={async () => {
await settings?.set('unixUseWine', !unixUseWine)
await settings?.set('linuxUseWine', !linuxUseWine)
}}
className={platform() == 'linux' ? '' : 'hidden'}
/>
<p hidden={!(platform() == 'linux' && unixUseWine)}>Wine Command:</p>
<p hidden={!(platform() == 'linux' && linuxUseWine)}>Wine Command:</p>
<input
type='text'
value={unixWineCommand}
value={linuxWineCommand}
onChange={async e => {
await settings?.set('unixUseWine', e.target.value)
await settings?.set('linuxWineCommand', e.target.value)
}}
className={`input-field my-1 ${
platform() == 'linux' && unixUseWine ? '' : 'hidden'
platform() == 'linux' && linuxWineCommand ? '' : 'hidden'
}`}
></input>
<div title='The theme you want the launcher to use.'>
+2 -2
View File
@@ -37,7 +37,7 @@ export default function Sidebar () {
category,
setCategory,
sidebarAlwaysShowGames,
unixUseWine
linuxUseWine
} = useGlobal()
const pathname = usePathname()
@@ -137,7 +137,7 @@ export default function Sidebar () {
const info = getVersionInfo(v)
if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine)
if (platform() == 'linux' && info.wine && !linuxUseWine)
return false
return info.game === i.id && info.category === Number(key)