Fix sidebar menu links

This commit is contained in:
Geomitron
2023-12-25 09:16:30 -06:00
parent 99cfb306be
commit 5644ea2447
3 changed files with 5 additions and 4 deletions

View File

@@ -114,7 +114,7 @@
@for (breadcrumb of getVersionBreadcrumbs(version); track $index) {
<li>
<ng-container *ngIf="breadcrumb.link">
<a [href]="breadcrumb.link" target="_blank">{{ breadcrumb.name }}</a>
<a (click)="openUrl(breadcrumb.link)" class="link link-hover">{{ breadcrumb.name }}</a>
</ng-container>
<ng-container *ngIf="!breadcrumb.link">{{ breadcrumb.name }}</ng-container>
</li>

View File

@@ -63,6 +63,10 @@ export class ChartSidebarMenutComponent implements OnInit {
return breadcrumbs
}
openUrl(url: string) {
window.electron.emit.openUrl(url)
}
joinPaths(...args: string[]) {
return args.join('/')
.replace(/\/+/g, '/')

View File

@@ -226,9 +226,6 @@ export class ChartSidebarComponent implements OnInit {
this.difficultyDropdown.setValue(this.defaultDifficulty)
}
/**
* Opens the proxy link or source folder in the default browser.
*/
onSourceLinkClicked() {
window.electron.emit.openUrl(driveLink(this.selectedChart!.applicationDriveId))
}