mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 02:58:13 -05:00
parent
658d6840b1
commit
0b670a8361
@ -235,7 +235,7 @@ windowList.set(IWindowList.RENAME_WINDOW, {
|
||||
if (currentWindow && currentWindow.isVisible()) {
|
||||
// bounds: { x: 821, y: 75, width: 800, height: 450 }
|
||||
const bounds = currentWindow.getBounds()
|
||||
const positionX = bounds.x + bounds.width / 2 - 150
|
||||
let positionX = bounds.x + bounds.width / 2 - 150
|
||||
let positionY
|
||||
// if is the settingWindow
|
||||
if (bounds.height > 400) {
|
||||
@ -244,6 +244,8 @@ windowList.set(IWindowList.RENAME_WINDOW, {
|
||||
// if is the miniWindow
|
||||
positionY = bounds.y + bounds.height / 2
|
||||
}
|
||||
positionX = Math.floor(positionX)
|
||||
positionY = Math.floor(positionY)
|
||||
window.setPosition(positionX, positionY, false)
|
||||
}
|
||||
}
|
||||
@ -258,13 +260,15 @@ windowList.set(IWindowList.TOOLBOX_WINDOW, {
|
||||
const currentWindow = windowManager.getAvailableWindow(true)
|
||||
if (currentWindow && currentWindow.isVisible()) {
|
||||
const bounds = currentWindow.getBounds()
|
||||
const positionX = bounds.x + bounds.width / 2 - 400
|
||||
let positionX = bounds.x + bounds.width / 2 - 400
|
||||
let positionY
|
||||
if (bounds.height > 400) {
|
||||
positionY = bounds.y + bounds.height / 2 - 225
|
||||
} else {
|
||||
positionY = bounds.y + bounds.height / 2
|
||||
}
|
||||
positionX = Math.floor(positionX)
|
||||
positionY = Math.floor(positionY)
|
||||
window.setPosition(positionX, positionY, false)
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ router.post(
|
||||
let needRestore = false
|
||||
if (picbed) {
|
||||
const currentPicBed = picgo.getConfig<IStringKeyMap>('picBed') || ({} as IStringKeyMap)
|
||||
currentPicBedType = currentPicBed.current || ''
|
||||
currentPicBedType = currentPicBed.uploader || currentPicBed.current || 'smms'
|
||||
currentPicBedConfig = currentPicBed[currentPicBedType] || ({} as IStringKeyMap)
|
||||
currentPicBedConfigId = currentPicBedConfig._id
|
||||
const configName = urlparams?.get('configName') || currentPicBed[picbed]?._configName
|
||||
|
Loading…
Reference in New Issue
Block a user