diff --git a/src/locales/en.json b/src/locales/en.json index cadd973605..e01e9aa642 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -858,6 +858,7 @@ } }, "preview": "Preview", + "reader_loading_label": "Loading", "RedirectPage": { "title": "Redirecting" }, diff --git a/src/locales/zh-Hant.json b/src/locales/zh-Hant.json index 8c3ba676f3..b474b61bcb 100644 --- a/src/locales/zh-Hant.json +++ b/src/locales/zh-Hant.json @@ -858,6 +858,7 @@ } }, "preview": "預覽", + "reader_loading_label": "載入中", "RedirectPage": { "title": "重新轉向" }, diff --git a/src/mixins/reader.js b/src/mixins/reader.js index 815b1b5338..e09d941c60 100644 --- a/src/mixins/reader.js +++ b/src/mixins/reader.js @@ -35,6 +35,16 @@ export default { totalSizeInMB() { return (this.totalSize / (1024 * 1024)).toFixed(2); }, + progressIndicatorType() { + return this.totalSize ? 'determinate' : 'indeterminate'; + }, + progressLabelText() { + return this.totalSize + ? `${this.progressSizeInMB} / ${this.totalSizeInMB} MB (${ + this.progressPercent + }%)` + : this.$t('reader_loading_label'); + }, }, methods: { async getFileBuffer(cacheKey) { diff --git a/src/pages/reader.vue b/src/pages/reader.vue index 0c647ccae4..f27ffc7c6f 100644 --- a/src/pages/reader.vue +++ b/src/pages/reader.vue @@ -1,6 +1,12 @@