Remove unused import
This commit is contained in:
parent
5eb89781e3
commit
5fdfdb046c
1 changed files with 22 additions and 20 deletions
|
@ -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| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue