1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-24 19:13:31 +03:00

a button to show config file location

This commit is contained in:
Eugene Pankov 2019-02-13 22:58:47 +01:00
parent 59d1a2fc23
commit db54f4af13
3 changed files with 9 additions and 2 deletions

View File

@ -78,9 +78,9 @@ export class ConfigProxy {
export class ConfigService {
store: any
restartRequested: boolean
path: string
private changed = new Subject<void>()
private _store: any
private path: string
private defaults: any
private servicesCache: { [id: string]: Function[] } = null

View File

@ -300,10 +300,13 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
[(ngModel)]='configDefaults',
readonly
)
.mt-3
.mt-2.mb-2.d-flex
button.btn.btn-primary((click)='saveConfigFile()', *ngIf='isConfigFileValid()')
i.fas.fa-check.mr-2
| Save and apply
button.btn.btn-primary(disabled, *ngIf='!isConfigFileValid()')
i.fas.fa-exclamation-triangle.mr-2
| Invalid syntax
button.btn.btn-secondary.ml-auto((click)='showConfigFile()')
i.fas.fa-external-link-square-alt.mr-2
| Show config file

View File

@ -100,6 +100,10 @@ export class SettingsTabComponent extends BaseTabComponent {
}
}
showConfigFile () {
this.electron.shell.showItemInFolder(this.config.path)
}
isConfigFileValid () {
try {
yaml.safeLoad(this.configFile)