mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
add useful methods
This commit is contained in:
@@ -42,4 +42,12 @@ export class BSVersionManagerService {
|
||||
window.electron.ipcRenderer.sendMessage("bs-version.installed-versions", null);
|
||||
}
|
||||
|
||||
}
|
||||
public getAvailableYears(): string[]{
|
||||
return [ ...new Set(this.availableVersions$.value.map(v => v.year))].sort((a, b) => b.localeCompare(a));
|
||||
}
|
||||
|
||||
public getAvaibleVersionsOfYear(year: string): BSVersion[]{
|
||||
return this.availableVersions$.value.filter(v => v.year === year);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user