diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index a6d5e32be2..3e4f7fca8d 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -578,10 +578,16 @@ class EditorComponent extends React.Component { const selectedComponents = this.state?.selectedComponents; removeSelectedComponent(newDefinition, selectedComponents); - - toast('Selected components deleted! (⌘Z to undo)', { - icon: '🗑️', - }); + const platform = navigator?.userAgentData?.platform || navigator?.platform || 'unknown'; + if (platform.toLowerCase().indexOf('mac') > -1) { + toast('Selected components deleted! (⌘ + Z to undo)', { + icon: '🗑️', + }); + } else { + toast('Selected components deleted! (ctrl + Z to undo)', { + icon: '🗑️', + }); + } this.appDefinitionChanged(newDefinition, { skipAutoSave: this.isVersionReleased(), }); @@ -613,9 +619,16 @@ class EditorComponent extends React.Component { }); delete newDefinition.components[component.id]; - toast('Component deleted! (⌘Z to undo)', { - icon: '🗑️', - }); + const platform = navigator?.userAgentData?.platform || navigator?.platform || 'unknown'; + if (platform.toLowerCase().indexOf('mac') > -1) { + toast('Component deleted! (⌘ + Z to undo)', { + icon: '🗑️', + }); + } else { + toast('Component deleted! (ctrl + Z to undo)', { + icon: '🗑️', + }); + } this.appDefinitionChanged(newDefinition, { skipAutoSave: this.isVersionReleased(), });