mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Improve update UI
This commit is contained in:
@@ -7,7 +7,7 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'
|
||||
export class ToolbarComponent implements OnInit {
|
||||
|
||||
isMaximized: boolean
|
||||
updateAvailable: boolean | null = false
|
||||
updateAvailable: 'yes' | 'no' | 'error' = 'no'
|
||||
|
||||
constructor(private ref: ChangeDetectorRef) { }
|
||||
|
||||
@@ -23,11 +23,11 @@ export class ToolbarComponent implements OnInit {
|
||||
})
|
||||
|
||||
window.electron.on.updateAvailable(result => {
|
||||
this.updateAvailable = result !== null
|
||||
this.updateAvailable = result !== null ? 'yes' : 'no'
|
||||
this.ref.detectChanges()
|
||||
})
|
||||
window.electron.on.updateError(() => {
|
||||
this.updateAvailable = null
|
||||
this.updateAvailable = 'error'
|
||||
this.ref.detectChanges()
|
||||
})
|
||||
this.updateAvailable = await window.electron.invoke.getUpdateAvailable()
|
||||
|
||||
Reference in New Issue
Block a user