This commit is contained in:
Eugene Pankov
2021-07-07 21:33:26 +02:00
parent 4534eefc1d
commit a159890cba
12 changed files with 40 additions and 34 deletions

View File

@@ -453,7 +453,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
async splitTab (tab: BaseTabComponent, dir: SplitDirection): Promise<BaseTabComponent|null> {
const newTab = await this.tabsService.duplicate(tab)
if (newTab) {
this.addTab(newTab, tab, dir)
await this.addTab(newTab, tab, dir)
}
return newTab
}

View File

@@ -21,13 +21,13 @@ export class WelcomeTabComponent extends BaseTabComponent {
this.setTitle('Welcome')
}
closeAndDisable () {
async closeAndDisable () {
this.config.store.enableWelcomeTab = false
this.config.store.pluginBlacklist = []
if (!this.enableGlobalHotkey) {
this.config.store.hotkeys['toggle-window'] = []
}
this.config.save()
await this.config.save()
this.hostWindow.reload()
}
}

View File

@@ -88,7 +88,7 @@ export class ConfigProxy {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-empty-function
setValue (_key: string, _value: any) { }
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-empty-function
getDefault (_key: string) { }
getDefault (_key: string): any { }
}
@Injectable({ providedIn: 'root' })
@@ -195,10 +195,10 @@ export class ConfigService {
/**
* Writes config YAML as string
*/
writeRaw (data: string): void {
async writeRaw (data: string): Promise<void> {
this._store = yaml.load(data)
this.save()
this.load()
await this.save()
await this.load()
this.emitChange()
}

View File

@@ -46,10 +46,9 @@ export class HotkeysService {
}
})
})
this.config.ready$.toPromise().then(() => {
this.getHotkeyDescriptions().then(hotkeys => {
this.hotkeyDescriptions = hotkeys
})
this.config.ready$.toPromise().then(async () => {
const hotkeys = await this.getHotkeyDescriptions()
this.hotkeyDescriptions = hotkeys
})
// deprecated

View File

@@ -270,7 +270,7 @@ export class VaultFileProvider extends FileProvider {
}
const transfer = transfers[0]
const id = (await wrapPromise(this.zone, promisify(crypto.randomBytes)(32))).toString('hex')
this.vault.addSecret({
await this.vault.addSecret({
type: VAULT_SECRET_TYPE_FILE,
key: {
id,