mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feat] follow launch command string even if its hidden
This commit is contained in:
+1
-7
@@ -31,13 +31,7 @@ export const CreateLaunchShortcutModal: ModalComponent<{ steamShortcut: boolean,
|
||||
}, [data]);
|
||||
|
||||
const completeModal = () => {
|
||||
|
||||
if(advanced) {
|
||||
launchOption.command = command.trim();
|
||||
} else {
|
||||
launchOption.command = "";
|
||||
}
|
||||
|
||||
launchOption.command = command.trim();
|
||||
resolver({exitCode: ModalExitCode.COMPLETED, data: { launchOption, steamShortcut }});
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export function LaunchSlide({ version }: Props) {
|
||||
const versions = useService(BSVersionManagerService);
|
||||
|
||||
const [advancedLaunch, setAdvancedLaunch] = useState(false);
|
||||
const [command, setCommand] = useState<string>(configService.get<string>("additionnal-args") || "");
|
||||
const [command, setCommand] = useState<string>(configService.get<string>("launch-command") || "");
|
||||
const versionDownloading = useObservable(() => bsDownloader.downloadingVersion$);
|
||||
const [activeLaunchMods, setActiveLaunchMods] = useState<LaunchMod[]>(configService.get("launch-mods") ?? []);
|
||||
const [pinnedLaunchMods, setPinnedLaunchMods] = useState<LaunchMod[]>(configService.get("pinned-launch-mods" as DefaultConfigKey) ?? []);
|
||||
@@ -46,7 +46,7 @@ export function LaunchSlide({ version }: Props) {
|
||||
const versionRunning = useObservable(() => bsLauncherService.versionRunning$);
|
||||
|
||||
useEffect(() => {
|
||||
configService.set("additionnal-args", command);
|
||||
configService.set("launch-command", command);
|
||||
}, [command]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -149,7 +149,7 @@ export function LaunchSlide({ version }: Props) {
|
||||
const launch$ = bsLauncherService.launch({
|
||||
version,
|
||||
launchMods: activeLaunchMods,
|
||||
command: advancedLaunch ? command : "",
|
||||
command,
|
||||
});
|
||||
|
||||
return lastValueFrom(launch$).catch(() => {});
|
||||
|
||||
@@ -40,7 +40,7 @@ export class BSLauncherService {
|
||||
return {
|
||||
version,
|
||||
launchMods: this.config.get("launch-mods") ?? [],
|
||||
command: this.config.get<string>("additionnal-args") || "",
|
||||
command: this.config.get<string>("launch-command") || "",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user