Skip to content

feat(net): Set Good/Warning state#2196

Open
cashpw wants to merge 1 commit intogreshake:masterfrom
cashpw:feat/net-state
Open

feat(net): Set Good/Warning state#2196
cashpw wants to merge 1 commit intogreshake:masterfrom
cashpw:feat/net-state

Conversation

@cashpw
Copy link
Copy Markdown
Contributor

@cashpw cashpw commented Aug 30, 2025

What?

  1. Set State::Good when device is up
  2. Set State::Warning when device is down

Why?

Allow for theme color customization based on network connection state.

**What?**

1. Set `State::Good` when device is up
1. Set `State::Warning` when device is down

**Why?**

Allow for theme color customization based on network connection state.
Comment thread src/blocks/net.rs
let mut widget = Widget::new();

if device.is_up() {
widget.state = State::Good;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest leaving the default state when the device is up and only setting the state when the device is down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants