API updates

This commit is contained in:
Eugene Pankov
2017-11-04 19:06:58 +01:00
parent 89dff969b1
commit c73d39026b
16 changed files with 75 additions and 46 deletions

View File

@@ -3,6 +3,7 @@ import { Component } from '@angular/core'
export declare type ComponentType = new (...args: any[]) => Component
export abstract class SettingsTabProvider {
id: string
title: string
getComponentType (): ComponentType {

View File

@@ -1,7 +1,7 @@
button.btn.btn-outline-warning.btn-block(*ngIf='config.restartRequested', '(click)'='restartApp()') Restart the app to apply changes
ngb-tabset.vertical(type='tabs')
ngb-tab
ngb-tabset.vertical(type='tabs', [activeId]='activeTab')
ngb-tab(id='application')
ng-template(ngbTabTitle)
| Application
ng-template(ngbTabContent)
@@ -164,7 +164,7 @@ ngb-tabset.vertical(type='tabs')
'(ngModelChange)'='config.save()',
)
ngb-tab
ngb-tab(id='hotkeys')
ng-template(ngbTabTitle)
| Hotkeys
ng-template(ngbTabContent)
@@ -184,7 +184,7 @@ ngb-tabset.vertical(type='tabs')
'(modelChange)'='config.save(); docking.dock()'
)
ngb-tab(*ngFor='let provider of settingsProviders')
ngb-tab(*ngFor='let provider of settingsProviders', [id]='provider.id')
ng-template(ngbTabTitle)
| {{provider.title}}
ng-template(ngbTabContent)

View File

@@ -1,4 +1,4 @@
import { Component, Inject } from '@angular/core'
import { Component, Inject, Input } from '@angular/core'
import { ElectronService, DockingService, ConfigService, IHotkeyDescription, HotkeyProvider, BaseTabComponent, Theme, HostAppService } from 'terminus-core'
import { SettingsTabProvider } from '../api'
@@ -12,6 +12,7 @@ import { SettingsTabProvider } from '../api'
],
})
export class SettingsTabComponent extends BaseTabComponent {
@Input() activeTab: string
hotkeyFilter = ''
private hotkeyDescriptions: IHotkeyDescription[]
private screens

View File

@@ -40,3 +40,4 @@ export default class SettingsModule {
}
export * from './api'
export { SettingsTabComponent }