mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 09:27:24 +00:00
a button to show config file location
This commit is contained in:
parent
59d1a2fc23
commit
db54f4af13
3 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -100,6 +100,10 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||
}
|
||||
}
|
||||
|
||||
showConfigFile () {
|
||||
this.electron.shell.showItemInFolder(this.config.path)
|
||||
}
|
||||
|
||||
isConfigFileValid () {
|
||||
try {
|
||||
yaml.safeLoad(this.configFile)
|
||||
|
|
Loading…
Reference in a new issue