Skip to content

Commit 086929d

Browse files
Try to get connect card to reflect correct status after restart
1 parent 2451dd3 commit 086929d

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

kernel/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ const kernelPlugin: JupyterLiteServerPlugin<void> = {
5757

5858
// welcomePanel.show();
5959
welcomePanel.initialShow();
60+
61+
// If the deivce is already connected, update the welcome panel
62+
if (serviceContainer.deviceService.isConnected()) {
63+
welcomePanel.updateOnConnection("Device already connected");
64+
}
6065

6166
await kernel.ready;
6267

kernel/src/panel.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,6 @@ export default class WelcomePanel {
110110
].join('\n');
111111
document.head.appendChild(styleElement);
112112

113-
// TODO:
114-
// 1) We no longer want the dialog to be shown on startup and we also don't want it
115-
// to be shown when the user clicks on the minimized button.
116-
// 2) We want to act as if the connect card was clicked when the user clicks on the minimized button.
117-
// 3) We want there to be a new popup if connecting to the device fails that contains suggestions for why
118-
119-
// currently objects are like this:
120-
121-
// WelcomePanel -> MinimizedPanel -> MinimizedButton -> DeviceService <-|
122-
// WelcomePanel -> DialogPanel -> Dialog -> ConnectCard -> DeviceService <-|
123-
// We want to change this to be like this:
124-
// WelcomePanel -> MinimizedPanel -> MinimizedButton -> DeviceService
125-
126-
// need a good way to add the same connection behavior but up a level
127-
128113
const minimizedButton = new MinimizedButton(() => this.show());
129114
this.minimizedPanel = new MinimizedPanel(minimizedButton);
130115

0 commit comments

Comments
 (0)