mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
37 lines
838 B
JavaScript
37 lines
838 B
JavaScript
|
|
||
|
const { ipcRenderer } = require('electron');
|
||
|
|
||
|
|
||
|
|
||
|
window.addEventListener('DOMContentLoaded', () => {
|
||
|
const replaceText = (selector, text) => {
|
||
|
const element = document.getElementById(selector)
|
||
|
if (element) element.innerText = text
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
document.getElementById("startTransmission").addEventListener("click", () => {
|
||
|
alert("HALLO ")
|
||
|
})
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
})
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
ipcRenderer.on('action-update-tnc-state', (event, arg) => {
|
||
|
|
||
|
|
||
|
|
||
|
if(arg.ptt_state == 'True'){
|
||
|
document.getElementById("ptt_state").className = "btn btn-danger";
|
||
|
} else if(arg.ptt_state == 'False'){
|
||
|
document.getElementById("ptt_state").className = "btn btn-success";
|
||
|
} else {
|
||
|
document.getElementById("ptt_state").className = "btn btn-secondary"
|
||
|
}
|
||
|
});
|