From c30fa2aafbb1e052e6bba3193eee3b5f00c04481 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Wed, 7 Aug 2024 15:03:16 -0700 Subject: [PATCH] LFS: improvements --- src/common/livefile/LiveFileControlButton.tsx | 1 - src/common/livefile/liveFile.icons.ts | 8 +++- src/common/livefile/store-live-file.ts | 3 +- src/common/livefile/useLiveFileComparison.tsx | 42 ++++++++++--------- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/common/livefile/LiveFileControlButton.tsx b/src/common/livefile/LiveFileControlButton.tsx index 8941ee389..d8fed0cc9 100644 --- a/src/common/livefile/LiveFileControlButton.tsx +++ b/src/common/livefile/LiveFileControlButton.tsx @@ -84,7 +84,6 @@ export function LiveFileControlButton(props: { : 'Set up live file pairing' } color='success' - variant='outlined' placement='top-end' > )} {/* Save to File */} - {fileIsDifferent && ( + {fileIsDifferent && !isError && ( )} {/* Reassign File button */} - + {/* Close button */} - - - + + + ); - }, [fileHasContent, fileIsDifferent, handleCloseFile, handleLoadFromDisk, handlePairNewFileWithPicker, handleSaveToDisk, _handleReloadFileContent, isMobile, isPairingValid, isSavingFile, status]); + }, [fileHasContent, fileIsDifferent, handleStopLiveFile, handleLoadFromDisk, handlePairNewFileWithPicker, handleSaveToDisk, _handleReloadFileContent, isMobile, isPairingValid, isSavingFile, status]); // Auto-click on 'refresh' on window focus