Introduce dynamic modal width in AppUpdateProvider for improved UI flexibility during software updates.

This commit is contained in:
Tom Butcher 2026-06-21 19:18:28 +01:00
parent 842ada9f33
commit 6e11c92862

View File

@ -82,6 +82,8 @@ export const AppUpdateProvider = ({ children }) => {
const runningCheckRef = useRef(null) const runningCheckRef = useRef(null)
const updateCheckDependenciesRef = useRef({}) const updateCheckDependenciesRef = useRef({})
const [modelWidth, setModelWidth] = useState(650)
updateCheckDependenciesRef.current = { updateCheckDependenciesRef.current = {
fetchAppUpdateBranches, fetchAppUpdateBranches,
fetchAppUpdateCurrent, fetchAppUpdateCurrent,
@ -191,6 +193,7 @@ export const AppUpdateProvider = ({ children }) => {
setNoUpdateOpen(false) setNoUpdateOpen(false)
setAvailableUpdate(null) setAvailableUpdate(null)
setInstallingUpdate(update) setInstallingUpdate(update)
setModelWidth(550)
setUpdateProgress({ setUpdateProgress({
phase: 'preparing', phase: 'preparing',
percent: 0, percent: 0,
@ -256,10 +259,12 @@ export const AppUpdateProvider = ({ children }) => {
<Text>There are no new software updates available.</Text> <Text>There are no new software updates available.</Text>
</Modal> </Modal>
<Modal <Modal
title={installingUpdate ? 'Software Update' : 'Software Update Available'} title={
installingUpdate ? 'Software Update' : 'Software Update Available'
}
open={updateModalOpen} open={updateModalOpen}
footer={null} footer={null}
width={650} width={modelWidth}
centered centered
closable={!updateModalBusy} closable={!updateModalBusy}
maskClosable={!updateModalBusy} maskClosable={!updateModalBusy}