oxen-io / session-desktop

Session Desktop - Onion routing based messenger
https://getsession.org
GNU General Public License v3.0
1.56k stars 194 forks source link

Add Update Download Status to UI #1356

Open crypto-ali opened 4 years ago

crypto-ali commented 4 years ago

I just updated to v1.3.1 on Mac via the "update available" prompt when I started Session. After clicking the button to download the update, the update was downloaded in the background. I wasn't sure for a minute if it was working or not since there was no notice on the UI.

I think it could be a nice enhancement just to add a small alert/notice to the UI to let the user know that an update is in the process of downloading.

Bilb commented 1 year ago

Looks electron-updater allows us to do that https://github.com/iffy/electron-updater-example/blob/99a4313d9eacf7326c412ed00597901ef1a50aac/main.js#L87-L92

But that will be a fair bit of code to get it working (we need to keep the dialog opened to display the status I suppose, or display it in the app somewhere else?)

Bilb commented 1 year ago

Also, not sure if our eletron-updater version is recent enough to have that change. We might need to upgrade it

VityaSchel commented 6 months ago

I think the best place to display update downloading indicator is in left actions panel near connection status.

image

Not only this displays progress of download, but also allows you to easily cancel downloading and restart when you're ready:

I couldn't come up with decent enough design to replace update prompt dialog. Maybe something like icon button with download icon and notification badge?

I used radial-gradient(farthest-side) and mask-composite hack to draw pie-like circle with inset with pure CSS. Then I placed SessionIconButton for interactions and created my own StyledTooltip component which renders in portal to #root

I haven't figured out a way to dispatch redux state in main window from ts/updater/common.ts context yet, so this is purely a design concept.

VityaSchel commented 6 months ago

I haven't figured out a way to dispatch redux state in main window from ts/updater/common.ts context yet, so this is purely a design concept.

I used ipcRenderer and webContents.send communication from electron's API, so now this is a working concept: #3089