Remove unused import

This commit is contained in:
Nate Butler 2023-11-30 13:13:22 -05:00
parent 5eb89781e3
commit 5fdfdb046c

View file

@ -39,7 +39,7 @@ use project::{Project, RepositoryEntry};
use theme::ActiveTheme; use theme::ActiveTheme;
use ui::{ use ui::{
h_stack, prelude::*, Avatar, Button, ButtonLike, ButtonStyle2, Icon, IconButton, IconElement, h_stack, prelude::*, Avatar, Button, ButtonLike, ButtonStyle2, Icon, IconButton, IconElement,
KeyBinding, PopoverMenu, Tooltip, KeyBinding, Tooltip,
}; };
use util::ResultExt; use util::ResultExt;
use workspace::{notifications::NotifyResultExt, Workspace}; use workspace::{notifications::NotifyResultExt, Workspace};
@ -287,28 +287,30 @@ impl Render for CollabTitlebarItem {
.child(h_stack().px_1p5().map(|this| { .child(h_stack().px_1p5().map(|this| {
if let Some(user) = current_user { if let Some(user) = current_user {
this.when_some(user.avatar.clone(), |this, avatar| { this.when_some(user.avatar.clone(), |this, avatar| {
this.child( // TODO: Finish implementing user menu popover
PopoverMenu::new( //
ButtonLike::new("user-menu")
.child(h_stack().gap_0p5().child(Avatar::data(avatar)).child(
IconElement::new(Icon::ChevronDown).color(Color::Muted),
))
.style(ButtonStyle2::Subtle)
.tooltip(move |cx| Tooltip::text("Toggle User Menu", cx))
.into_any_element(),
)
.children(vec![div().w_96().h_96().bg(gpui::red())]),
)
// this.child( // this.child(
// ButtonLike::new("user-menu") // PopoverMenu::new(
// .child( // ButtonLike::new("user-menu")
// h_stack().gap_0p5().child(Avatar::data(avatar)).child( // .child(h_stack().gap_0p5().child(Avatar::data(avatar)).child(
// IconElement::new(Icon::ChevronDown).color(Color::Muted), // IconElement::new(Icon::ChevronDown).color(Color::Muted),
// ), // ))
// ) // .style(ButtonStyle2::Subtle)
// .style(ButtonStyle2::Subtle) // .tooltip(move |cx| Tooltip::text("Toggle User Menu", cx))
// .tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)), // .into_any_element(),
// )
// .children(vec![div().w_96().h_96().bg(gpui::red())]),
// ) // )
this.child(
ButtonLike::new("user-menu")
.child(
h_stack().gap_0p5().child(Avatar::data(avatar)).child(
IconElement::new(Icon::ChevronDown).color(Color::Muted),
),
)
.style(ButtonStyle2::Subtle)
.tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)),
)
}) })
} else { } else {
this.child(Button::new("sign_in", "Sign in").on_click(move |_, cx| { this.child(Button::new("sign_in", "Sign in").on_click(move |_, cx| {