fix(properties): harden recovery and window chrome

This commit is contained in:
NimBold
2026-08-05 21:41:59 +03:30
parent c1202229ac
commit b36f55e5b5
16 changed files with 527 additions and 132 deletions
+15
View File
@@ -0,0 +1,15 @@
export type PropertiesFooterAction = 'discardChanges' | 'save' | 'close' | 'keepEditing';
export type PropertiesFooterState = {
isDirty: boolean;
hasUnsavedNavigation: boolean;
};
export const getPropertiesFooterActions = ({
isDirty,
hasUnsavedNavigation,
}: PropertiesFooterState): PropertiesFooterAction[] => {
if (hasUnsavedNavigation) return ['discardChanges', 'save', 'keepEditing'];
if (isDirty) return ['discardChanges', 'save', 'close'];
return ['close'];
};