From bb5c14239061f9472c131080a0f03c4a569177a2 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Fri, 5 Jun 2020 11:39:39 +0200 Subject: [PATCH] Change upload size unit to MB in config dialog --- js/src/configdialogmodel.js | 6 ++++-- lang/en.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/configdialogmodel.js b/js/src/configdialogmodel.js index aa67b8d..d71440f 100644 --- a/js/src/configdialogmodel.js +++ b/js/src/configdialogmodel.js @@ -55,7 +55,8 @@ export default class ConfigDialogModel extends ViewModel { strokeOpacity: config.strokeOpacity, strokeWeight: config.strokeWeight, units: config.units, - uploadMaxSize: config.uploadMaxSize + uploadMaxSize: config.uploadMaxSize, + uploadMaxSizeMB: config.uploadMaxSize / 1024 / 1024 }); this.model.onCancel = () => this.onCancel(); this.model.onSave = () => this.onSave(); @@ -83,6 +84,7 @@ export default class ConfigDialogModel extends ViewModel { this.model.layerUrl = layer ? layer.url : ''; this.toggleEditVisible(); }); + this.onChanged('uploadMaxSizeMB', (value) => { this.model.uploadMaxSize = value * 1024 * 1024;}) this.onChanged('layers', (list) => this.layerSelect.setOptions(list)); this.onChanged('requireAuth', (value) => { this.setPublicTracksActivity(value); @@ -244,7 +246,7 @@ export default class ConfigDialogModel extends ViewModel { +