mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-27 02:08:34 +00:00
a button to show config file location
This commit is contained in:
@@ -78,9 +78,9 @@ export class ConfigProxy {
|
|||||||
export class ConfigService {
|
export class ConfigService {
|
||||||
store: any
|
store: any
|
||||||
restartRequested: boolean
|
restartRequested: boolean
|
||||||
|
path: string
|
||||||
private changed = new Subject<void>()
|
private changed = new Subject<void>()
|
||||||
private _store: any
|
private _store: any
|
||||||
private path: string
|
|
||||||
private defaults: any
|
private defaults: any
|
||||||
private servicesCache: { [id: string]: Function[] } = null
|
private servicesCache: { [id: string]: Function[] } = null
|
||||||
|
|
||||||
|
@@ -300,10 +300,13 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
|||||||
[(ngModel)]='configDefaults',
|
[(ngModel)]='configDefaults',
|
||||||
readonly
|
readonly
|
||||||
)
|
)
|
||||||
.mt-3
|
.mt-2.mb-2.d-flex
|
||||||
button.btn.btn-primary((click)='saveConfigFile()', *ngIf='isConfigFileValid()')
|
button.btn.btn-primary((click)='saveConfigFile()', *ngIf='isConfigFileValid()')
|
||||||
i.fas.fa-check.mr-2
|
i.fas.fa-check.mr-2
|
||||||
| Save and apply
|
| Save and apply
|
||||||
button.btn.btn-primary(disabled, *ngIf='!isConfigFileValid()')
|
button.btn.btn-primary(disabled, *ngIf='!isConfigFileValid()')
|
||||||
i.fas.fa-exclamation-triangle.mr-2
|
i.fas.fa-exclamation-triangle.mr-2
|
||||||
| Invalid syntax
|
| 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 () {
|
isConfigFileValid () {
|
||||||
try {
|
try {
|
||||||
yaml.safeLoad(this.configFile)
|
yaml.safeLoad(this.configFile)
|
||||||
|
Reference in New Issue
Block a user