Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca83fa2

Browse files
Make usage indicator more contrast (#10188)
* Make usage indicator more contrast Signed-off-by: Artem Savchenko <armisav@gmail.com> * Use old warning threshold Signed-off-by: Artem Savchenko <armisav@gmail.com> --------- Signed-off-by: Artem Savchenko <armisav@gmail.com>
1 parent c0346f0 commit ca83fa2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

‎plugins/billing-resources/src/components/LimitsIndicator.svelte‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@
135135
border-radius: var(--small-BorderRadius);
136136
transition: background-color 0.2s ease;
137137
position: relative;
138-
border: 1px solid var(--button-secondary-BorderColor);
138+
border: 1px solid var(--theme-trans-color);
139139
}
140140
</style>

‎plugins/billing-resources/src/components/UsageProgressBar.svelte‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
2020
$: clampedPercent = Math.min(Math.max(percent, 0), 1)
2121
22-
// Calculate color based on current percentage
23-
$: fillColor = clampedPercent >= 0.9 ? '#e53935' : clampedPercent >= 0.7 ? '#fbc02d' : '#43a047'
22+
// Calculate style class based on current percentage
23+
$: fillClass = clampedPercent >= 0.9 ? 'critical' : clampedPercent >= 0.7 ? 'warning' : 'normal'
2424
</script>
2525

2626
<div class="progress-bar" style="width: {width}; height: {height};">
2727
<div class="progress-track">
28-
<div class="progress-fill" style="width: {clampedPercent * 100}%; background-color: {fillColor};"></div>
28+
<div class="progress-fill{fillClass}" style="width: {clampedPercent * 100}%;"></div>
2929
</div>
3030
</div>
3131

@@ -49,5 +49,17 @@
4949
transition:
5050
width 0.3s ease,
5151
background-color 0.3s ease;
52+
53+
&.normal {
54+
background-color: var(--theme-won-color);
55+
}
56+
57+
&.warning {
58+
background-color: var(--theme-warning-color);
59+
}
60+
61+
&.critical {
62+
background-color: var(--theme-error-color);
63+
}
5264
}
5365
</style>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /