mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
add select all to toogle oneClicks
This commit is contained in:
@@ -166,24 +166,19 @@ export class MapsManagerService {
|
||||
this.progressBar.hide(true);
|
||||
}
|
||||
|
||||
public isDeepLinksEnabled(): Promise<boolean>{
|
||||
|
||||
return this.ipcService.send<boolean>("is-map-deep-links-enabled").then(res => (
|
||||
res.success ? res.data : false
|
||||
));
|
||||
|
||||
public async isDeepLinksEnabled(): Promise<boolean>{
|
||||
const res = await this.ipcService.send<boolean>("is-map-deep-links-enabled");
|
||||
return 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);
|
||||
|
||||
public async enableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipcService.send<boolean>("register-maps-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
}
|
||||
|
||||
public async disableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipcService.send<boolean>("unregister-maps-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
}
|
||||
|
||||
public get versionLinked$(): Observable<BSVersion>{
|
||||
|
||||
@@ -21,18 +21,14 @@ export class ModelsManagerService {
|
||||
));
|
||||
}
|
||||
|
||||
public async toogleDeepLinks(): Promise<boolean>{
|
||||
|
||||
const isEnabled = await this.isDeepLinksEnabled();
|
||||
|
||||
const channel = isEnabled ? "unregister-models-deep-link" : "register-models-deep-link";
|
||||
|
||||
const res = await this.ipc.send<boolean>(channel);
|
||||
|
||||
public async enableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipc.send<boolean>("register-models-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async disableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipc.send<boolean>("unregister-models-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,16 +21,14 @@ export class PlaylistsManagerService {
|
||||
));
|
||||
}
|
||||
|
||||
public async toogleDeepLinks(): Promise<boolean>{
|
||||
|
||||
const isEnabled = await this.isDeepLinksEnabled();
|
||||
|
||||
const channel = isEnabled ? "unregister-playlists-deep-link" : "register-playlists-deep-link";
|
||||
|
||||
const res = await this.ipc.send<boolean>(channel);
|
||||
|
||||
public async enableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipc.send<boolean>("register-playlists-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
}
|
||||
|
||||
public async disableDeepLink(): Promise<boolean>{
|
||||
const res = await this.ipc.send<boolean>("unregister-playlists-deep-link");
|
||||
return res.success ? res.data : false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user