diff --git a/images/icons/cf_icon_usb1_white.svg b/images/icons/cf_icon_usb1_white.svg new file mode 100644 index 00000000..aab69b97 --- /dev/null +++ b/images/icons/cf_icon_usb1_white.svg @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/images/icons/cf_icon_usb2_white.svg b/images/icons/cf_icon_usb2_white.svg new file mode 100644 index 00000000..767f2187 --- /dev/null +++ b/images/icons/cf_icon_usb2_white.svg @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/js/serial_backend.js b/js/serial_backend.js index 2f9e36e6..3a97536b 100755 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -41,7 +41,8 @@ $(document).ready(function () { // lock port select & baud while we are connecting / connected $('div#port-picker #port, div#port-picker #baud, div#port-picker #delay').prop('disabled', true); - $('div#port-picker a.connect').text(chrome.i18n.getMessage('connecting')); + $('div#port-picker a.connect_state').text(chrome.i18n.getMessage('connecting')); + serial.connect(selected_port, {bitrate: selected_baud}, onOpen); } else { @@ -69,9 +70,9 @@ $(document).ready(function () { if (!GUI.auto_connect) $('div#port-picker #baud').prop('disabled', false); // reset connect / disconnect button - $(this).text(chrome.i18n.getMessage('connect')); - $(this).removeClass('active'); - + $('div#port-picker a.connect').removeClass('active'); + $('div#port-picker a.connect_state').text(chrome.i18n.getMessage('connect')); + // reset active sensor indicators sensor_status(0); @@ -220,7 +221,7 @@ function onOpen(openInfo) { console.log('Failed to open serial port'); GUI.log(chrome.i18n.getMessage('serialPortOpenFail')); - $('div#port-picker a.connect').text(chrome.i18n.getMessage('connect')); + $('div#port-picker a.connect_state').text(chrome.i18n.getMessage('connect')); $('div#port-picker a.connect').removeClass('active'); // unlock port select & baud @@ -233,7 +234,8 @@ function onOpen(openInfo) { function onConnect() { GUI.timeout_remove('connecting'); // kill connecting timer - $('div#port-picker a.connect').text(chrome.i18n.getMessage('disconnect')).addClass('active'); + $('a.connect_state').text(chrome.i18n.getMessage('disconnect')).addClass('active'); + $('div#port-picker a.connect').addClass('active'); $('#tabs ul.mode-disconnected').hide(); $('#tabs ul.mode-connected').show(); diff --git a/main.css b/main.css index 5273a73d..51e759e5 100755 --- a/main.css +++ b/main.css @@ -811,5 +811,63 @@ dialog { margin-left:3px; } -/* END */ +/* note */ + +.connect_contols { + position:absolute; + left:585px; + top:19px; + height:70px; + width:60px; + } + + + +.connect_b { + float:left; + + } + + + .connect_b a { + height:50px; + width:50px; + border-radius:100px; + box-shadow:0px 1px 2px rgba(0, 0, 0, 0.35); + float:left; + margin-left: 5px; + margin-bottom:7px; + } + + + .connect_b a.connect { +background-color:#e60000; + border:1px solid #fe0000; + background-image:url(images/icons/cf_icon_usb1_white.svg); + background-repeat:no-repeat; + background-size:44px; + background-position:center 6px; + } + + .connect_b a.connect.active { + background-color:#56ac1d; + border:1px solid #5bbb1b; + } + + + .connect_state { + float:left; + height:20px; + width:100%; + text-align:center; + color:#fff; + font-size:12px; + font-family: 'open_sansregular', Arial; + text-shadow:0px 1px rgba(0, 0, 0, 0.25); + + + } + + + \ No newline at end of file diff --git a/main.html b/main.html index e2133ae0..5b2fbf13 100755 --- a/main.html +++ b/main.html @@ -125,14 +125,16 @@ - - +
+
+ +
- +