fix: fixed tiling window manager and password input handling issues
This commit is contained in:
parent
9a63169a73
commit
6a35c0e3d8
@ -1,5 +1,5 @@
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import { isTilingWindowManager } from '@main/utils/is-tiling-window-manager'
|
||||
import { isTilingWindowManager } from '@main/utils/windowUtil'
|
||||
import { app, BrowserWindow, Menu, MenuItem, shell } from 'electron'
|
||||
import windowStateKeeper from 'electron-window-state'
|
||||
import { join } from 'path'
|
||||
@ -166,10 +166,10 @@ export class WindowService {
|
||||
}
|
||||
|
||||
private setupWindowLifecycleEvents(mainWindow: BrowserWindow) {
|
||||
if (!configManager.isTray() && isTilingWindowManager()) {
|
||||
app.quit()
|
||||
}
|
||||
mainWindow.on('close', (event) => {
|
||||
if (!configManager.isTray() && isTilingWindowManager()) {
|
||||
return app.quit()
|
||||
}
|
||||
if (!app.isQuitting) {
|
||||
event.preventDefault()
|
||||
mainWindow.hide()
|
||||
|
||||
@ -143,7 +143,7 @@ const ProviderSetting: FC<Props> = ({ provider: _provider }) => {
|
||||
<Input.Password
|
||||
value={apiKey}
|
||||
placeholder={t('settings.provider.api_key')}
|
||||
onChange={(e) => setApiKey(e.target.value.replaceAll(',', ','))}
|
||||
onChange={(e) => setApiKey(e.target.value.replaceAll(',', ',').replaceAll(' ', ''))}
|
||||
onBlur={onUpdateApiKey}
|
||||
spellCheck={false}
|
||||
type="password"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user