mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 14:34:54 +00:00
@@ -39,6 +39,13 @@ title-bar(
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
*ngIf='appUpdate',
|
||||
title='Update available',
|
||||
(click)='updateApp()',
|
||||
)
|
||||
i.fa.fa-arrow-up.text-info
|
||||
span.text-info Update
|
||||
|
||||
window-controls(
|
||||
*ngIf='config.store.appearance.frame == "thin" && (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
|
||||
|
@@ -10,6 +10,7 @@ import { ConfigService } from '../services/config.service'
|
||||
import { DockingService } from '../services/docking.service'
|
||||
import { TabRecoveryService } from '../services/tabRecovery.service'
|
||||
import { ThemesService } from '../services/themes.service'
|
||||
import { UpdaterService, Update } from '../services/updater.service'
|
||||
|
||||
import { SafeModeModalComponent } from './safeModeModal.component'
|
||||
import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
@@ -53,12 +54,14 @@ export class AppRootComponent {
|
||||
@Input() leftToolbarButtons: IToolbarButton[]
|
||||
@Input() rightToolbarButtons: IToolbarButton[]
|
||||
private logger: Logger
|
||||
private appUpdate: Update
|
||||
|
||||
constructor (
|
||||
private docking: DockingService,
|
||||
private electron: ElectronService,
|
||||
private tabRecovery: TabRecoveryService,
|
||||
private hotkeys: HotkeysService,
|
||||
private updater: UpdaterService,
|
||||
public hostApp: HostAppService,
|
||||
public config: ConfigService,
|
||||
public app: AppService,
|
||||
@@ -111,6 +114,10 @@ export class AppRootComponent {
|
||||
if (window['safeModeReason']) {
|
||||
ngbModal.open(SafeModeModalComponent)
|
||||
}
|
||||
|
||||
this.updater.check().then(update => {
|
||||
this.appUpdate = update
|
||||
})
|
||||
}
|
||||
|
||||
onGlobalHotkey () {
|
||||
@@ -155,6 +162,10 @@ export class AppRootComponent {
|
||||
return false
|
||||
}
|
||||
|
||||
updateApp () {
|
||||
this.electron.shell.openExternal(this.appUpdate.url)
|
||||
}
|
||||
|
||||
private getToolbarButtons (aboveZero: boolean): IToolbarButton[] {
|
||||
let buttons: IToolbarButton[] = []
|
||||
this.toolbarButtonProviders.forEach((provider) => {
|
||||
|
Reference in New Issue
Block a user