Commit b1aeea39 authored by wudizhanche1000's avatar wudizhanche1000

修改更新

parent ff7bf7d1
......@@ -76,7 +76,7 @@
</div>
<h2 i18n>本地文件</h2>
<button i18n (click)="appsService.browse(currentApp)" type="button" class="btn btn-secondary">浏览本地文件</button>
<button i18n type="button" class="btn btn-secondary">校验完整性</button>
<button i18n type="button" (click)="verifyFiles(currentApp)" class="btn btn-secondary">校验完整性</button>
<button i18n (click)="uninstall(currentApp)" type="button" class="btn btn-secondary">卸载</button>
</div>
......
......@@ -145,6 +145,10 @@ export class AppDetailComponent implements OnInit {
this.appsService.runApp(app, 'custom');
}
verifyFiles(app: App) {
this.appsService.verifyFiles(app);
}
copy(text: string) {
clipboard.writeText(text);
}
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ export class DownloadStatus {
downloadSpeed: number;
get downloadSpeedText(): string {
if (!isNaN(this.downloadSpeed)) {
if (!isNaN(this.downloadSpeed) && this.downloadSpeed !== 0) {
const speedUnit = ["Byte/s", "KB/s", "MB/s", "GB/s", "TB/s"];
let currentUnit = Math.floor(Math.log(this.downloadSpeed) / Math.log(1024));
return (this.downloadSpeed / 1024 ** currentUnit).toFixed(1) + " " + speedUnit[currentUnit];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment