update front-end for new backend config storage

pull/1/head
Ondřej Hruška 7 years ago
parent ce46ad7e96
commit 8327ff0108
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 8
      _debug_replacements.php
  2. 18
      pages/cfg_term.php

@ -20,7 +20,7 @@ if (file_exists($versfn)) {
} }
return [ return [
'term_title' => ESP_DEMO ? 'ESPTerm Web UI Demo' : 'ESPTerm local debug', 'title' => ESP_DEMO ? 'ESPTerm Web UI Demo' : 'ESPTerm local debug',
'btn1' => 'OK', 'btn1' => 'OK',
'btn2' => 'Cancel', 'btn2' => 'Cancel',
@ -79,14 +79,14 @@ return [
'sta_mac' => '5c:cf:7f:02:74:51', 'sta_mac' => '5c:cf:7f:02:74:51',
'ap_mac' => '5e:cf:7f:02:74:51', 'ap_mac' => '5e:cf:7f:02:74:51',
'term_width' => '80', 'width' => '80',
'term_height' => '25', 'height' => '25',
'default_bg' => '0', 'default_bg' => '0',
'default_fg' => '7', 'default_fg' => '7',
'show_buttons' => '1', 'show_buttons' => '1',
'show_config_links' => '1', 'show_config_links' => '1',
'uart_baud' => 115200, 'uart_baudrate' => 115200,
'uart_stopbits' => 1, 'uart_stopbits' => 1,
'uart_parity' => 2, 'uart_parity' => 2,

@ -134,18 +134,18 @@
<div class="Row"> <div class="Row">
<div class="SubRow"> <div class="SubRow">
<label for="term_width"><?= tr('term.term_width') ?></label> <label for="width"><?= tr('term.term_width') ?></label>
<input type="number" step=1 min=1 max=255 name="term_width" id="term_width" value="%term_width%" required> <input type="number" step=1 min=1 max=255 name="width" id="width" value="%width%" required>
</div> </div>
<div class="SubRow"> <div class="SubRow">
<label for="term_height"><?= tr('term.term_height') ?></label> <label for="height"><?= tr('term.term_height') ?></label>
<input type="number" step=1 min=1 max=255 name="term_height" id="term_height" value="%term_height%" required> <input type="number" step=1 min=1 max=255 name="height" id="height" value="%height%" required>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<label for="term_title"><?= tr('term.term_title') ?></label> <label for="title"><?= tr('term.term_title') ?></label>
<input type="text" name="term_title" id="term_title" value="%h:term_title%" required> <input type="text" name="title" id="title" value="%h:title%" required>
</div> </div>
<div class="Row checkbox" > <div class="Row checkbox" >
@ -203,8 +203,8 @@
</div> </div>
<div class="Row"> <div class="Row">
<label for="uart_baud"><?= tr('uart.baud') ?><span class="mq-phone">&nbsp;(bps)</span></label> <label for="uart_baudrate"><?= tr('uart.baud') ?><span class="mq-phone">&nbsp;(bps)</span></label>
<select name="uart_baud" id="uart_baud" class="short"> <select name="uart_baudrate" id="uart_baudrate" class="short">
<?php <?php
foreach([ foreach([
300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400,
@ -320,7 +320,7 @@
$.ready(function () { $.ready(function () {
$('#cursor_shape').val('%cursor_shape%'); $('#cursor_shape').val('%cursor_shape%');
$('#theme').val('%theme%'); $('#theme').val('%theme%');
$('#uart_baud').val('%uart_baud%'); $('#uart_baudrate').val('%uart_baudrate%');
$('#uart_parity').val('%uart_parity%'); $('#uart_parity').val('%uart_parity%');
$('#uart_stopbits').val('%uart_stopbits%'); $('#uart_stopbits').val('%uart_stopbits%');

Loading…
Cancel
Save