Fix launch cache sanitization and progress layout
Some checks failed
Build / release (macos-latest) (push) Has been cancelled
Build / release (ubuntu-latest) (push) Has been cancelled
Build / release (windows-latest) (push) Has been cancelled
Windows Smoke Test / windows-smoke (push) Has been cancelled

This commit is contained in:
2026-05-06 04:58:12 +09:00
parent e42ff9245c
commit 20677380b9
4 changed files with 81 additions and 1 deletions

View File

@@ -125,6 +125,10 @@ async function logoutSelectedAccount(){
* @param {boolean} loading True if the loading area should be shown, otherwise false.
*/
function toggleLaunchArea(loading){
if(typeof syncLaunchDetailWidths === 'function'){
syncLaunchDetailWidths()
}
if(loading){
launch_details.style.display = 'flex'
launch_content.style.display = 'none'
@@ -132,6 +136,12 @@ function toggleLaunchArea(loading){
launch_details.style.display = 'none'
launch_content.style.display = 'inline-flex'
}
window.requestAnimationFrame(() => {
if(typeof syncLaunchDetailWidths === 'function'){
syncLaunchDetailWidths()
}
})
}
/**

View File

@@ -41,6 +41,7 @@ const UI_SCALE_MULTIPLIER = 1.5
let responsiveLayoutFrame = null
let lastAppliedZoomFactor = null
let lastLaunchContentWidth = 0
function clamp(value, min, max){
return Math.min(Math.max(value, min), max)
@@ -58,19 +59,35 @@ function syncLaunchDetailWidths(){
return
}
const launchContentWidth = launchContent.getBoundingClientRect().width
const measuredLaunchContentWidth = Math.ceil(launchContent.getBoundingClientRect().width)
if(measuredLaunchContentWidth > 0){
lastLaunchContentWidth = measuredLaunchContentWidth
}
const launchContentWidth = lastLaunchContentWidth > 0
? lastLaunchContentWidth
: Math.ceil(launchDetails.parentElement?.getBoundingClientRect().width ?? 0)
if(launchContentWidth <= 0){
return
}
const launchButtonWidth = launchButton.getBoundingClientRect().width
const labelWidth = Math.max(64, Math.ceil(launchButtonWidth * 0.48))
const progressWidth = Math.max(220, Math.floor(launchContentWidth - labelWidth - 48))
launchDetails.style.width = `${Math.ceil(launchContentWidth)}px`
launchDetails.style.maxWidth = `${Math.ceil(launchContentWidth)}px`
launchProgress.style.width = `${progressWidth}px`
launchDetailsRight.style.width = `${progressWidth}px`
launchDetailsRight.style.maxWidth = `${progressWidth}px`
launchProgressLabel.style.width = `${labelWidth}px`
launchProgressLabel.style.minWidth = `${labelWidth}px`
launchProgressLabel.style.maxWidth = `${labelWidth}px`
}
window.syncLaunchDetailWidths = syncLaunchDetailWidths
function applyResponsiveLayout(){
const currentWindow = remote.getCurrentWindow()
const contentBounds = currentWindow.getContentBounds()