migrate icons to gpui-native-kit
This commit is contained in:
@@ -7,17 +7,17 @@ use gpui::{
|
||||
App, AppContext, Context, Div, Entity, InteractiveElement, IntoElement, ParentElement, Render,
|
||||
SharedString, Styled, Subscription, Task, Window, div, px, relative, uniform_list,
|
||||
};
|
||||
use gpui_kit::assets::IconName;
|
||||
use gpui_kit::base::StyledExt as _;
|
||||
use gpui_kit::component::button::{Button, ButtonVariants};
|
||||
use gpui_kit::component::spinner::Spinner;
|
||||
use gpui_kit::component::{ActiveTheme, Disableable, Icon, Sizable, WindowExt, h_flex, v_flex};
|
||||
use gpui_kit::component::{ActiveTheme, Disableable, Sizable, WindowExt, h_flex, v_flex};
|
||||
use gpui_native_kit::icons::Icon;
|
||||
use instant::Duration;
|
||||
use nostr_sdk::prelude::*;
|
||||
use person::{Directory, Person, PersonRegistry, shorten_pubkey};
|
||||
use smallvec::{SmallVec, smallvec};
|
||||
use state::{BOOTSTRAP_RELAYS, NostrAddress, NostrRegistry, TIMEOUT};
|
||||
use ui::Avatar;
|
||||
use ui::{Avatar, IconName};
|
||||
|
||||
pub fn init(public_key: PublicKey, window: &mut Window, cx: &mut App) -> Entity<Screening> {
|
||||
cx.new(|cx| Screening::new(public_key, window, cx))
|
||||
@@ -569,13 +569,17 @@ fn status_badge(status: Option<bool>, cx: &App) -> Div {
|
||||
.flex_shrink_0()
|
||||
.map(|this| {
|
||||
if let Some(status) = status {
|
||||
this.child(Icon::new(IconName::CircleCheck).small().text_color({
|
||||
if status {
|
||||
cx.theme().primary
|
||||
} else {
|
||||
cx.theme().muted_foreground
|
||||
}
|
||||
}))
|
||||
this.child(
|
||||
Icon::named(IconName::CircleCheck)
|
||||
.size(ui::small_icon_size(cx))
|
||||
.color({
|
||||
if status {
|
||||
cx.theme().primary
|
||||
} else {
|
||||
cx.theme().muted_foreground
|
||||
}
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
this.child(Spinner::new().small())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user