mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Add download location settings
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
<h2 class="card-title">{{ download.chartName }}</h2>
|
||||
<h2 class="card-title">{{ getDownloadName(download) }}</h2>
|
||||
<progress
|
||||
[attr.value]="download.percent"
|
||||
max="100"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { Component, HostBinding } from '@angular/core'
|
||||
|
||||
import { SettingsService } from 'src-angular/app/core/services/settings.service'
|
||||
import { DownloadProgress } from 'src-shared/interfaces/download.interface'
|
||||
import { resolveChartFolderName } from 'src-shared/UtilFunctions'
|
||||
|
||||
import { DownloadService } from '../../../../core/services/download.service'
|
||||
|
||||
@Component({
|
||||
@@ -9,9 +13,16 @@ import { DownloadService } from '../../../../core/services/download.service'
|
||||
export class DownloadsModalComponent {
|
||||
@HostBinding('class.contents') contents = true
|
||||
|
||||
constructor(public downloadService: DownloadService) { }
|
||||
constructor(
|
||||
public downloadService: DownloadService,
|
||||
public settingsService: SettingsService,
|
||||
) { }
|
||||
|
||||
showFile(filepath: string) {
|
||||
window.electron.emit.showFile(filepath)
|
||||
}
|
||||
|
||||
getDownloadName(download: DownloadProgress) {
|
||||
return resolveChartFolderName(this.settingsService.chartFolderName, download.chart)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user