Skip to content

🎥 Make videos programmatically with React

works well!

Jonny Burger6bc1c5c1493b
diff --git a/packages/studio/src/components/InstallPackage.tsx b/packages/studio/src/components/InstallPackage.tsx
index 7e5c29ce0f..50f9329628 100644
--- a/packages/studio/src/components/InstallPackage.tsx
+++ b/packages/studio/src/components/InstallPackage.tsx
@@ -46,6 +46,7 @@ export const InstallPackageModal: React.FC<{
const onClick = useCallback(async () => {
if (state.type === 'done') {
+ setState({type: 'restarting'});
restartStudio();
return;
}
@@ -78,8 +79,9 @@ export const InstallPackageModal: React.FC<{
event: 'keydown',
preventDefault: true,
triggerIfInputFieldFocused: true,
- keepRegisteredWhenNotHighestContext: false,
+ keepRegisteredWhenNotHighestContext: true,
});
+
return () => {
enter.unregister();
};
@@ -93,6 +95,12 @@ export const InstallPackageModal: React.FC<{
<div style={text}>
The package was installed. It is recommended to restart the server.
</div>
+ ) : state.type === 'restarting' ? (
+ <div style={text}>Restarting the Studio server...</div>
+ ) : state.type === 'installing' ? (
+ <div style={text}>
+ The package is installing. Check your terminal for progress.
+ </div>
) : (
<div style={text}>
This will install the package {packageName}@{VERSION} from npm.
@@ -110,7 +118,7 @@ export const InstallPackageModal: React.FC<{
: state.type === 'done'
? 'Restart Server'
: 'Install'}
- <ShortcutHint keyToPress="↵" cmdOrCtrl />
+ {disabled ? null : <ShortcutHint keyToPress="↵" cmdOrCtrl />}
</ModalButton>
</Row>
</ModalFooterContainer>