rafaelaroca / bipes_serial

BIPES Project - Serial / Web Serial API
2 stars 3 forks source link

Notification panel, new UI and JSON style for devices. #2

Closed gastmaier closed 3 years ago

gastmaier commented 3 years ago

Adds BIPES object to structure UI elements and actions.

New file ui.js that includes: workspace to handle devices, all data from changeDevice has been imported from the JavaScript DOM style to the JSON style. notify to enable notifications interface, for example, BIPES ['notify'].send(MSG['invalidDevice']); sends a notification. language to handle the language popup switcher. xhrGET to get files through XHR.

ui.js functions are initialized at index.html with BIPES['workspace'] = new workspace (), making it easy to disable them if needed.

Removes loadFileToElement from ui/index.html (replaced with xhrGET function (more generic)). Removes changeDevice from ui/index.html (replaced with workspace function).

New icons (icons.svg file, sprite vectors) have been included, many HTML tags have been replaced in ui/index.html and styling added to ui/style.css (top menu redesign).

Language strings added to ui/msg/en.js, ui/msg/pt-br.js and ui/msg/es.js: notificationTooltip, ErrorGET, invalidDevice, languageTooltip, noToolbox, networkTooltip, serialTooltip.

Replaces bipes.png with new screenshot.