Commit Graph
491 Commits
Author SHA1 Message Date
Codex e74143b827 Merge upstream v2.5.1 while preserving domain dashboard extensions 2026-10-22 23:50:03 +08:00
hamster1963 576e230794 chore(release): v2.5.1 2026-10-22 17:09:24 +08:00
hamster1963 512ef01b34 fix(online-history): default to one-day history 2026-10-22 17:09:24 +08:00
hamster1963 cc33841ede chore(release): v2.5.0 2026-10-22 12:06:54 +08:00
仓鼠 247cbcf5ac fix(deps): update vulnerable runtime and development dependencies (#101) 2026-10-22 12:05:14 +08:00
c59c18de17 feat: add server online history tab with date-grouped chip wall (#97)
* feat(server-detail): add online history tab

Render per-server online periods from GET /api/v1/server/:id/online-history:
summary card (current status, online rate, total in window, last active),
daily online-time bars, and the raw period list. Window selector offers
1d/7d/30d and locks options beyond the server's max_days; guests hitting
the 1d cap see a login hint. i18n keys added for all locales (zh-CN/zh-TW
translated, others fall back to English for Weblate).

* fix(online-history): keep selector pills above the sliding indicator

The active-indicator overlay sits at z-10 and intercepted clicks on the
day pills; wrap pills at z-20 like the existing PeriodSelector.

* feat(online-history): render daily online as 24h timeline with hover tooltips

每日在线卡片从整日占比进度条改为 0:00–24:00 整轴时间条:
每个在线时段按当日时刻定位为高亮分段,hover 显示起止时间与时长;
进行中时段以亮色高亮。卡片顶部新增共享刻度(0:00 / 12:00 / 24:00)。

* feat(online-history): regroup periods by day as expandable chip wall

Rework the Online tab per the chip-wall design: periods are grouped by
panel-timezone day with per-day totals, defaulting to the latest day with
"Expand more" revealing up to ten more groups per click, plus an
Online/Offline switch that derives offline chips as the window complement.

- respond to the backend panel timezone (timezone/tz_offset): dayjs 1.11
  .tz(input, zone) ignores explicit offsets, so offset-bearing timestamps
  are parsed first and converted afterwards; naive date strings keep the
  zone-parse path (panelDay)
- guests falling back automatically: a rejected days>1 request locks 7d/30d
  and retries at 1d instead of surfacing only a login prompt
- fix day-selector indicator landing on the wrong pill: useActiveIndicator
  refs are stored by index, pass the map index not the day value
- disable Node experimental webstorage in vitest workers: Node >=25 ships a
  broken global localStorage that shadows the jsdom one
- 14 locales: tabSwitch.Online + serverOnlineHistory.*

* feat(online-history): boxed summary stats with desktop/mobile layouts

* fix(online-history): align offline gaps, DST coordinates and ongoing chips

- extract pure timeline/grouping helpers into src/lib/online-history.ts
- clamp offline complements to day and window boundaries, so a gap can no
  longer run into a later day's first online session
- use wall-clock coordinates and true next-midnight boundaries on DST days
- label only the segment ending at the live session end as Ongoing
- keep group totals equal to the visible chips for cross-day sessions
- keep period chips on one line and render next-midnight as 24:00
- add regression tests for multi-day offline gaps, window_start/window_end,
  spring-forward/fall-back geometry and ongoing clipping

* style(online-history): lighten summary metrics and shorten rate bar

* feat(online-history): refine UI and unify daily history rendering

---------

Co-authored-by: Sam5440 <Sam5440@users.noreply.github.com>
Co-authored-by: hamster1963 <1410514192@qq.com>
2026-10-22 12:01:21 +08:00
仓鼠 2a250378fe perf(home): reduce continuous homepage animations (#100)
* perf(home): remove continuous status and clock animations

* chore: auto-fix linting and formatting issues
2026-10-22 11:56:43 +08:00
Galaxy Roaming 2750d9858a fix: prompt login when guest API returns unauthorized (#98)
When force_auth is on, the guest homepage still loads, but /api/v1/server
returns {"error":"ApiErrorUnauthorized"}. BackendErrorState treated that
the same as a down backend.

Match that error exactly and show a login title, description, and a
button to /dashboard. Other errors keep the old copy and the raw message.

zh-TW is unchanged: that file uses spaces, and biome would reformat the
whole translation.
2026-10-22 09:09:17 +08:00
CyL d4fe4e5806 perf: bundle flag icons instead of blocking on a CDN (#99)
index.html loaded two jsdelivr stylesheets synchronously in <head>, which
delayed first paint and failed outright on networks where the CDN is
unreachable. Drop font-logos (unused in src/) and bundle flag-icons
locally so Vite hashes the sprites and serves them from our own origin
with immutable cache headers.
2026-10-22 09:08:42 +08:00
Weblate (bot)andLee Vincent 74a52e8cb0 Translations update from Hosted Weblate (#94)
Co-authored-by: Lee Vincent <vincentlee986@gmail.com>
2026-10-04 18:45:36 +08:00
hamster1963 cd070d57da chore: update version to 2.4.3 in package.json 2026-09-14 11:54:31 +08:00
hamster1963 58fd74df14 feat(translations): add support for French, Galician, Indonesian, Japanese, Brazilian Portuguese, Romanian, and Ukrainian languages 2026-09-14 11:38:48 +08:00
hamster1963 3e082beb79 fix(translations): update Indonesian and Brazilian Portuguese translation files 2026-09-14 10:06:17 +08:00
Ryrenz 203438242a feat: show GPU memory under the GPU chart (#92)
Renders state.gpus[i] when the agent provides it, using the existing
formatBytes helper so it reads like the memory card. Older agents omit
the field and nothing changes.

Refs nezhahq/nezha#1235
2026-09-14 10:05:41 +08:00
buri 3dc0830aa5 feat: synchronize background image with active light/dark theme 2026-09-05 13:03:55 -04:00
buri 73822f08eb fix(dashboard): fix Total Domains filtering and theme switching, add form attributes 2026-09-05 12:45:31 -04:00
Bot b1ccf11634 feat: custom domain management, status monitor, and theme/styling integration 2026-09-01 23:51:42 +08:00
Bot 643770318c chore: merge upstream/main into nezha-dash-v1 preserving custom domain and styling features 2026-08-31 02:59:30 +08:00
ba37e11931 Translated using Weblate (Indonesian) (#88)
Currently translated at 100.0% (131 of 131 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 93.8% (123 of 131 strings)




Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/id/
Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/pt_BR/
Translation: Nezha/User frontend

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Co-authored-by: ace-consultoria <erec.novais@aceconsultoria.org>
2026-08-30 23:18:38 +08:00
hamster1963 663afd3b0f chore(translations): update and format translation files for multiple languages 2026-08-09 22:08:16 +08:00
hamster1963 d30da074ae Merge remote-tracking branch 'weblate/main' 2026-08-09 22:06:30 +08:00
ace-consultoria f434098d94 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.0% (102 of 103 strings)

Translation: Nezha/User frontend
Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/pt_BR/
2026-08-07 13:51:40 +00:00
ace-consultoria e6f6614d87 Added translation using Weblate (Portuguese (Brazil)) 2026-08-06 15:30:04 +02:00
dependabot[bot] 24f4af898b chore(deps): bump actions/setup-node from 6 to 7 in the all group (#81)
Bumps the all group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-node` from 6 to 7
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-03 10:50:38 +08:00
iridium 24aa81de3d Translated using Weblate (French)
Currently translated at 7.7% (8 of 103 strings)

Translation: Nezha/User frontend
Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/fr/
2026-07-25 14:01:46 +02:00
hamster1963 e0e90ac600 fix: remove @tanstack/react-virtual 2026-07-13 09:50:34 +08:00
hamster1963 fc29ca7532 chore(deps): upgrade typescript to version 7.0.2 in package.json and pnpm-lock.yaml 2026-07-12 00:45:22 +08:00
hamster1963 7821ce1131 feat: enhance server handling and add empty state messaging in Server component 2026-07-12 00:41:56 +08:00
jiyuu 6356d472a7 Translated using Weblate (Japanese)
Currently translated at 18.4% (19 of 103 strings)

Translation: Nezha/User frontend
Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/ja/
2026-07-11 11:01:20 +02:00
hamster1963 27d8d3f572 chore(deps): update vite to version 8.1.3 and related dependencies in lockfile 2026-07-05 13:46:34 +08:00
hamster1963 7424b2bfde refactor: remove @numeric-text/react dependency and implement NumericText component 2026-07-05 13:43:41 +08:00
hamster1963 056c357b6e feat: implement backend error handling and improve error messaging in Server component 2026-07-05 13:17:36 +08:00
hamster1963 d295d549da refactor: optimize ServerDetail loading and update MapTooltip positioning logic 2026-07-05 04:19:39 +08:00
hamster1963 6c7ba30cee feat: refactor DashCommand to use useMemo for shortcuts and server commands
feat: optimize GlobalMap component with useMemo for country data processing

feat: enhance ServerCard and ServerCardInline components with memoization

feat: improve ServiceTracker component by processing service data with useMemo

feat: add VirtualServerList component for efficient rendering of server lists

refactor: update Servers page to utilize VirtualServerList for better performance

test: add tests for DashCommand and GlobalMap components, including virtualization checks
2026-07-05 04:09:22 +08:00
hamster1963 8f3a2f3eb3 chore(deps): update @radix-ui/react-dialog, react-router-dom, @tailwindcss/postcss, @vitejs/plugin-react, tailwindcss, and vite to latest versions 2026-07-02 17:47:22 +08:00
Copilot 9f2f6d9d29 Set build target to safari15 for iOS Safari compatibility (#76)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-02 17:44:52 +08:00
仓鼠 8d58f41856 Implement scroll position management for navigation (#73)
* feat: implement scroll position management for main page navigation

* fix: import saveMainPageScrollPosition in ServerCard and ServerCardInline components

* feat: save scroll position when navigating to server from DashCommand

* fix: prevent restoring stale scroll positions without main page origin
2026-06-20 16:21:32 +08:00
hamster1963 5a4e47d520 chore(deps): update @radix-ui/react-dialog, react-router-dom, @vitest/coverage-v8, and vitest to latest versions 2026-06-20 00:53:33 +08:00
hamster1963 bdabc0158b feat: integrate NumericText component for improved numeric display in ServerDetailOverview 2026-06-20 00:48:30 +08:00
hamster1963 03977c4b4d refactor: update websocket context to use structured data and lazy load components
- Changed websocket context to use `lastData` instead of `lastMessage` for better type safety and clarity.
- Updated components to handle the new websocket data structure, including `DashCommand`, `Header`, `ServerDetail`, and various chart components.
- Introduced lazy loading for `NotFound`, `ServerDetail`, and `NetworkChart` components to improve performance.
- Added skeleton loading states for `ServerDetail` to enhance user experience during data fetching.
- Updated tests to reflect changes in websocket data handling and component structure.
2026-06-20 00:48:30 +08:00
dependabot[bot] f2b13da7b1 chore(deps): bump actions/checkout from 6 to 7 in the all group (#71)
Bumps the all group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 23:03:21 +08:00
hamster1963 21d60076ce fix(api): enhance token refresh handling with CSRF token support 2026-06-15 18:51:19 +08:00
hamster1963 ea19d3cc27 chore(deps): update tailwindcss and postcss to version 4.3.1 2026-06-15 18:46:36 +08:00
hamster1963 f536d4ecf5 fix(api): implement CSRF token handling for refresh token requests 2026-06-15 18:45:29 +08:00
hamster1963 5720af9108 test: add unit tests for various components and utilities
- Created tests for formatBytes function to ensure correct formatting of byte values.
- Implemented tests for InjectContext to validate resource injection and cleanup.
- Added tests for logo-class helpers to verify platform alias mappings.
- Developed tests for nezha-api functions to check API response handling.
- Introduced tests for static geographic data to validate country coordinates and GeoJSON structure.
- Created comprehensive tests for utility functions including date formatting and public note parsing.
- Added tests for Server page to ensure correct rendering and functionality.
- Implemented tests for simple pages including error handling and navigation.
- Set up testing environment with Vitest and configured coverage reporting.
2026-06-15 11:29:48 +08:00
hamster1963 5670811991 chore(deps): update biome and radix-ui packages to latest versions 2026-06-10 15:21:26 +08:00
hamster1963 a3afa04c69 feat(i18n): add translation for "All" in GroupSwitch component for English, Simplified Chinese, and Traditional Chinese 2026-06-10 15:19:34 +08:00
hamster1963 575c14dfe5 fix: update sort label translation in Servers component 2026-06-10 15:19:20 +08:00
hamster1963 78c412a517 fix: update formatBytes function to return "0 KiB" for zero bytes and streamline size array 2026-06-10 15:04:05 +08:00
hamster1963 6015e616fa feat: add @numeric-text/react for improved numeric display in Header and ServerOverview components 2026-06-10 15:04:00 +08:00