mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
handle enable and disable map deep links
This commit is contained in:
@@ -159,8 +159,24 @@ export class MapsManagerService {
|
||||
this.progressBar.hide(true);
|
||||
}
|
||||
|
||||
public async enableDeepLink(): Promise<boolean>{
|
||||
return true; // TODO
|
||||
public isDeepLinksEnabled(): Promise<boolean>{
|
||||
|
||||
return this.ipcService.send<boolean>("is-map-deep-links-enabled").then(res => (
|
||||
res.success ? res.data : false
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
public async toogleDeepLinks(): Promise<boolean>{
|
||||
|
||||
const isEnabled = await this.isDeepLinksEnabled();
|
||||
|
||||
const channel = isEnabled ? "unregister-maps-deep-link" : "register-maps-deep-link";
|
||||
|
||||
const res = await this.ipcService.send<boolean>(channel);
|
||||
|
||||
return res.success ? res.data : false;
|
||||
|
||||
}
|
||||
|
||||
public get versionLinked$(): Observable<BSVersion>{
|
||||
|
||||
Reference in New Issue
Block a user