in Education by
I'm developing my app with electron and I'm using electron-updater to show a window that asks to the user if he wants download a new app version or not. I've tried to show in a window a progress bar during the downloading like this. I've tried to use progress-bar but if I install it, the electron-updater stop working. Now I can see the progress only in dev mode into the electron shell. autoUpdater.on('download-progress', (progressObj) => { let log_message = "Scaricamento aggiornamenti in corso... \n"; log_message = log_message + "Velocita\' scaricamento: " + progressObj.bytesPerSecond; log_message = log_message + ' - Scaricati ' + progressObj.percent + '%'; log_message = log_message + ' (' + progressObj.transferred + "/" + progressObj.total + ')'; log.log('info', log_message); }) Thank you in advance JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
(I'm not 100% clear on what you are asking and i don't have enough reputation to add a comment...so i'll do my best) I assume that autoUpdater is in the main process, not in a renderer. So, the first thing you need to do is get the data from the progress update to the correct renderer. You can do this using electron's ipcMain and ipcRenderer modules. Once you have the data in the renderer process you need to get it to the progress bar. If you are using redux, you can call your store's dispatch(), passing a downloadProgress action to it. In my app, which uses redux, I create a DownloadProgress action in the main process and send it over IPC to the renderer. I'd recommend doing the same since you'll probably want to pass DownloadCancelled and DownloadComplete actions too. If this is not helpful, please clarify the following: please add the code that doesn't work your question -- this would help understand more precisely what you are trying to do is autoUpdate running in the main process, or in a renderer which progress bar implementation you are using (an npm package?) and how will you send data to it (directly or through a store?)

Related questions

0 votes
    I have a couple of MySQL queries that take a really long time and I'd like to display a progress ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    I have a couple of MySQL queries that take a really long time and I'd like to display a progress ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    I am trying to add an if condition; Idea is If I enter the input as print or text with 4 in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I am trying to add an if condition; Idea is If I enter the input as print or text with 4 in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    What I'm trying to do here is use the 2 functions but I don't know how to use both of them ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I am trying to add an if condition; Idea is If I enter the input as print or text with 4 in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    What I'm trying to do here is use the 2 functions but I don't know how to use both of them ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I'm used to v3 node botbuilder sdk so I have a middleware where I look at the dialog stack and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I'm trying to make a form-maker with Node.Js and MongoDB but confused about the data structure. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    The napi_create_date function appeared in Node.js starting with 11.11.0 version. https://nodejs.org/api/n- ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I have working (stock) script from node var cluster = require('cluster'); var http = require(' ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 13, 2022 in Education by JackTerrance
0 votes
    so i'm reviewing and practicing making rest api with node mongoose and express. I'm having problem making ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    I'm trying to debug my nodejs app using node-inspector. But Google Chrome doesn't show the code. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 11, 2022 in Education by JackTerrance
0 votes
    Step 1: server I've created a simple server with Node & Socket.io which declares a namespace under ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
...