mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 10:35:09 +00:00
Fix auto-updater
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
<div class="navbar p-0 min-h-0 bg-base-100" style="-webkit-app-region: drag">
|
<div class="navbar p-0 min-h-0 bg-base-100" style="-webkit-app-region: drag">
|
||||||
<div style="-webkit-app-region: no-drag">
|
<div style="-webkit-app-region: no-drag">
|
||||||
<button class="btn btn-square btn-ghost rounded-none px-10 cursor-default" routerLinkActive="btn-active" routerLink="/browse">Browse</button>
|
<button class="btn btn-square btn-ghost rounded-none px-11 cursor-default" routerLinkActive="btn-active" routerLink="/browse">Browse</button>
|
||||||
<!-- TODO <a class="btn btn-square btn-ghost rounded-none cursor-default" routerLinkActive="btn-active" routerLink="/library">Library</a> -->
|
<!-- TODO <a class="btn btn-square btn-ghost rounded-none cursor-default" routerLinkActive="btn-active" routerLink="/library">Library</a> -->
|
||||||
<button class="btn btn-square btn-ghost rounded-none px-10 cursor-default" routerLinkActive="btn-active" routerLink="/settings">
|
<button class="btn btn-square btn-ghost rounded-none px-11 cursor-default flex flex-nowrap" routerLinkActive="btn-active" routerLink="/settings">
|
||||||
<i *ngIf="updateAvailable" class="teal small circle icon"></i>
|
<div *ngIf="updateAvailable" class="badge badge-accent badge-xs"></div>
|
||||||
<i *ngIf="updateAvailable === null" class="small yellow exclamation triangle icon"></i>
|
<i *ngIf="updateAvailable === null" class="bi bi-exclamation-triangle-fill text-warning"></i>
|
||||||
Settings
|
Settings
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { UpdateProgress } from '../../src-shared/interfaces/update.interface'
|
|||||||
import { emitIpcEvent } from '../main'
|
import { emitIpcEvent } from '../main'
|
||||||
|
|
||||||
let updateAvailable: boolean | null = false
|
let updateAvailable: boolean | null = false
|
||||||
|
let downloading = false
|
||||||
|
|
||||||
autoUpdater.autoDownload = false
|
autoUpdater.autoDownload = false
|
||||||
autoUpdater.logger = null
|
autoUpdater.logger = null
|
||||||
@@ -49,8 +50,8 @@ export async function getCurrentVersion() {
|
|||||||
* Begins the process of downloading the latest update.
|
* Begins the process of downloading the latest update.
|
||||||
*/
|
*/
|
||||||
export function downloadUpdate() {
|
export function downloadUpdate() {
|
||||||
if (this.downloading) { return }
|
if (downloading) { return }
|
||||||
this.downloading = true
|
downloading = true
|
||||||
|
|
||||||
autoUpdater.on('download-progress', (updateProgress: UpdateProgress) => {
|
autoUpdater.on('download-progress', (updateProgress: UpdateProgress) => {
|
||||||
emitIpcEvent('updateProgress', updateProgress)
|
emitIpcEvent('updateProgress', updateProgress)
|
||||||
|
|||||||
Reference in New Issue
Block a user