From a630a646bbcb51943774023913803410e4dc07bc Mon Sep 17 00:00:00 2001 From: Georgi Angelov Date: Wed, 22 Oct 2025 11:35:02 +0300 Subject: [PATCH] feat: add onClickLogin on the main GUI component Allows overriding what happens when the Login button in the header is clicked. In some cases we want to be able to open a popup, not just render a user/pass dialog as in current Scratch. --- packages/scratch-gui/src/components/gui/gui.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/scratch-gui/src/components/gui/gui.jsx b/packages/scratch-gui/src/components/gui/gui.jsx index b5d2f6d332..315e3e7c41 100644 --- a/packages/scratch-gui/src/components/gui/gui.jsx +++ b/packages/scratch-gui/src/components/gui/gui.jsx @@ -99,6 +99,7 @@ const GUIComponent = props => { onClickAccountNav, onCloseAccountNav, onLogOut, + onClickLogin, onOpenRegistration, onToggleLoginOpen, onActivateCostumesTab, @@ -274,6 +275,7 @@ const GUIComponent = props => { onClickLogo={onClickLogo} onCloseAccountNav={onCloseAccountNav} onLogOut={onLogOut} + onClickLogin={onClickLogin} onOpenRegistration={onOpenRegistration} onProjectTelemetryEvent={onProjectTelemetryEvent} onSeeCommunity={onSeeCommunity} @@ -463,6 +465,7 @@ GUIComponent.propTypes = { onLogOut: PropTypes.func, onNewSpriteClick: PropTypes.func, onNewLibraryCostumeClick: PropTypes.func, + onClickLogin: PropTypes.func, onOpenRegistration: PropTypes.func, onRequestCloseBackdropLibrary: PropTypes.func, onRequestCloseCostumeLibrary: PropTypes.func,