mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 05:20:01 +00:00
fix #6694 - correctly save downloaded config
This commit is contained in:
parent
697bbfcfe1
commit
04407b38c8
@ -31,7 +31,7 @@ export class Application {
|
|||||||
this.useBuiltinGraphics()
|
this.useBuiltinGraphics()
|
||||||
this.ptyManager.init(this)
|
this.ptyManager.init(this)
|
||||||
|
|
||||||
ipcMain.on('app:save-config', async (event, config) => {
|
ipcMain.handle('app:save-config', async (event, config) => {
|
||||||
await saveConfig(config)
|
await saveConfig(config)
|
||||||
this.broadcastExcept('host:config-change', event.sender, config)
|
this.broadcastExcept('host:config-change', event.sender, config)
|
||||||
})
|
})
|
||||||
|
@ -58,8 +58,8 @@ export class ElectronHostAppService extends HostAppService {
|
|||||||
this.electron.ipcRenderer.send('app:new-window')
|
this.electron.ipcRenderer.send('app:new-window')
|
||||||
}
|
}
|
||||||
|
|
||||||
saveConfig (data: string): void {
|
async saveConfig (data: string): Promise<void> {
|
||||||
this.electron.ipcRenderer.send('app:save-config', data)
|
await this.electron.ipcRenderer.invoke('app:save-config', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
emitReady (): void {
|
emitReady (): void {
|
||||||
|
@ -109,7 +109,7 @@ export class ElectronPlatformService extends PlatformService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async saveConfig (content: string): Promise<void> {
|
async saveConfig (content: string): Promise<void> {
|
||||||
this.hostApp.saveConfig(content)
|
await this.hostApp.saveConfig(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfigPath (): string|null {
|
getConfigPath (): string|null {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user