mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-09 07:25:02 +03:00
fix(clients): clarify renewal preview times and estimates (#6662)
* fix(clients): clarify renewal preview times and estimates The preview rendered RFC3339 strings directly and labeled the server's Local zone without explaining which clock it represented. Its renewal count also looked like a record of renewals already performed. Display readable dates with an explicit UTC offset while preserving the server's wall time, per-date DST offset and fractional cutoff precision. Explain the panel/server timezone and read-only preview, and label the renewal count as estimated allowance consumption in all 13 locales. Let the first-cutoff button wrap on narrow screens and update the English and Chinese client documentation plus display/form regression coverage. This changes presentation only: renewal calculations, stored expiry values, API payloads and first-use behavior remain unchanged. * test(clients): remove redundant renewal preview copy checks The locale-only preview case repeated the Local timezone branch without covering a distinct behavior. Exact textContent comparisons after matching the same text with getByText also only pinned constant wording, contrary to the repository's testing guidance. Remove that duplicate case, its locale setup and the redundant copy assertions. Keep the UTC, per-boundary DST offset, fractional precision and original datetime checks, together with the existing real form-save tests. Production rendering, translations and renewal behavior are unchanged. --------- Co-authored-by: JacktheRanger <219502738+JacktheRanger@users.noreply.github.com>
This commit is contained in:
@@ -75,6 +75,16 @@ explicit button can set the first calendar cutoff. Selecting a mode alone never
|
||||
rewrites an existing expiry. First-use clients keep their initial duration, and
|
||||
their calendar dates are available after activation.
|
||||
|
||||
Preview dates use the Gregorian format `YYYY-MM-DD HH:mm:ss UTC±HH:mm`,
|
||||
preserving any fractional seconds in the cutoff. Each date includes its own
|
||||
UTC offset, so a daylight-saving change can show different offsets before and
|
||||
after renewal. The heading identifies the panel time zone; **Server local time**
|
||||
means the server's `Local` setting, not the browser's time zone. For example,
|
||||
`2026-09-27 05:00:00 UTC+00:00` is 13:00 in UTC+08:00. **Estimated renewals used**
|
||||
is the allowance this preview would consume, including any catch-up periods,
|
||||
not a count of renewals already performed. The first-cutoff button uses the same
|
||||
date format; clicking it still requires saving the form to persist the change.
|
||||
|
||||
For legacy last-second calendar cutoffs, the renewal boundary includes the
|
||||
existing free alignment to the following midnight. The last-valid-second
|
||||
preview still uses the **stored expiry**, not that alignment: an exclusive
|
||||
|
||||
@@ -67,6 +67,14 @@ icon: Users
|
||||
明确点击按钮设置首次日历截止时间;仅选择模式不会修改已有到期时间。
|
||||
“首次使用后开始”保留原来的初始天数,激活后才能确定日历日期。
|
||||
|
||||
预览日期使用公历格式 `YYYY-MM-DD HH:mm:ss UTC±HH:mm`,截止时间中的小数秒
|
||||
会原样保留。每个日期分别标注 UTC 偏移,因此跨夏令时续期前后的偏移可能不同。
|
||||
标题注明面板时区;**服务器本地时区**指服务器的 `Local` 设置,不是浏览器时区。
|
||||
例如 `2026-09-27 05:00:00 UTC+00:00` 对应 UTC+08:00 的 13:00。
|
||||
**预计消耗续期次数**是本次预览预计使用的额度,包含补续周期,不是已经执行的
|
||||
续期次数。设置首个周期截止时间的按钮使用同样的日期格式;点击后仍需保存表单
|
||||
才会持久化修改。
|
||||
|
||||
旧配置以最后一秒为日历截止时间时,续期边界包含原有的不计次数向下个
|
||||
零点对齐规则。但最后有效秒仍按**已存储的到期时间**计算,不会假装
|
||||
初始时间已被修改:排他截止时间 `23:59:59` 实际有效至 `23:59:58`。
|
||||
|
||||
Reference in New Issue
Block a user