Skip to content

Commit

Permalink
feat: add null check to defaultInterface in sample config
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Mar 18, 2024
1 parent adeadff commit e323a84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/desktop/resources/sample-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ window/bar:
providers: ['network']
template: |
<!-- Show icon based on signal strength. -->
@if (network.defaultInterface.type === 'ethernet') {
@if (network.defaultInterface?.type === 'ethernet') {
<i class="nf nf-md-ethernet_cable"></i>
} @else if (network.defaultInterface.type === 'wifi') {
} @else if (network.defaultInterface?.type === 'wifi') {
@if (network.defaultGateway?.signalStrength >= 80) { <i class="nf nf-md-wifi_strength_4"></i> }
@else if (network.defaultGateway?.signalStrength >= 65) { <i class="nf nf-md-wifi_strength_3"></i> }
@else if (network.defaultGateway?.signalStrength >= 40) { <i class="nf nf-md-wifi_strength_2"></i> }
Expand Down

0 comments on commit e323a84

Please sign in to comment.