mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 06:22:42 +03:00
Add "Checking" icon for diagnostics
This commit is contained in:
parent
f633043859
commit
710a26ce32
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -9514,7 +9514,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zed"
|
||||
version = "0.119.0"
|
||||
version = "0.120.0"
|
||||
dependencies = [
|
||||
"activity_indicator",
|
||||
"ai",
|
||||
|
1
assets/icons/arrow_circle.svg
Normal file
1
assets/icons/arrow_circle.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>
|
After Width: | Height: | Size: 389 B |
@ -23,11 +23,21 @@ pub struct DiagnosticIndicator {
|
||||
impl Render for DiagnosticIndicator {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {
|
||||
(0, 0) => h_stack().child(
|
||||
IconElement::new(Icon::Check)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Success),
|
||||
),
|
||||
(0, 0) => h_stack().map(|this| {
|
||||
if !self.in_progress_checks.is_empty() {
|
||||
this.child(
|
||||
IconElement::new(Icon::ArrowCircle)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Muted),
|
||||
)
|
||||
} else {
|
||||
this.child(
|
||||
IconElement::new(Icon::Check)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Default),
|
||||
)
|
||||
}
|
||||
}),
|
||||
(0, warning_count) => h_stack()
|
||||
.gap_1()
|
||||
.child(
|
||||
@ -64,6 +74,7 @@ impl Render for DiagnosticIndicator {
|
||||
Some(
|
||||
Label::new("Checking…")
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Muted)
|
||||
.into_any_element(),
|
||||
)
|
||||
} else if let Some(diagnostic) = &self.current_diagnostic {
|
||||
|
@ -29,6 +29,7 @@ pub enum Icon {
|
||||
ArrowRight,
|
||||
ArrowUp,
|
||||
ArrowUpRight,
|
||||
ArrowCircle,
|
||||
AtSign,
|
||||
AudioOff,
|
||||
AudioOn,
|
||||
@ -119,6 +120,7 @@ impl Icon {
|
||||
Icon::ArrowRight => "icons/arrow_right.svg",
|
||||
Icon::ArrowUp => "icons/arrow_up.svg",
|
||||
Icon::ArrowUpRight => "icons/arrow_up_right.svg",
|
||||
Icon::ArrowCircle => "icons/arrow_circle.svg",
|
||||
Icon::AtSign => "icons/at_sign.svg",
|
||||
Icon::AudioOff => "icons/speaker_off.svg",
|
||||
Icon::AudioOn => "icons/speaker_loud.svg",
|
||||
|
Loading…
Reference in New Issue
Block a user