Commit b1aeea39 authored by wudizhanche1000's avatar wudizhanche1000

修改更新

parent ff7bf7d1
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</div> </div>
<h2 i18n>本地文件</h2> <h2 i18n>本地文件</h2>
<button i18n (click)="appsService.browse(currentApp)" type="button" class="btn btn-secondary">浏览本地文件</button> <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> <button i18n (click)="uninstall(currentApp)" type="button" class="btn btn-secondary">卸载</button>
</div> </div>
......
...@@ -145,6 +145,10 @@ export class AppDetailComponent implements OnInit { ...@@ -145,6 +145,10 @@ export class AppDetailComponent implements OnInit {
this.appsService.runApp(app, 'custom'); this.appsService.runApp(app, 'custom');
} }
verifyFiles(app: App) {
this.appsService.verifyFiles(app);
}
copy(text: string) { copy(text: string) {
clipboard.writeText(text); clipboard.writeText(text);
} }
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ export class DownloadStatus { ...@@ -23,7 +23,7 @@ export class DownloadStatus {
downloadSpeed: number; downloadSpeed: number;
get downloadSpeedText(): string { 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"]; const speedUnit = ["Byte/s", "KB/s", "MB/s", "GB/s", "TB/s"];
let currentUnit = Math.floor(Math.log(this.downloadSpeed) / Math.log(1024)); let currentUnit = Math.floor(Math.log(this.downloadSpeed) / Math.log(1024));
return (this.downloadSpeed / 1024 ** currentUnit).toFixed(1) + " " + speedUnit[currentUnit]; 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