Compare commits

..

17 Commits

Author SHA1 Message Date
MathieuG-P 61a8790448 bumb version 2023-02-06 22:03:34 +01:00
MathieuG-P 5b4af58baa Merge pull request #135 from Zagrios/hotfix/remove-model-downloader-from-default-mods
hotfix/remove-model-download-from-default-mods
2023-02-06 21:43:42 +01:00
MathieuG-P 6cd3c65362 Merge pull request #134 from Zagrios/hotfix/disable-support-button
hotfix/disable-support-button
2023-02-06 21:41:59 +01:00
MathieuG-P 211a3b9a39 disable support button + fix button hightlight even if disabled + fix click exec even if disabled 2023-02-06 21:37:17 +01:00
MathieuG-P a4fd92a014 remove ModelDownload from default mods 2023-02-06 21:14:40 +01:00
Gaëtan Gerard 295d0f90ba Merge pull request #133 from Synaelle/patch-1
Correction d'orthographe
2023-02-02 21:49:29 +01:00
Synaelle 5592242963 Correction d'orthographe
J'ai corrigé la majorité des fautes que j'ai pu trouvé, ainsi que les problèmes de cohérence dans la mention du jeu. C'est à dire que des fois le jeu est appelé BeatSaber et des fois Beat Saber.
2023-02-02 15:12:47 +01:00
MathieuG-P 0212f3ba26 Merge pull request #132 from 0xAuthenticity/master
Update default-configuration.config.ts
2023-01-28 14:55:56 +01:00
0xAuthenticity 36521a2b1b Update default-configuration.config.ts 2023-01-28 02:23:42 -05:00
MathieuG-P 571a4f23ea re-enable web installer 2023-01-26 00:09:30 +01:00
MathieuG-P 2b9829d57a bumb version 2023-01-25 23:46:55 +01:00
MathieuG-P 2f6ea39f79 Merge pull request #131 from Zagrios/hotfix/file-verification-download-a-version
hotfix/file-verification-download-a-version
2023-01-25 23:45:11 +01:00
MathieuG-P 8e33214fd0 re-add file verification 2023-01-25 23:44:38 +01:00
MathieuG-P 310dfb94c2 Merge pull request #130 from Zagrios/hotfix/disable-web-installer-for-update
hotfix/disable-web-installer-for-update
2023-01-25 20:54:13 +01:00
MathieuG-P 39e2a54e1e Merge pull request #129 from Zagrios/bugfix/selected-effect-missing-available-versions/127
bugfix/selected-effect-missing-available-versions/127
2023-01-25 20:51:02 +01:00
MathieuG-P 829cace7b9 add selected in glowEffect condition 2023-01-25 20:29:08 +01:00
MathieuG-P e82afa7e22 disable web installer for auto update 2023-01-25 20:23:52 +01:00
10 changed files with 70 additions and 65 deletions
+39 -39
View File
@@ -84,7 +84,7 @@
}
},
"available-versions": {
"title": "Choisi une version",
"title": "Choisis une version",
"steam-release": "Notes de version",
"dropdown": {
"refresh": "Rafraichir la liste",
@@ -99,7 +99,7 @@
},
"appearance": {
"title": "Apparence",
"description": "Choisi les deux couleurs principales de BSManager.",
"description": "Choisis les deux couleurs principales de BSManager.",
"reset": "Réinitialiser",
"sub-title": "Thème",
"themes": {
@@ -115,7 +115,7 @@
},
"additional-content": {
"title": "Contenus additionnels",
"description": "Les contenus additionnels te permet de personaliser BeatSaber !",
"description": "Les contenus additionnels te permettent de personaliser Beat Saber!",
"deep-links": {
"sub-title": "Installations OneClick"
}
@@ -138,7 +138,7 @@
},
"patreon": {
"title": "Soutenir BSManager 💖",
"description": "Soutien le projet et aide-nous à fournir des améliorations continues à BSManager.",
"description": "Soutiens le projet et aide-nous à fournir des améliorations continues à BSManager.",
"buttons": {
"support": "Soutenir BSManager 🥰",
"supporters": "Supporteurs 👀"
@@ -170,7 +170,7 @@
},
"common": {
"msg": {
"error-occurred": "Une erreur c'est produite"
"error-occurred": "Une erreur s'est produite"
}
},
"shared": {
@@ -180,8 +180,8 @@
"no-internet": "Pas d'internet"
},
"msg": {
"operation-running": "Attend la fin de l'opération en cours puis recommences.",
"no-internet": "Verifie t'a connexion internet et recommence."
"operation-running": "Attends la fin de l'opération en cours puis recommence.",
"no-internet": "Verifie ta connexion internet et recommence."
}
}
},
@@ -194,11 +194,11 @@
},
"warnings": {
"msg": {
"ManifestChecksum": "Le manifest télécharger précédemment ne correspond pas au nouveau 🤔",
"ManifestChecksum": "Le manifest téléchargé précédemment ne correspond pas au nouveau 🤔",
"ConnectionTimeout": "Ta connexion internet semble instable 🥶",
"ConnectionLost": "La connexion a été perdue, retentative...",
"ConnectionError": "Impossible de se connecter à Steam, retentative...",
"Unknown": "Quelque chose d'étrange c'est produit 🤔 Votre connexion est surement instable."
"ConnectionLost": "La connexion a été perdue, nouvelle tentative...",
"ConnectionError": "Impossible de se connecter à Steam, nouvelle tentative...",
"Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est surement instable."
}
},
"errors": {
@@ -206,31 +206,31 @@
"dotnet-required": ".NET 6 Requis"
},
"msg": {
"401": "Steam semble pas vouloir nous laisser télécharger BeatSaber 😢",
"401": "Steam ne semble pas vouloir nous laisser télécharger Beat Saber 😢",
"404": "Impossible de contacter les serveurs de Steam.",
"Password": "Le mot de passe est invalide.",
"InvalidCredentials": "Ton e-mail ou mot de passe est invalide 😴",
"InvalidPassword": "Ton mot de passe est invalide 😕",
"NoManifest": "Aucun manifest n'a été trouvé.",
"DirectoryCreate": "Impossible d'installer les dossiers nécessaires.",
"NotAvailableApp": "Tu essayes de télécharger BeatSaber alors que tu ne l'as pas ? 🤣",
"DepotNotFound": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NotAvailableApp": "Tu essayes de télécharger Beat Saber alors que tu ne l'as pas ? 🤣",
"DepotNotFound": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NotCompleted": "Le téléchargement n'a pas pu se terminer ¯\\_(ツ)_/¯",
"InvalidManifest": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NoValidKey": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NoManifestCode": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"Unknown": "Une erreur inconnue c'est produite ¯\\_(ツ)_/¯",
"InvalidManifest": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NoValidKey": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NoManifestCode": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"Unknown": "Une erreur inconnue s'est produite ¯\\_(ツ)_/¯",
"NoServer": "Impossible de contacter les serveurs de Steam.",
"NotAllowed": "Apparemment tu n'es pas autorisé à télécharger BeatSaber 🥱",
"NotAllowed": "Apparemment tu n'es pas autorisé à télécharger Beat Saber 🥱",
"ConnectionTimeout": "Impossible de se connecter à Steam 😕",
"SteamLib": "Si tu à cette erreur, report le bug sur GitHub avec les logs stp.",
"SteamLib": "Si tu as cette erreur, signale le bug sur GitHub avec les logs stp.",
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
"LicenceError": "Impossible d'obtenir la liste des licences.",
"verification-failed": "La vérification a échoué, réessaye plus tard.",
"RateLimitExceeded": "Tu as essayé trop de fois attend un peu et recommence plus tard.",
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence plus tard.",
"AlreadyDownloading": "Un téléchargement est déjà en cours",
"no-internet": "Pas de connexion internet.",
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de BeatSaber. Télécharge-le en cliquant sur le bouton ci-dessous."
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
},
"actions":{
"download-dotnet": "Télécharger .NET 6"
@@ -249,7 +249,7 @@
},
"errors":{
"import-error":{
"desc": "Vérifier que le dossier sélectionné est une installation de BeatSaber."
"desc": "Vérifier que le dossier sélectionné est une installation de Beat Saber."
}
}
},
@@ -316,14 +316,14 @@
"UNABLE_TO_LAUNCH": "Lancement impossible",
"STEAM_NOT_RUNNING": "Steam n'est pas lancé",
"OCULUS_NOT_RUNNING": "Oculus n'est pas lancé",
"BS_ALREADY_RUNNING": "BeatSaber est déjà lancé",
"BS_ALREADY_RUNNING": "Beat Saber est déjà lancé",
"EXE_NOT_FINDED": "Fichiers manquants",
"EXIT": "Arrêt brutal"
},
"msg": {
"STEAM_NOT_RUNNING": "Steam doit être en cours d'exécution pour lancer BeatSaber.",
"OCULUS_NOT_RUNNING": "Oculus doit être en cours d'exécution pour lancer BeatSaber.",
"BS_ALREADY_RUNNING": "Ferme BeatSaber avant de le lancer à nouveau.",
"STEAM_NOT_RUNNING": "Steam doit être en cours d'exécution pour lancer Beat Saber.",
"OCULUS_NOT_RUNNING": "Oculus doit être en cours d'exécution pour lancer Beat Saber.",
"BS_ALREADY_RUNNING": "Ferme Beat Saber avant de le lancer à nouveau.",
"EXE_NOT_FINDED": "Quelques fichiers semblent manquants. Essaye de vérifier les fichiers.",
"EXIT": "BeatSaber s'est arrêté brusquement, essaye de vérifier les fichiers."
},
@@ -347,12 +347,12 @@
"CantClone": "Clonage impossible"
},
"msg": {
"CantEditSteam": "Tu ne peut pas éditer la version Steam. Tu peut la cloner par contre."
"CantEditSteam": "Tu ne peux pas éditer la version Steam. Tu peux la cloner par contre."
}
},
"success": {
"titles": {
"CloningFinished": "Clonage terminer 🎉"
"CloningFinished": "Clonage terminé 🎉"
}
}
},
@@ -363,10 +363,10 @@
"warning": "Mods installés 🤔"
},
"msg": {
"success": "Tous les mods on été installés.",
"success": "Tous les mods ont été installés.",
"warning": "Un ou plusieurs mods n'ont pas pu être installés.",
"errors": {
"no-mods": "Aucun mods à installer.",
"no-mods": "Aucun mod à installer.",
"cannot-install-bsipa": "L'installation de BSIPA à échoué 😨"
}
}
@@ -386,7 +386,7 @@
"success": "Mods désintallés 🎉"
},
"msg": {
"success": "Tous les mods on été désintallés.",
"success": "Tous les mods ont été désintallés.",
"errors": {
"no-mods": "Aucun mod n'est installé dans dans cette version 😑"
}
@@ -456,14 +456,14 @@
},
"bs-uninstall": {
"title": "Désinstaller",
"description": "Est-tu sûr de vouloir désinstaller BeatSaber {version} ? Tu vas devoir la retélécharger pour y jouer.",
"description": "Es-tu sûr de vouloir désinstaller Beat Saber {version} ? Tu vas devoir la retélécharger pour y jouer.",
"buttons": {
"submit": "Désinstaller"
}
},
"install-folder": {
"title": "Dossier d'installation",
"description": "Changer le dossier d'installation par défaut, va engendrer le déplacement de toutes les données installer vers le nouveau dossier.",
"description": "Changer le dossier d'installation par défaut, cela va engendrer le déplacement de toutes les données installer vers le nouveau dossier.",
"buttons": {
"submit": "Choisir un dossier"
}
@@ -506,12 +506,12 @@
"multiple": "Supprimer les maps ?"
},
"desc": {
"single": "Est-tu sur de vouloir supprimer la map {name} ?",
"multiple": "Est-tu sur de vouloir supprimer les {nb} maps ?"
"single": "Es-tu sur de vouloir supprimer la map {name} ?",
"multiple": "Es-tu sur de vouloir supprimer les {nb} maps ?"
},
"info": {
"desc": {
"single": "Cette map fait partie des maps paratagées",
"single": "Cette map fait partie des maps partagées",
"multiple": "Ces maps font parties des maps partagées"
},
"title": {
@@ -552,7 +552,7 @@
"li-1": "Vous pouvez rencontrer des problèmes qui n'existent pas dans le jeu de base. 99.9% des bugs, plantages et ralentissements sont dus aux mods.",
"li-2": "Les mods sont susceptibles de ne plus fonctionner à cause des mises à jour et c'est normal - soyez patient et respectueux lorsque cela se produit, parce que les moddeurs sont bénévoles et ont une vie.",
"li-3": "Beat Games ne cherche pas volontairement à casser les mods. Ils souhaitent améliorer la base du jeu et parfois cela casse les mods, mais ce n'est pas dans leur objectif de tuer les mods.",
"p-2": "N'attaquez pas les développeurs pour des problèmes relatifs aux mods, et inversement - les moddeurs et les développeurs sont deux groupes distincts. Ne sois pas idiot, d'accord ?"
"p-2": "N'attaquez pas les développeurs pour des problèmes relatifs aux mods, et inversement - les moddeurs et les développeurs sont deux groupes distincts. Ne soyez pas idiots, d'accord ?"
}
},
"maps": {
@@ -694,4 +694,4 @@
"PM"
]
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "bs-manager",
"version": "1.0.0-alpha.8",
"version": "1.0.1",
"description": "A foundation for scalable desktop apps",
"main": "./dist/main/main.js",
"author": {
+1 -9
View File
@@ -1,6 +1,5 @@
import { ipcMain } from 'electron';
import { BSVersion } from 'shared/bs-version.interface';
import { BSInstallerService, DownloadEventType } from '../services/bs-installer.service';
import { BSInstallerService, DownloadEventType, DownloadInfo } from '../services/bs-installer.service';
import { IpcRequest } from 'shared/models/ipc';
import { InstallationLocationService } from '../services/installation-location.service';
import { UtilsService } from '../services/utils.service';
@@ -18,13 +17,6 @@ export interface InitDownloadInfoInterface {
stay: boolean
}
export interface DownloadInfo {
bsVersion: BSVersion,
username: string,
password?: string,
stay?: boolean
}
ipcMain.on('is-dotnet-6-installed', async (event, request: IpcRequest<void>) => {
const installer = BSInstallerService.getInstance();
const utils = UtilsService.getInstance();
+5 -2
View File
@@ -87,7 +87,9 @@ export class BSInstallerService{
this.utils.createFolderIfNotExist(this.installLocationService.versionsDirectory);
const dest = this.getPathNotAleardyExist(await this.localVersionService.getVersionPath(bsVersion));
const versionPath = await this.localVersionService.getVersionPath(bsVersion)
const dest = !downloadInfos.isVerification ? this.getPathNotAleardyExist(versionPath) : versionPath;
const downloadVersion: BSVersion = {...downloadInfos.bsVersion, ...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && {name: path.basename(dest)})}
@@ -204,7 +206,8 @@ export interface DownloadInfo {
bsVersion: BSVersion,
username: string,
password?: string,
stay?: boolean
stay?: boolean,
isVerification: boolean
}
export interface DownloadEvent{
@@ -42,7 +42,7 @@ export const AvailableVersionItem = memo(function AvailableVersionItem(props: {v
return (
<motion.li className="group relative w-72 h-60 transition-transform active:scale-[.98]" onClick={toggleSelect} onHoverStart={() => setHovered(true)} onHoverEnd={() => setHovered(false)}>
<GlowEffect visible={hovered} className="absolute"/>
<GlowEffect visible={hovered || selected} className="absolute"/>
<div className={`relative flex flex-col overflow-hidden rounded-md w-72 h-60 cursor-pointer group-hover:shadow-none duration-300 bg-light-main-color-2 dark:bg-main-color-2 ${!selected && "shadow-lg shadow-gray-900"}`}>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="absolute top-0 right-0 w-full h-full opacity-40 blur-xl object-cover" loading="lazy"/>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="bg-black w-full h-3/4 object-cover" loading="lazy"/>
@@ -43,9 +43,12 @@ export function BsVersionItem(props: {version: BSVersion}) {
const cancel = () => {
const versionDownload = downloaderService.currentBsVersionDownload$.value;
const wasVerification = downloaderService.isVerification;
downloaderService.cancelDownload().then(async res => {
if(!res.success){ return; }
bsUninstallerService.uninstall(versionDownload).then(res => res && verionManagerService.askInstalledVersions());
if(!wasVerification){
bsUninstallerService.uninstall(versionDownload).then(res => res && verionManagerService.askInstalledVersions());
}
});
}
@@ -1,5 +1,5 @@
import { BsmIcon, BsmIconType } from "../svgs/bsm-icon.component"
import { useRef, CSSProperties } from "react";
import { useRef, CSSProperties, MouseEvent } from "react";
import { BsmImage } from "./bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { useClickOutside } from "renderer/hooks/use-click-outside.hook";
@@ -45,15 +45,17 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon,
const renderTypeColor = (() => {
if(typeColor === "primary"){ return ""; }
if(!typeColor){ return `bg-light-main-color-2 dark:bg-main-color-2 ${!withBar && "hover:brightness-125"}`; }
if(!typeColor){ return `bg-light-main-color-2 dark:bg-main-color-2 ${(!withBar && !disabled) && "hover:brightness-125"}`; }
if(typeColor === "cancel"){ return "bg-gray-500"; }
if(typeColor === "error"){ return "bg-red-500"; }
if(typeColor === "success"){ return "bg-green-500"; }
return "";
})();
const handleClick = (e: MouseEvent) => !disabled && onClick(e);
return (
<div ref={ref} onClick={onClick} title={t(title)} className={`${className} overflow-hidden cursor-pointer group ${(!withBar && !disabled && (!!typeColor || !!color)) && "hover:brightness-[1.15]"} ${disabled && "brightness-75 cursor-not-allowed"} ${renderTypeColor}`} style={{...style, backgroundColor: primaryColor || color}}>
<div ref={ref} onClick={handleClick} title={t(title)} className={`${className} overflow-hidden cursor-pointer group ${(!withBar && !disabled && (!!typeColor || !!color)) && "hover:brightness-[1.15]"} ${disabled && "brightness-75 cursor-not-allowed"} ${renderTypeColor}`} style={{...style, backgroundColor: primaryColor || color}}>
{ image && <BsmImage image={image} className={imgClassName}/> }
{ icon && <BsmIcon icon={icon} className={iconClassName ?? "h-full w-full text-gray-800 dark:text-white"} style={{color: iconColor}}/> }
{text && (type === "submit" ? <button type="submit" className={textClassName || "h-full w-full"} style={{...(!!textColor && {color: textColor})}}>{t(text)}</button> : <span className={textClassName} style={{...(!!textColor && {color: `${textColor}`})}}>{t(text)}</span>)}
@@ -4,9 +4,9 @@ export const defaultConfiguration: {[key in DefaultConfigKey]: any} = {
"theme": "os",
"language": window.navigator.language.length <= 2 ? `${window.navigator.language}-${window.navigator.language.toLocaleUpperCase()}` : window.navigator.language,
"supported_languages": ["en-US", "en-EN", "fr-FR", "es-ES"],
"default_mods": ["SongCore", "ScoreSaber", "BeatSaverDownloader", "BeatSaverVoting", "PlaylistManager", "ModelDownloader"]
"default_mods": ["SongCore", "WhyIsThereNoLeaderboard", "BeatSaverDownloader", "BeatSaverVoting", "PlaylistManager"]
}
export type DefaultConfigKey = "first-color" | "second-color" | "theme" | "language" | "supported_languages" | "default_mods";
export type ThemeConfig = "dark" | "light" | "os"
export type ThemeConfig = "dark" | "light" | "os"
@@ -293,7 +293,7 @@ export function SettingsPage() {
<SettingContainer title="pages.settings.patreon.title" description="pages.settings.patreon.description">
<div className="flex gap-2">
<BsmButton className="flex w-fit rounded-md h-8 px-2 font-bold py-1 whitespace-nowrap !bg-red-500 !text-white" text="pages.settings.patreon.buttons.support" withBar={false} onClick={openSupportPage}/>
<BsmButton disabled color="#ef4444" className="flex w-fit rounded-md h-8 px-2 font-bold py-1 whitespace-nowrap !text-white" text="pages.settings.patreon.buttons.support" withBar={false} onClick={openSupportPage}/>
<BsmButton className="flex w-fit rounded-md h-8 px-2 font-bold py-1 !text-white" withBar={false} text="pages.settings.patreon.buttons.supporters" color="#6c5ce7" onClick={toogleShowSupporters}/>
</div>
<SettingContainer className="mt-3" description="pages.settings.discord.description">
+11 -6
View File
@@ -1,4 +1,4 @@
import { DownloadEvent } from 'main/services/bs-installer.service';
import { DownloadEvent, DownloadInfo } from 'main/services/bs-installer.service';
import { BehaviorSubject } from 'rxjs';
import { distinctUntilChanged, filter, throttleTime } from 'rxjs/operators';
import { IpcResponse } from 'shared/models/ipc';
@@ -25,6 +25,8 @@ export class BsDownloaderService{
private readonly notificationService: NotificationService;
private readonly linkOpener: LinkOpenerService;
private _isVerification: boolean = false;
public readonly currentBsVersionDownload$: BehaviorSubject<BSVersion> = new BehaviorSubject(null);
public readonly downloadProgress$: BehaviorSubject<number> = new BehaviorSubject(0);
public readonly selectedBsVersion$: BehaviorSubject<BSVersion> = new BehaviorSubject(null);
@@ -94,7 +96,7 @@ export class BsDownloaderService{
return this.ipcService.send<boolean>("is-dotnet-6-installed").then(res => res.success && res.data)
}
public async download(bsVersion: BSVersion, isFirstCall = true): Promise<IpcResponse<DownloadEvent>>{
public async download(bsVersion: BSVersion, isVerification?: boolean, isFirstCall = true): Promise<IpcResponse<DownloadEvent>>{
if(isFirstCall && !this.progressBarService.require()){ return {success: false}; }
if(isFirstCall && !(await this.isDotNet6Installed())){
@@ -114,6 +116,7 @@ export class BsDownloaderService{
}
this.progressBarService.show(this.downloadProgress$);
this._isVerification = isVerification;
let promise;
if(!this.authService.sessionExist()){
@@ -123,22 +126,22 @@ export class BsDownloaderService{
return {success: false};
}
this.authService.setSteamSession(res.data.username, res.data.stay);
promise = this.ipcService.send<DownloadEvent>('bs-download.start', {args: {bsVersion, username: res.data.username, password: res.data.password, stay: res.data.stay}});
promise = this.ipcService.send<DownloadEvent, DownloadInfo>('bs-download.start', {args: {bsVersion, username: res.data.username, password: res.data.password, stay: res.data.stay, isVerification}});
}
else{
promise = this.ipcService.send<DownloadEvent>('bs-download.start', {args: {bsVersion, username: this.authService.getSteamUsername()}});
promise = this.ipcService.send<DownloadEvent, DownloadInfo>('bs-download.start', {args: {bsVersion, username: this.authService.getSteamUsername(), isVerification}});
}
let res = await promise;
if(res.data?.type === "[Password]"){
this.authService.deleteSteamSession();
res = await this.download(bsVersion, false);
res = await this.download(bsVersion, isVerification, false);
}
this.progressBarService.hide(true);
this.resetDownload();
if(res.success && isFirstCall){ this.notificationService.notifySuccess({title: "notifications.bs-download.success.titles.download-success", duration: 3000}); }
if(res.success && isFirstCall){ this.notificationService.notifySuccess({title: `notifications.bs-download.success.titles.${isVerification ? "verification-finished" : "download-success"}`, duration: 3000}); }
else if(res.data && isFirstCall){ this.notificationService.notifyError({title: `notifications.types.error`, desc: `notifications.bs-download.errors.msg.${res.data}`, duration: 3000}); }
return res;
@@ -151,6 +154,8 @@ export class BsDownloaderService{
return res.success ? res.data : "";
}
public get isVerification(): boolean{ return this._isVerification; }
public setInstallationFolder(path: string): Promise<IpcResponse<string>>{
return this.ipcService.send<string>("bs-download.set-installation-folder", {args: path});
}