Add wine on unix command to frontend (not backend yet)
This commit is contained in:
@@ -73,3 +73,7 @@ body {
|
|||||||
*:focus {
|
*:focus {
|
||||||
@apply outline-none;
|
@apply outline-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-field {
|
||||||
|
@apply border-2 border-[#484848] rounded-md bg-[#242424] p-2 px-4 focus:border-blue-600 transition-colors;
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export default function Settings () {
|
|||||||
useState(false)
|
useState(false)
|
||||||
const [allowNotifications, setAllowNotifications] = useState(false)
|
const [allowNotifications, setAllowNotifications] = useState(false)
|
||||||
const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false)
|
const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false)
|
||||||
|
const [wineOnUnixCommand, setWineOnUnixCommand] = useState('wine %path%')
|
||||||
const [useWindowsRoundedCorners, setUseWindowsRoundedCorners] =
|
const [useWindowsRoundedCorners, setUseWindowsRoundedCorners] =
|
||||||
useState(false)
|
useState(false)
|
||||||
const [loaded, setLoaded] = useState(false)
|
const [loaded, setLoaded] = useState(false)
|
||||||
@@ -26,6 +27,7 @@ export default function Settings () {
|
|||||||
setUseWineOnUnixWhenNeeded(
|
setUseWineOnUnixWhenNeeded(
|
||||||
normalConfig.settings.useWineOnUnixWhenNeeded
|
normalConfig.settings.useWineOnUnixWhenNeeded
|
||||||
)
|
)
|
||||||
|
setWineOnUnixCommand(normalConfig.settings.wineOnUnixCommand)
|
||||||
setAllowNotifications(normalConfig.settings.allowNotifications)
|
setAllowNotifications(normalConfig.settings.allowNotifications)
|
||||||
setUseWindowsRoundedCorners(
|
setUseWindowsRoundedCorners(
|
||||||
normalConfig.settings.useWindowsRoundedCorners
|
normalConfig.settings.useWindowsRoundedCorners
|
||||||
@@ -80,6 +82,21 @@ export default function Settings () {
|
|||||||
}}
|
}}
|
||||||
className={platform() == 'linux' ? '' : 'hidden'}
|
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
|
<Setting
|
||||||
label='Use rounded corners (if supported)'
|
label='Use rounded corners (if supported)'
|
||||||
value={useWindowsRoundedCorners}
|
value={useWindowsRoundedCorners}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export class SettingsType {
|
|||||||
public checkForNewVersionOnLoad: boolean = true,
|
public checkForNewVersionOnLoad: boolean = true,
|
||||||
public allowNotifications: boolean = true,
|
public allowNotifications: boolean = true,
|
||||||
public useWineOnUnixWhenNeeded: boolean = false,
|
public useWineOnUnixWhenNeeded: boolean = false,
|
||||||
|
public wineOnUnixCommand: string = 'wine %path%',
|
||||||
public useWindowsRoundedCorners: boolean = false
|
public useWindowsRoundedCorners: boolean = false
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user