Add wine on unix command to frontend (not backend yet)

This commit is contained in:
2025-08-26 11:08:54 -07:00
parent 342f8101fe
commit 5a22efa069
3 changed files with 22 additions and 0 deletions

View File

@@ -73,3 +73,7 @@ body {
*:focus {
@apply outline-none;
}
.input-field {
@apply border-2 border-[#484848] rounded-md bg-[#242424] p-2 px-4 focus:border-blue-600 transition-colors;
}

View File

@@ -12,6 +12,7 @@ export default function Settings () {
useState(false)
const [allowNotifications, setAllowNotifications] = useState(false)
const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false)
const [wineOnUnixCommand, setWineOnUnixCommand] = useState('wine %path%')
const [useWindowsRoundedCorners, setUseWindowsRoundedCorners] =
useState(false)
const [loaded, setLoaded] = useState(false)
@@ -26,6 +27,7 @@ export default function Settings () {
setUseWineOnUnixWhenNeeded(
normalConfig.settings.useWineOnUnixWhenNeeded
)
setWineOnUnixCommand(normalConfig.settings.wineOnUnixCommand)
setAllowNotifications(normalConfig.settings.allowNotifications)
setUseWindowsRoundedCorners(
normalConfig.settings.useWindowsRoundedCorners
@@ -80,6 +82,21 @@ export default function Settings () {
}}
className={platform() == 'linux' ? '' : 'hidden'}
/>
<input
type='text'
value={wineOnUnixCommand}
onChange={async e => {
while (normalConfig != null) {
setWineOnUnixCommand(e.target.value)
normalConfig.settings.wineOnUnixCommand = e.target.value
await writeNormalConfig(normalConfig)
break
}
}}
className={`input-field ${
platform() == 'linux' && useWineOnUnixWhenNeeded ? '' : 'hidden'
}`}
></input>
<Setting
label='Use rounded corners (if supported)'
value={useWindowsRoundedCorners}

View File

@@ -3,6 +3,7 @@ export class SettingsType {
public checkForNewVersionOnLoad: boolean = true,
public allowNotifications: boolean = true,
public useWineOnUnixWhenNeeded: boolean = false,
public wineOnUnixCommand: string = 'wine %path%',
public useWindowsRoundedCorners: boolean = false
) {}
}