diff --git a/crates/copilot_ui/src/sign_in.rs b/crates/copilot_ui/src/sign_in.rs index 53c6d751826fe3f2bdc0ee17c8b9df9089c07b14..d841ee8ced946c424bdf0b10c94b0147024d4755 100644 --- a/crates/copilot_ui/src/sign_in.rs +++ b/crates/copilot_ui/src/sign_in.rs @@ -144,6 +144,12 @@ impl CopilotCodeVerification { .on_click(|_, cx| cx.open_url(COPILOT_SIGN_UP_URL)), ) } + + fn render_disabled_modal() -> impl Element { + v_flex() + .child(Headline::new("Copilot is disabled").size(HeadlineSize::Large)) + .child(Label::new("You can enable Copilot in your settings.")) + } } impl Render for CopilotCodeVerification { @@ -160,6 +166,10 @@ impl Render for CopilotCodeVerification { self.connect_clicked = false; Self::render_enabled_modal(cx).into_any_element() } + Status::Disabled => { + self.connect_clicked = false; + Self::render_disabled_modal().into_any_element() + } _ => div().into_any_element(), };