dsh-usage-peak 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/client.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/client.js
CHANGED
|
@@ -81,6 +81,7 @@ window.__ModuleLoader__.load({
|
|
|
81
81
|
'unit.day': '天',
|
|
82
82
|
'wallet.avg': '日均',
|
|
83
83
|
'wallet.alert': '余额仅够',
|
|
84
|
+
'wallet.runway': '可撑',
|
|
84
85
|
'wallet.warn': '余额偏低',
|
|
85
86
|
'wallet.low': '余额紧张',
|
|
86
87
|
|
|
@@ -178,6 +179,7 @@ window.__ModuleLoader__.load({
|
|
|
178
179
|
'unit.day': 'd',
|
|
179
180
|
'wallet.avg': 'avg',
|
|
180
181
|
'wallet.alert': 'Balance covers',
|
|
182
|
+
'wallet.runway': 'covers',
|
|
181
183
|
'wallet.warn': 'Low balance',
|
|
182
184
|
'wallet.low': 'Balance critical',
|
|
183
185
|
|
|
@@ -841,6 +843,7 @@ window.__ModuleLoader__.load({
|
|
|
841
843
|
const walletLevel = wallet ? wallet.level : 'unknown';
|
|
842
844
|
const walletAlert = walletLevel === 'low' || walletLevel === 'warn';
|
|
843
845
|
const walletTone = walletLevel === 'low' ? C.error : walletLevel === 'warn' ? C.peak : C.text3;
|
|
846
|
+
const runwayLabel = walletAlert ? t('wallet.alert') : t('wallet.runway');
|
|
844
847
|
const remain = data ? Math.max(0, data.now.nextAt - Date.now()) : 0;
|
|
845
848
|
const switchText =
|
|
846
849
|
data && remain > 30_000
|
|
@@ -920,7 +923,7 @@ window.__ModuleLoader__.load({
|
|
|
920
923
|
? h(
|
|
921
924
|
'span',
|
|
922
925
|
{ style: { color: walletTone, fontWeight: 600 } },
|
|
923
|
-
` · ${
|
|
926
|
+
` · ${runwayLabel} ${runway(wallet.runwayDays, t)}`,
|
|
924
927
|
)
|
|
925
928
|
: null,
|
|
926
929
|
),
|
package/package.json
CHANGED