alteração da rota para o pusher e portas de comunicação
This commit is contained in:
parent
97b4d2c90e
commit
8280bb2ff6
|
|
@ -1,17 +1,19 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="Content-Security-Policy" content="
|
<meta http-equiv="Content-Security-Policy" content="
|
||||||
default-src 'self';
|
default-src 'self';
|
||||||
script-src 'self' 'unsafe-inline';
|
script-src 'self' 'unsafe-inline';
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
connect-src 'self' ws://autoatend.linco.work:6001 ws://localhost:6001;
|
connect-src 'self' ws://autoatend.linco.work:6001 ws://localhost:6001 wss://aa.linco.work:443;
|
||||||
">
|
">
|
||||||
<title>Tela de Atendimento</title>
|
<title>Tela de Atendimento</title>
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<script src="res/js/jquery/jquery.js"></script>
|
<script src="res/js/jquery/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="list-view">
|
<div id="list-view">
|
||||||
<h1>Fila</h1>
|
<h1>Fila</h1>
|
||||||
|
|
@ -47,4 +49,5 @@
|
||||||
<script src="renderer.js"></script>
|
<script src="renderer.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
132
main.js
132
main.js
|
|
@ -4,7 +4,7 @@ const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const { autoUpdater, AppUpdater } = require('electron-updater');
|
const { autoUpdater, AppUpdater } = require('electron-updater');
|
||||||
const pjson = require(path.join(__dirname,'','package.json'));
|
const pjson = require(path.join(__dirname, '', 'package.json'));
|
||||||
|
|
||||||
let floatingWin;
|
let floatingWin;
|
||||||
let mainWin;
|
let mainWin;
|
||||||
|
|
@ -16,7 +16,7 @@ const dataPath = path.join(__dirname, 'data.json'); // Caminho para o JSON (back
|
||||||
const apiUrl = 'https://autoatend.linco.work/api/v1/';
|
const apiUrl = 'https://autoatend.linco.work/api/v1/';
|
||||||
// const apiUrl = 'http://_lara10-autoatend.devel/api/v1/';
|
// const apiUrl = 'http://_lara10-autoatend.devel/api/v1/';
|
||||||
|
|
||||||
const pusherUrl = 'autoatend.linco.work';
|
const pusherUrl = 'aa.linco.work';
|
||||||
// const pusherUrl = 'localhost';
|
// const pusherUrl = 'localhost';
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,18 +54,18 @@ async function fetchDataFromAPI() {
|
||||||
getFirstData();
|
getFirstData();
|
||||||
|
|
||||||
//! as outras é o websockt que solicita a chamada de requisições em busca de alterações
|
//! as outras é o websockt que solicita a chamada de requisições em busca de alterações
|
||||||
const updData = setInterval(()=>{
|
const updData = setInterval(() => {
|
||||||
getDataAndUpdateFloatingBtn();
|
getDataAndUpdateFloatingBtn();
|
||||||
},3000);
|
}, 3000);
|
||||||
|
|
||||||
const updVersion = setTimeout(()=>{
|
const updVersion = setTimeout(() => {
|
||||||
if(pjson.isBuildNow){
|
if (pjson.isBuildNow) {
|
||||||
autoUpdater.checkForUpdates();
|
autoUpdater.checkForUpdates();
|
||||||
}
|
}
|
||||||
},300000);
|
}, 300000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getFirstData(){
|
async function getFirstData() {
|
||||||
|
|
||||||
const token = await getAuthToken();
|
const token = await getAuthToken();
|
||||||
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
||||||
|
|
@ -117,7 +117,7 @@ async function getFirstData(){
|
||||||
}
|
}
|
||||||
|
|
||||||
// Função para coletar a lista de atendimentos do servidor, vai ser chamada uma vez e a cada 30s
|
// Função para coletar a lista de atendimentos do servidor, vai ser chamada uma vez e a cada 30s
|
||||||
async function getDataAndUpdateFloatingBtn (){
|
async function getDataAndUpdateFloatingBtn() {
|
||||||
|
|
||||||
const proximos = JSON.parse(await floatingWin.webContents.executeJavaScript("localStorage.getItem('proximos')")) ?? [];
|
const proximos = JSON.parse(await floatingWin.webContents.executeJavaScript("localStorage.getItem('proximos')")) ?? [];
|
||||||
let count = proximos.length;
|
let count = proximos.length;
|
||||||
|
|
@ -256,7 +256,7 @@ function createFloatingWindow() {
|
||||||
|
|
||||||
floatingWin.loadFile('floating.html');
|
floatingWin.loadFile('floating.html');
|
||||||
|
|
||||||
floatingWin.webContents.executeJavaScript('localStorage.setItem("version","'+app.getVersion()+'")');
|
floatingWin.webContents.executeJavaScript('localStorage.setItem("version","' + app.getVersion() + '")');
|
||||||
|
|
||||||
// Envia a contagem inicial para a janela flutuante
|
// Envia a contagem inicial para a janela flutuante
|
||||||
const data = readData();
|
const data = readData();
|
||||||
|
|
@ -307,39 +307,39 @@ function createMainWindow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(pjson.isBuildNow){
|
if (pjson.isBuildNow) {
|
||||||
autoUpdater.on('update-available', () => {
|
autoUpdater.on('update-available', () => {
|
||||||
let pth = autoUpdater.downloadUpdate();
|
let pth = autoUpdater.downloadUpdate();
|
||||||
updateWin.show(); updateWin.focus();
|
updateWin.show(); updateWin.focus();
|
||||||
updateWin.webContents.send('update_message',`Uma nova versão está dispinível.`);
|
updateWin.webContents.send('update_message', `Uma nova versão está dispinível.`);
|
||||||
updateWin.webContents.send('update_percent',pth);
|
updateWin.webContents.send('update_percent', pth);
|
||||||
})
|
})
|
||||||
autoUpdater.on('download-progress',(obj) => {
|
autoUpdater.on('download-progress', (obj) => {
|
||||||
updateWin.webContents.send('update_message',`Estamos baixando uma nova atualização.`);
|
updateWin.webContents.send('update_message', `Estamos baixando uma nova atualização.`);
|
||||||
});
|
});
|
||||||
autoUpdater.on('update-downloaded',(obj) => {
|
autoUpdater.on('update-downloaded', (obj) => {
|
||||||
updateWin.webContents.send('update_message',`Download concluído. Aguarde, vamos reiniciar para instalar!`);
|
updateWin.webContents.send('update_message', `Download concluído. Aguarde, vamos reiniciar para instalar!`);
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
},5000);
|
}, 5000);
|
||||||
});
|
});
|
||||||
autoUpdater.on('error',err => {
|
autoUpdater.on('error', err => {
|
||||||
updateWin.webContents.send('update_message',err);
|
updateWin.webContents.send('update_message', err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!gotTheLock) {
|
if (!gotTheLock) {
|
||||||
app.quit();
|
app.quit();
|
||||||
} else {
|
} else {
|
||||||
app.on('second-instance', () => {
|
app.on('second-instance', () => {
|
||||||
if (mainWin) {
|
if (mainWin) {
|
||||||
if (mainWin.isMinimized()) {
|
if (mainWin.isMinimized()) {
|
||||||
mainWin.restore();
|
mainWin.restore();
|
||||||
}
|
}
|
||||||
mainWin.focus();
|
mainWin.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Inicialização do aplicativo modificada para verificar autenticação
|
// Inicialização do aplicativo modificada para verificar autenticação
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
|
|
@ -377,7 +377,7 @@ if (!gotTheLock) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(pjson.isBuildNow){
|
if (pjson.isBuildNow) {
|
||||||
autoUpdater.checkForUpdates();
|
autoUpdater.checkForUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -436,18 +436,18 @@ ipcMain.handle('get-pusher-config', async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on('update_version', async (event, arg) => {
|
ipcMain.on('update_version', async (event, arg) => {
|
||||||
if(updateWin){
|
if (updateWin) {
|
||||||
if(!updateWin.isVisible()){
|
if (!updateWin.isVisible()) {
|
||||||
updateWin.show();
|
updateWin.show();
|
||||||
updateWin.focus();
|
updateWin.focus();
|
||||||
}else{
|
} else {
|
||||||
updateWin.focus();
|
updateWin.focus();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
createUpdateWindow();
|
createUpdateWindow();
|
||||||
updateWin.webContents.on('did-finish-load', () => {
|
updateWin.webContents.on('did-finish-load', () => {
|
||||||
updateWin.show();
|
updateWin.show();
|
||||||
updateWin.focus();
|
updateWin.focus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -484,14 +484,14 @@ ipcMain.on('chamar-fila', async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestData = async () =>{
|
const requestData = async () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const colabId = await getSelectedOperatorId();
|
const colabId = await getSelectedOperatorId();
|
||||||
const token = await getAuthToken('token');
|
const token = await getAuthToken('token');
|
||||||
const url = apiUrl + 'chama-fila-app-colab/'+colabId; // URL de exemplo para enviar a solicitação
|
const url = apiUrl + 'chama-fila-app-colab/' + colabId; // URL de exemplo para enviar a solicitação
|
||||||
|
|
||||||
const request = net.request({
|
const request = net.request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
@ -515,24 +515,24 @@ ipcMain.on('chamar-fila', async () => {
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
mainWin.webContents.send('select-atend-id', parsedData.data);
|
mainWin.webContents.send('select-atend-id', parsedData.data);
|
||||||
if (parsedData.data && (parsedData.data.Status === 'Fila' || parsedData.data.Status === 'Chamado')) { showMainWindow(); } else
|
if (parsedData.data && (parsedData.data.Status === 'Fila' || parsedData.data.Status === 'Chamado')) { showMainWindow(); } else
|
||||||
if(parsedData.data && parsedData.data.Status === 'Atendendo'){
|
if (parsedData.data && parsedData.data.Status === 'Atendendo') {
|
||||||
let options2 = {
|
let options2 = {
|
||||||
'title': 'Precisa finalizar antes de chamar o próximo.',
|
'title': 'Precisa finalizar antes de chamar o próximo.',
|
||||||
'message': 'Em andamento',
|
'message': 'Em andamento',
|
||||||
'detail': 'Já possui um atendimento em andamento (Atendendo: '+ parsedData.data.clientName +'), continue e finalize por favor!',
|
'detail': 'Já possui um atendimento em andamento (Atendendo: ' + parsedData.data.clientName + '), continue e finalize por favor!',
|
||||||
'type': 'error',
|
'type': 'error',
|
||||||
'noLink': true,
|
'noLink': true,
|
||||||
'buttons': ['Depois','Continuar'],
|
'buttons': ['Depois', 'Continuar'],
|
||||||
};
|
|
||||||
dialog.showMessageBox(floatingWin, options2).then(result => {
|
|
||||||
if(result.response){
|
|
||||||
mainWin.webContents.send('show-observation');
|
|
||||||
showMainWindow();
|
|
||||||
} else {
|
|
||||||
mainWin.hide();
|
|
||||||
};
|
};
|
||||||
});
|
dialog.showMessageBox(floatingWin, options2).then(result => {
|
||||||
}
|
if (result.response) {
|
||||||
|
mainWin.webContents.send('show-observation');
|
||||||
|
showMainWindow();
|
||||||
|
} else {
|
||||||
|
mainWin.hide();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
// console.log(parsedData);
|
// console.log(parsedData);
|
||||||
} else {
|
} else {
|
||||||
console.error(`Erro na requisição: Status code ${response.statusCode}`, parsedData);
|
console.error(`Erro na requisição: Status code ${response.statusCode}`, parsedData);
|
||||||
|
|
@ -567,13 +567,13 @@ ipcMain.on('chamar-fila', async () => {
|
||||||
'message': 'Chamar um cliente da fila?',
|
'message': 'Chamar um cliente da fila?',
|
||||||
'type': 'warning',
|
'type': 'warning',
|
||||||
'noLink': true,
|
'noLink': true,
|
||||||
'buttons': ['Não','Sim'],
|
'buttons': ['Não', 'Sim'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(await countFila()){
|
if (await countFila()) {
|
||||||
dialog.showMessageBox(floatingWin, options).then(result => {
|
dialog.showMessageBox(floatingWin, options).then(result => {
|
||||||
if(result.response){
|
if (result.response) {
|
||||||
requestData();
|
requestData();
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -583,7 +583,7 @@ ipcMain.on('chamar-fila', async () => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on('select-atend-id',(itemId)=>{
|
ipcMain.on('select-atend-id', (itemId) => {
|
||||||
selectedItemId = itemId;
|
selectedItemId = itemId;
|
||||||
console.log(selectedItemId);
|
console.log(selectedItemId);
|
||||||
});
|
});
|
||||||
|
|
@ -595,9 +595,9 @@ ipcMain.on('iniciar-atendimento', async (event, itemId) => {
|
||||||
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
||||||
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
||||||
|
|
||||||
const url = apiUrl + 'iniciar-atendimento/'+itemId; // URL de exemplo para enviar a solicitação
|
const url = apiUrl + 'iniciar-atendimento/' + itemId; // URL para enviar a solicitação
|
||||||
|
|
||||||
// Simula o envio de uma solicitação POST com o ID do item
|
// envio de uma solicitação POST com o ID do item
|
||||||
const request = net.request({
|
const request = net.request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: url,
|
url: url,
|
||||||
|
|
@ -643,7 +643,7 @@ ipcMain.on('save-observation', async (event, { itemId, observation }) => {
|
||||||
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
||||||
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
||||||
|
|
||||||
const url = apiUrl + 'finalizar-atendimento/'+itemId; // URL de exemplo para enviar a solicitação
|
const url = apiUrl + 'finalizar-atendimento/' + itemId; // URL de exemplo para enviar a solicitação
|
||||||
|
|
||||||
const fmData = JSON.stringify({
|
const fmData = JSON.stringify({
|
||||||
"colabId": colabId,
|
"colabId": colabId,
|
||||||
|
|
@ -699,7 +699,7 @@ ipcMain.on('drag-float-window', (event, { offsetX, offsetY }) => {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
ipcMain.on('logout', ()=>{
|
ipcMain.on('logout', () => {
|
||||||
mainWin.webContents.executeJavaScript(`
|
mainWin.webContents.executeJavaScript(`
|
||||||
localStorage.removeItem("idOperator");
|
localStorage.removeItem("idOperator");
|
||||||
localStorage.removeItem("selectedOperator");
|
localStorage.removeItem("selectedOperator");
|
||||||
|
|
@ -866,7 +866,7 @@ ipcMain.handle('get-operators', async () => {
|
||||||
operators: operators
|
operators: operators
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reject({
|
reject({
|
||||||
success: false,
|
success: false,
|
||||||
message: data.message || 'Erro ao obter a lista de colaboradores',
|
message: data.message || 'Erro ao obter a lista de colaboradores',
|
||||||
operators: []
|
operators: []
|
||||||
|
|
@ -874,7 +874,7 @@ ipcMain.handle('get-operators', async () => {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Erro ao processar resposta da API:", error);
|
console.log("Erro ao processar resposta da API:", error);
|
||||||
reject({
|
reject({
|
||||||
success: false,
|
success: false,
|
||||||
message: 'Erro ao processar resposta do servidor',
|
message: 'Erro ao processar resposta do servidor',
|
||||||
operators: []
|
operators: []
|
||||||
|
|
@ -927,7 +927,7 @@ ipcMain.on('token-exists', async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
ipcMain.on('sair', ()=>{
|
ipcMain.on('sair', () => {
|
||||||
let exec = `
|
let exec = `
|
||||||
localStorage.removeItem("idOperator");
|
localStorage.removeItem("idOperator");
|
||||||
localStorage.removeItem("selectedOperator");
|
localStorage.removeItem("selectedOperator");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "autoatendcolab",
|
"name": "autoatendcolab",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"isBuildNow": true,
|
"isBuildNow": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
30
renderer.js
30
renderer.js
|
|
@ -18,7 +18,7 @@ let selectedItemName = '';
|
||||||
|
|
||||||
window.electronAPI.onLoadData((data) => {
|
window.electronAPI.onLoadData((data) => {
|
||||||
nextButton.disabled = true;
|
nextButton.disabled = true;
|
||||||
if(!data){
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Reseta a view para a lista sempre que os dados são carregados
|
// Reseta a view para a lista sempre que os dados são carregados
|
||||||
|
|
@ -44,11 +44,11 @@ async function initializePusher() {
|
||||||
|
|
||||||
var pusher = new Pusher(PUSHER_APP_KEY, {
|
var pusher = new Pusher(PUSHER_APP_KEY, {
|
||||||
wsHost: host,
|
wsHost: host,
|
||||||
wsPort: 6001,
|
wsPort: 80,
|
||||||
wssPort: 6001,
|
wssPort: 443,
|
||||||
forceTLS: false,
|
forceTLS: true,
|
||||||
enableStats: false,
|
enableStats: false,
|
||||||
enabledTransports: ['ws','wss'],
|
enabledTransports: ['wss', 'ws'],
|
||||||
cluster: 'mt1'
|
cluster: 'mt1'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -59,17 +59,17 @@ async function initializePusher() {
|
||||||
|
|
||||||
channel = pusher.subscribe('chat.' + channelLocal + '_' + colabId);
|
channel = pusher.subscribe('chat.' + channelLocal + '_' + colabId);
|
||||||
|
|
||||||
channel.bind('message-sent', function(r) {
|
channel.bind('message-sent', function (r) {
|
||||||
let data = r.data.fila.original;
|
let data = r.data.fila.original;
|
||||||
let count = data.length;
|
let count = data.length;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
localStorage.setItem('proximos',JSON.stringify(data));
|
localStorage.setItem('proximos', JSON.stringify(data));
|
||||||
|
|
||||||
populateList(r.data.currentData.original);
|
populateList(r.data.currentData.original);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
pusher.connection.bind('error', function(err) {
|
pusher.connection.bind('error', function (err) {
|
||||||
console.error('Pusher connection error: ', err);
|
console.error('Pusher connection error: ', err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -82,9 +82,9 @@ async function initializePusher() {
|
||||||
initializePusher();
|
initializePusher();
|
||||||
|
|
||||||
//chama o proximo da fila ao abrir a janela de atendimentos
|
//chama o proximo da fila ao abrir a janela de atendimentos
|
||||||
window.electronAPI.selectAtendID((data)=>{
|
window.electronAPI.selectAtendID((data) => {
|
||||||
nextButton.disabled = true;
|
nextButton.disabled = true;
|
||||||
if(!data){
|
if (!data) {
|
||||||
queueNumber.innerHTML = 'Ninguem aguardando atendimento, fechando a janela em alguns segundos...';
|
queueNumber.innerHTML = 'Ninguem aguardando atendimento, fechando a janela em alguns segundos...';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@ window.electronAPI.selectAtendID((data)=>{
|
||||||
selectedItemNameSpan.innerHTML = data ? `<u> ${data.clientName.toUpperCase()} </u> <i style="float:right;">[ ${data.senhaGen} ]</i>` : 'Ninguem aguardando atendimento';
|
selectedItemNameSpan.innerHTML = data ? `<u> ${data.clientName.toUpperCase()} </u> <i style="float:right;">[ ${data.senhaGen} ]</i>` : 'Ninguem aguardando atendimento';
|
||||||
});
|
});
|
||||||
|
|
||||||
window.electronAPI.showObservation(()=>{
|
window.electronAPI.showObservation(() => {
|
||||||
window.electronAPI.iniciaAtendimento(selectedItemId);
|
window.electronAPI.iniciaAtendimento(selectedItemId);
|
||||||
showObservationView(); // Muda para a tela de observação
|
showObservationView(); // Muda para a tela de observação
|
||||||
});
|
});
|
||||||
|
|
@ -110,9 +110,9 @@ function populateList(currentData) {
|
||||||
const proximos = JSON.parse(datastorage);
|
const proximos = JSON.parse(datastorage);
|
||||||
itemList.innerHTML = '';
|
itemList.innerHTML = '';
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
nextButton.disabled = !currentData;
|
nextButton.disabled = !currentData;
|
||||||
},5000);
|
}, 5000);
|
||||||
|
|
||||||
// Seleciona o primeiro item por padrão (ou o próximo disponível)
|
// Seleciona o primeiro item por padrão (ou o próximo disponível)
|
||||||
// Aqui, vamos apenas pegar o primeiro da lista atual
|
// Aqui, vamos apenas pegar o primeiro da lista atual
|
||||||
|
|
@ -172,7 +172,7 @@ nextButton.addEventListener('click', () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logoutButton.addEventListener('click',()=>{
|
logoutButton.addEventListener('click', () => {
|
||||||
window.electronAPI.logoutApp();
|
window.electronAPI.logoutApp();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue