mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 14:34:54 +00:00
experimental config sync
This commit is contained in:
@@ -31,3 +31,4 @@ enableAutomaticUpdates: true
|
||||
version: 1
|
||||
vault: null
|
||||
encrypted: false
|
||||
enableExperimentalFeatures: false
|
||||
|
@@ -136,9 +136,11 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
||||
profilesService: ProfilesService,
|
||||
) {
|
||||
app.ready$.subscribe(() => {
|
||||
if (config.store.enableWelcomeTab) {
|
||||
app.openNewTabRaw({ type: WelcomeTabComponent })
|
||||
}
|
||||
config.ready$.toPromise().then(() => {
|
||||
if (config.store.enableWelcomeTab) {
|
||||
app.openNewTabRaw({ type: WelcomeTabComponent })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
platform.setErrorHandler(err => {
|
||||
|
@@ -194,7 +194,6 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
async save (): Promise<void> {
|
||||
this.store.__cleanup()
|
||||
// Scrub undefined values
|
||||
let cleanStore = JSON.parse(JSON.stringify(this._store))
|
||||
cleanStore = await this.maybeEncryptConfig(cleanStore)
|
||||
@@ -238,7 +237,7 @@ export class ConfigService {
|
||||
const module = imp.ngModule || imp
|
||||
if (module.ɵinj?.providers) {
|
||||
this.servicesCache[module.pluginName] = module.ɵinj.providers.map(provider => {
|
||||
return provider.useClass || provider
|
||||
return provider.useClass ?? provider.useExisting ?? provider
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -382,10 +381,12 @@ export class ConfigService {
|
||||
}
|
||||
delete decryptedVault.config.vault
|
||||
delete decryptedVault.config.encrypted
|
||||
delete decryptedVault.config.configSync
|
||||
return {
|
||||
...decryptedVault.config,
|
||||
vault: store.vault,
|
||||
encrypted: store.encrypted,
|
||||
configSync: store.configSync,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,9 +401,11 @@ export class ConfigService {
|
||||
vault.config = { ...store }
|
||||
delete vault.config.vault
|
||||
delete vault.config.encrypted
|
||||
delete vault.config.configSync
|
||||
return {
|
||||
vault: await this.vault.encrypt(vault),
|
||||
encrypted: true,
|
||||
configSync: store.configSync,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user