Просмотр исходного кода

Добавлена обработка state = 'queue'

Book Pauk 5 лет назад
Родитель
Сommit
b7568975e7
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      client/components/Reader/ProgressPage/ProgressPage.vue

+ 8 - 2
client/components/Reader/ProgressPage/ProgressPage.vue

@@ -16,6 +16,7 @@ const ruMessage = {
     'start': ' ',
     'start': ' ',
     'finish': ' ',
     'finish': ' ',
     'error': ' ',
     'error': ' ',
+    'queue': 'очередь',
     'download': 'скачивание',
     'download': 'скачивание',
     'decompress': 'распаковка',
     'decompress': 'распаковка',
     'convert': 'конвертирование',
     'convert': 'конвертирование',
@@ -49,8 +50,13 @@ class ProgressPage extends Vue {
     }
     }
 
 
     setState(state) {
     setState(state) {
-        if (state.state)
-            this.text = (ruMessage[state.state] ? ruMessage[state.state] : state.state);
+        if (state.state) {
+            if (state.state == 'queue') {
+                this.text = 'Номер в очереди: ' + (state.place ? state.place : '');
+            } else {
+                this.text = (ruMessage[state.state] ? ruMessage[state.state] : state.state);
+            }
+        }
         this.step = (state.step ? state.step : this.step);
         this.step = (state.step ? state.step : this.step);
         this.totalSteps = (state.totalSteps > this.totalSteps ? state.totalSteps : this.totalSteps);
         this.totalSteps = (state.totalSteps > this.totalSteps ? state.totalSteps : this.totalSteps);
         this.progress = state.progress || 0;
         this.progress = state.progress || 0;