diff --git a/intuita-webview/src/main/App.css b/intuita-webview/src/main/App.css index fdab19d9..d3abbc51 100644 --- a/intuita-webview/src/main/App.css +++ b/intuita-webview/src/main/App.css @@ -65,3 +65,10 @@ height: 4em; width: 100%; } + +.warning { + font-size: var(--type-ramp-base-font-size); + line-height: var(--type-ramp-base-line-height); + display: block; + color: var(--foreground); +} diff --git a/intuita-webview/src/main/App.tsx b/intuita-webview/src/main/App.tsx index 8e671a05..04273242 100644 --- a/intuita-webview/src/main/App.tsx +++ b/intuita-webview/src/main/App.tsx @@ -90,7 +90,10 @@ function App() { }, []); useEffect(() => { - if (mainWebviewViewProps.toaster === null) { + if ( + mainWebviewViewProps === null || + mainWebviewViewProps.toaster === null + ) { return; } @@ -122,7 +125,7 @@ function App() { kind: 'webview.main.setToaster', value: null, }); - }, [mainWebviewViewProps.toaster]); + }, [mainWebviewViewProps, mainWebviewViewProps?.toaster]); const handlePanelTabClick = (id: ActiveTabId) => { vscode.postMessage({ @@ -131,6 +134,16 @@ function App() { }); }; + if (mainWebviewViewProps === null) { + return ( +
+

+ Open a workspace folder to use the Intuita VSCode Extension. +

+
+ ); + } + return (
, executionQueue: ReadonlyArray, ) => { + if (rootUri === null) { + return null; + } + if (state.activeTabId === 'codemods') { return { activeTabId: state.activeTabId,