mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 14:04:56 +00:00
global profile settings - fixes #4098
This commit is contained in:
@@ -21,6 +21,8 @@ hotkeys:
|
||||
profile:
|
||||
__nonStructural: true
|
||||
profiles: []
|
||||
profileDefaults:
|
||||
__nonStructural: true
|
||||
recentProfiles: []
|
||||
recoverTabs: true
|
||||
enableAnalytics: true
|
||||
|
@@ -179,9 +179,13 @@ export class ProfilesService {
|
||||
return null
|
||||
}
|
||||
|
||||
getConfigProxyForProfile <T extends Profile> (profile: PartialProfile<T>): T {
|
||||
getConfigProxyForProfile <T extends Profile> (profile: PartialProfile<T>, skipUserDefaults = false): T {
|
||||
const provider = this.providerForProfile(profile)
|
||||
const defaults = configMerge(this.profileDefaults, provider?.configDefaults ?? {})
|
||||
const defaults = [
|
||||
this.profileDefaults,
|
||||
provider?.configDefaults ?? {},
|
||||
!provider || skipUserDefaults ? {} : this.config.store.profileDefaults[provider.id] ?? {},
|
||||
].reduce(configMerge, {})
|
||||
return new ConfigProxy(profile, defaults) as unknown as T
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user