Skip to content

Commit

Permalink
change message to english
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro committed Nov 2, 2020
1 parent 05d4048 commit a558693
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const electron = require('electron')
// Module to control application life.
// Module to control application life.
const app = electron.app
// Module to create native browser window.
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow

const path = require('path')
Expand Down Expand Up @@ -31,7 +31,7 @@ function createWindow() {
}))

// Open the DevTools.
// mainWindow.webContents.openDevTools()
mainWindow.webContents.openDevTools()

// Emitted when the window is closed.
mainWindow.on('closed', function() {
Expand All @@ -40,6 +40,11 @@ function createWindow() {
// when you should delete the corresponding element.
mainWindow = null
})

mainWindow.webContents.on('new-window', function(e, url) {
e.preventDefault();
electron.shell.openExternal(url);
});
}

// This method will be called when Electron has finished
Expand Down
6 changes: 3 additions & 3 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ serialport.list((err, ports) => {
document.getElementById('error').textContent = 'No ports discovered'
}

tableHTML = tableify(ports)
tableHTML = tableify(ports, {'class': 'table'})
document.getElementById('ports').innerHTML = tableHTML
})

Expand All @@ -47,7 +47,7 @@ $(document).on('click', '#connect-arduino', function(event) {
});

myArduino.on('open', ()=> {
$('#connect-arduino').html('DESCONECTAR');
$('#connect-arduino').html('DISCONNECT');
$('#connect-arduino').attr('id', 'disconnect-arduino');
$('#com-port').hide();
alert('CONNECTED SUCCESSFULLY');
Expand All @@ -64,7 +64,7 @@ $(document).on('click', '#disconnect-arduino', function(event) {
event.preventDefault();

myArduino.close(function (err) {
$('#disconnect-arduino').html('CONECTAR')
$('#disconnect-arduino').html('CONECT')
$('#disconnect-arduino').attr('id', 'connect-arduino');
$('#com-port').show();
alert('Closing Arduino connection');
Expand Down

0 comments on commit a558693

Please sign in to comment.