mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 08:53:09 +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]]
|
[[package]]
|
||||||
name = "zed"
|
name = "zed"
|
||||||
version = "0.119.0"
|
version = "0.120.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activity_indicator",
|
"activity_indicator",
|
||||||
"ai",
|
"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 {
|
impl Render for DiagnosticIndicator {
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||||
let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {
|
let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {
|
||||||
(0, 0) => h_stack().child(
|
(0, 0) => h_stack().map(|this| {
|
||||||
IconElement::new(Icon::Check)
|
if !self.in_progress_checks.is_empty() {
|
||||||
.size(IconSize::Small)
|
this.child(
|
||||||
.color(Color::Success),
|
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()
|
(0, warning_count) => h_stack()
|
||||||
.gap_1()
|
.gap_1()
|
||||||
.child(
|
.child(
|
||||||
@ -64,6 +74,7 @@ impl Render for DiagnosticIndicator {
|
|||||||
Some(
|
Some(
|
||||||
Label::new("Checking…")
|
Label::new("Checking…")
|
||||||
.size(LabelSize::Small)
|
.size(LabelSize::Small)
|
||||||
|
.color(Color::Muted)
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
)
|
)
|
||||||
} else if let Some(diagnostic) = &self.current_diagnostic {
|
} else if let Some(diagnostic) = &self.current_diagnostic {
|
||||||
|
@ -29,6 +29,7 @@ pub enum Icon {
|
|||||||
ArrowRight,
|
ArrowRight,
|
||||||
ArrowUp,
|
ArrowUp,
|
||||||
ArrowUpRight,
|
ArrowUpRight,
|
||||||
|
ArrowCircle,
|
||||||
AtSign,
|
AtSign,
|
||||||
AudioOff,
|
AudioOff,
|
||||||
AudioOn,
|
AudioOn,
|
||||||
@ -119,6 +120,7 @@ impl Icon {
|
|||||||
Icon::ArrowRight => "icons/arrow_right.svg",
|
Icon::ArrowRight => "icons/arrow_right.svg",
|
||||||
Icon::ArrowUp => "icons/arrow_up.svg",
|
Icon::ArrowUp => "icons/arrow_up.svg",
|
||||||
Icon::ArrowUpRight => "icons/arrow_up_right.svg",
|
Icon::ArrowUpRight => "icons/arrow_up_right.svg",
|
||||||
|
Icon::ArrowCircle => "icons/arrow_circle.svg",
|
||||||
Icon::AtSign => "icons/at_sign.svg",
|
Icon::AtSign => "icons/at_sign.svg",
|
||||||
Icon::AudioOff => "icons/speaker_off.svg",
|
Icon::AudioOff => "icons/speaker_off.svg",
|
||||||
Icon::AudioOn => "icons/speaker_loud.svg",
|
Icon::AudioOn => "icons/speaker_loud.svg",
|
||||||
|
Loading…
Reference in New Issue
Block a user