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

This commit is contained in:
Book Pauk
2020-01-26 18:31:31 +07:00
parent 4b9475310f
commit b7568975e7

View File

@@ -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) if (state.state) {
this.text = (ruMessage[state.state] ? ruMessage[state.state] : 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;