mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feat-578] setup protonFolder on startup
This commit is contained in:
@@ -6,7 +6,8 @@ import { InstallationLocationService } from "./installation-location.service";
|
||||
import { IpcService } from "./ipc.service";
|
||||
import { ModalService } from "./modale.service";
|
||||
|
||||
import { AskInstallPathModal } from "renderer/components/modal/modal-types/ask-install-path.component";
|
||||
import { AskInstallPathModal } from "renderer/components/modal/modal-types/setup/ask-install-path.component";
|
||||
import { LinuxSetupModal } from "renderer/components/modal/modal-types/setup/linux-setup-modal.component";
|
||||
|
||||
// Handle setup modals/prompts, ordering of the modals/prompts may be done here
|
||||
export class SetupService {
|
||||
@@ -35,6 +36,10 @@ export class SetupService {
|
||||
try {
|
||||
// NOTE: for modal sequencing
|
||||
await this.checkInstallationPath();
|
||||
|
||||
if (window.electron.platform === "linux") {
|
||||
await this.checkProtonFolder();
|
||||
}
|
||||
} catch (error) {
|
||||
logRenderError(error);
|
||||
}
|
||||
@@ -61,4 +66,20 @@ export class SetupService {
|
||||
}
|
||||
}
|
||||
|
||||
private async checkProtonFolder(): Promise<void> {
|
||||
try {
|
||||
const valid = await lastValueFrom(this.ipcService.sendV2("linux.verify-proton-folder"));
|
||||
if (valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.modalService.openModal(
|
||||
LinuxSetupModal,
|
||||
{ closable: false }
|
||||
);
|
||||
} catch (error) {
|
||||
logRenderError(error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user