diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-05-11 19:04:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 19:04:37 +0200 |
commit | 57d9b827fde3bf587e3a0b146f0ec70ddb52f5aa (patch) | |
tree | 64eac80e198ea7ef8468928cbecf64dd6cdb9620 /src-vue/src/components | |
parent | 563ef75103a12b08279466502e04413f1060f2fc (diff) | |
download | FlightCore-57d9b827fde3bf587e3a0b146f0ec70ddb52f5aa.tar.gz FlightCore-57d9b827fde3bf587e3a0b146f0ec70ddb52f5aa.zip |
refactor: Move NS install code into own module (#345)
* refactor: Move NS install code into own module
Moves the code in question out from main into its own module
* fix: Address clippy errors
Diffstat (limited to 'src-vue/src/components')
-rw-r--r-- | src-vue/src/components/InstallProgressBar.vue | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-vue/src/components/InstallProgressBar.vue b/src-vue/src/components/InstallProgressBar.vue index d0c2047c..21901ac0 100644 --- a/src-vue/src/components/InstallProgressBar.vue +++ b/src-vue/src/components/InstallProgressBar.vue @@ -30,13 +30,13 @@ export default defineComponent({ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; }, formatText() { - if (this.status == "DOWNLOADING") { + if (this.status == "Downloading") { const current_downloaded_string = this.formatBytes(this.current_downloaded); const total_size_string = this.formatBytes(this.total_size); const status = this.$t("generic.downloading"); return `${status}: ${current_downloaded_string}/${total_size_string}`; } - if (this.status == "EXTRACTING") { + if (this.status == "Extracting") { return this.$t("generic.extracting"); } return "Inactive"; // Needed to keep same size format when progress bar is hidden @@ -49,17 +49,17 @@ export default defineComponent({ this.install_or_update = true; let progress = payload; this.status = progress.state; - if (progress.state == "DOWNLOADING") { + if (progress.state == "Downloading") { this.percentage = ((Number(progress.current_downloaded) / Number(progress.total_size)) * 100); this.color = '#409EFF'; this.current_downloaded = Number(progress.current_downloaded); this.total_size = Number(progress.total_size); } - if (progress.state == "EXTRACTING") { + if (progress.state == "Extracting") { this.percentage = 100; this.color = '#67C23A'; } - if (progress.state == "DONE") { + if (progress.state == "Done") { // Clear state again this.install_or_update = false } @@ -75,7 +75,7 @@ export default defineComponent({ :format="formatText" :percentage="percentage" :color="color" - :indeterminate="status === 'EXTRACTING'" + :indeterminate="status === 'Extracting'" :duration="1" > </el-progress> |