mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
feat(usage): add live end time option for custom date range (#4438)
* add glm-5.2 pricing * feat(usage): add live end time option for custom date range Add a "End time follows current time" checkbox in the custom date range picker. When enabled, the end time becomes read-only and automatically tracks the current moment, so usage data always reflects up-to-the-second consumption from the chosen start time. This is especially useful under the Coding Plan 5-hour quota window — users can set the start time to when their 5h window began and keep the end time live to monitor real-time token consumption. * style(usage): fix prettier formatting for UsageDashboard * fix(usage): include liveEndTime in React Query cache keys Without liveEndTime in the query key, a live custom range and a fixed custom range with the same stored endpoints share the same cache entry. After the live range refreshes (endDate = now), switching to the fixed range shows stale data fetched through "now" instead of the original end time.
This commit is contained in:
@@ -1473,6 +1473,8 @@
|
||||
"customRangeHint": "Supports both date and time",
|
||||
"startTime": "Start Time",
|
||||
"endTime": "End Time",
|
||||
"liveEndTime": "End time follows current time",
|
||||
"liveEndTimeNow": "Now",
|
||||
"input": "Input",
|
||||
"output": "Output",
|
||||
"cacheWrite": "Creation",
|
||||
|
||||
@@ -1473,6 +1473,8 @@
|
||||
"customRangeHint": "日付と時刻の両方に対応",
|
||||
"startTime": "開始時刻",
|
||||
"endTime": "終了時刻",
|
||||
"liveEndTime": "終了時刻を現在時刻に追従",
|
||||
"liveEndTimeNow": "現在",
|
||||
"input": "Input",
|
||||
"output": "Output",
|
||||
"cacheWrite": "作成",
|
||||
|
||||
@@ -1445,6 +1445,8 @@
|
||||
"customRangeHint": "支援日期與時間",
|
||||
"startTime": "開始時間",
|
||||
"endTime": "結束時間",
|
||||
"liveEndTime": "結束時間跟隨當前時刻",
|
||||
"liveEndTimeNow": "現在",
|
||||
"input": "Input",
|
||||
"output": "Output",
|
||||
"cacheWrite": "建立",
|
||||
|
||||
@@ -1473,6 +1473,8 @@
|
||||
"customRangeHint": "支持日期与时间",
|
||||
"startTime": "开始时间",
|
||||
"endTime": "结束时间",
|
||||
"liveEndTime": "结束时间跟随当前时刻",
|
||||
"liveEndTimeNow": "现在",
|
||||
"input": "Input",
|
||||
"output": "Output",
|
||||
"cacheWrite": "创建",
|
||||
|
||||
Reference in New Issue
Block a user