Commit Graph

166 Commits

Author SHA1 Message Date
Bot 825bcb08f4 feat: add Sync WHOIS button and API integration 2026-04-16 23:08:56 +08:00
Bot cd3b8fdf91 fix: relax URL validation to allow Bot Tokens and SMTP hosts 2026-04-16 21:56:56 +08:00
Bot 48ccde053b feat: specialized UI labels for Telegram notification type 2026-04-16 21:43:50 +08:00
Bot d9ec7c362c feat: add billing UI, SMTP support and expiry settings 2026-04-16 21:36:55 +08:00
Bot 53cb369e4a feat: add inputs for custom branding and background images in Settings 2026-04-16 17:18:49 +08:00
Bot 0f8e9e25fe fix: bypass react-hook-form type mismatches with any casts in ServerCard 2026-04-16 16:47:33 +08:00
Bot 06762437fa fix: correct nzcfg.html URL to /dashboard prefix for proper backend routing 2026-04-16 16:39:39 +08:00
Bot b81d0fe9fc Integrate interactive visual configuration generator (nzcfg) into Server public note form 2026-04-16 16:21:47 +08:00
Bot 8733070cf1 Fix ts configuration and missing fragment in server route after terminal removal 2026-04-16 16:21:40 +08:00
Bot a4dc173fcc Remove SSH terminal functionality for security reasons 2026-04-16 16:21:35 +08:00
Buriburizaemon e848a34fe7 Merge upstream/main 2026-04-16 11:52:58 +08:00
Weblate (bot) f4696421ec Translated using Weblate (Indonesian) (#156)
Currently translated at 100.0% (245 of 245 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/id/
Translation: Nezha/Admin frontend

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
2026-04-05 09:58:43 +08:00
naiba 341a6fa666 fix: use Combobox for notification group selection in settings page
Settings page used a plain number input for ip_change_notification_group_id,
requiring users to manually enter a group ID. Replace it with a searchable
Combobox component (consistent with alert-rule/service/cron pages) and wrap
the settings route with NotificationProvider to load notification group data.

Closes nezhahq/nezha#1174

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-03-01 01:11:37 +00:00
Weblate (bot) 4f6e6d1a21 Translated using Weblate (Ukrainian) (#155)
Currently translated at 49.7% (122 of 245 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/uk/
Translation: Nezha/Admin frontend

Co-authored-by: Руслан Пузич <visp80@gmail.com>
2026-02-22 21:45:21 +08:00
Weblate (bot) 0bdb63cb20 Translated using Weblate (Galician) (#153)
Currently translated at 7.7% (19 of 245 strings)

Added translation using Weblate (Galician)

Translated using Weblate (Spanish)

Currently translated at 100.0% (244 of 244 strings)



Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/es/
Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/gl/
Translation: Nezha/Admin frontend

Co-authored-by: nlimeres <dynosaurioprogramador@gmail.com>
2026-02-19 14:34:50 +08:00
奶爸 d04c4a1784 fix: public_note validation rejects non-object JSON values, preventing second edit (#154)
Co-authored-by: naiba <naiba@users.noreply.github.com>
2026-02-19 14:30:10 +08:00
UUBulb 2fe19adb96 fix: downgrade tailwindcss to v3 (#151)
* fix: downgrade tailwindcss to v3

* chore: auto-fix linting and formatting issues
2026-02-14 18:06:12 +08:00
naiba 84ba33dac3 fix: server edit dialog submit button unresponsive after first save (#1132)
Upgrade react-hook-form 7.63→7.71 to fix form.reset() race condition
that silently broke zod validation on subsequent submissions.

Reset form and public-note state (publicNoteObj/Raw/Mode/Errors)
from latest data when the edit dialog opens, preventing stale state
from a previous edit session.
2026-02-14 12:11:47 +08:00
胡说丷刂 ff231da753 service 增加权重 (#150)
* 服务增加权重

* 避免显示成 undefined

---------

Co-authored-by: huYang <306061454@qq.com>
2026-02-14 10:10:24 +08:00
UUBulb 78c63bce33 fix: variable not renamed (#148) 2026-01-10 20:22:13 +08:00
UUBulb b4221213a0 feat(notification): add option to convert metric units in request body (#147)
* feat(notification): add option to convert metric units in request body

* rename fields

* add prettierignore

* chore: auto-fix linting and formatting issues
2026-01-10 17:27:13 +08:00
naiba f5fd7c390c fix: immutable release 2026-01-01 11:58:11 +08:00
Weblate (bot) 878cef08ad Translated using Weblate (Ukrainian) (#145)
Currently translated at 34.8% (85 of 244 strings)

Added translation using Weblate (Ukrainian)



Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/uk/
Translation: Nezha/Admin frontend

Co-authored-by: Руслан Пузич <visp80@gmail.com>
2026-01-01 10:32:17 +08:00
Weblate (bot) 6e7fca8c7d Added translation using Weblate (Japanese) (#142)
Co-authored-by: Zilong Liu <2821624044@qq.com>
2025-10-26 21:32:10 +08:00
naiba 1a7e2ad37a chore: fix import 2025-10-09 09:48:07 +08:00
Chillln e783692ac9 feat: enhance public notes functionality with flexible options (#141)
* feat: enhance public notes functionality with flexible options

- Make public notes optional to prevent default values causing frontend issues
- Add dual editing modes: raw text editing and custom fields (avoid hardcoded schema)
- Set raw text mode as default, populate input on edit, submit raw text content always
- Add toggle switch: submit raw text when enabled, submit empty & hide controls when disabled
- New records default to disabled public notes; auto-expand on edit based on content

* chore: auto-fix linting and formatting issues

* feat: Add public annotation data structure and utility functions

Implemented Zod validation patterns, default values, parsing functions, and utility functions for public notes, and updated related internationalization text.

* chore: auto-fix linting and formatting issues

* refactor(server): Replace i18n implementation

Replace direct use of i18n.t with react-i18next's useTranslation hook to improve internationalization support.

* refactor(public-note): Optimize data model and validation logic

Removed the pruneEmpty function and simplified the date processing logic, making billingDataMod and planDataMod optional fields. Also optimized the validation logic to handle optional fields.

* chore: auto-fix linting and formatting issues

* fix zod validation & don't write empty values when parsing

* use raw mode if object contains unknown fields

* rename some features

* chore: Update dependency package versions

Upgrade multiple npm dependencies to their latest versions, including react, tailwindcss, and eslint. Ignore lock files.

* fix(server): Fix default value when bill amount is undefined

Changed undefined values ​​for bill amount to the default value "0" to avoid potential null value errors.

---------

Co-authored-by: Guccen <171530509+Chillln@users.noreply.github.com>
Co-authored-by: uubulb <uub@suwako.de>
2025-10-09 09:35:13 +08:00
naiba ec6511bcb8 💩 f*ck react 2025-10-02 17:15:20 +08:00
naiba cb749c6d16 fix: Cannot read properties of undefined (reading 'displayName') 2025-10-02 15:26:31 +08:00
Chillln bb288c554f Fix and update (#139)
* refactor(ui): 统一组件引用类型为ComponentRef

更新所有UI组件中的forwardRef类型,从ElementRef改为ComponentRef以保持一致性
迁移postcss配置至mjs格式并更新依赖版本

* refactor: 优化表单类型定义和验证逻辑

移除自定义的 asOptionalField 工具函数,直接使用 Zod 的 optional() 方法,并明确定义表单数据类型。

* style: 更新UI主题配置和样式变量

将主题风格从default切换为new-york,并重构CSS变量使用OKLCH色彩空间。同时添加tailwindcss-animate插件支持。

* style: 统一页面头部按钮组样式

优化多个页面头部按钮组的布局样式,增加响应式设计和flex-wrap支持

* fix(server): 修复对话框交互问题并优化SWR配置

修复对话框关闭逻辑并阻止外部交互,同时禁用SWR的自动重新验证功能以提升性能。

* feat: 添加日历组件及账单相关国际化

实现基于 react-day-picker 的日历组件,并添加账单管理相关的多语言支持

* style(components): 统一按钮样式并格式化代码

为删除和禁用按钮添加text-white类名,同时调整ServerCard组件中的代码缩进格式。

* perf(build): 优化Vite打包配置与代码分割策略

调整Vite构建配置,改进第三方依赖的分组逻辑并添加UUID支持到安装命令组件

* fix: 修正页面标题翻译不一致问题

将CronPage和ServicePage的标题从"Server"分别改为"Task"和"Service",并优化NotificationGroupPage的按钮组布局。

* fix(auth): 改进登录错误处理和国际化支持

优化登录错误提示,添加多语言支持并移除控制台错误日志。同时修复头部组件透明度样式问题。

* feat: 添加服务器操作下拉菜单

为服务器卡片添加统一的下拉菜单操作入口,整合终端、配置和安装命令功能。

* feat[alert-rule]: 优化告警规则组件性能

重构告警规则组件代码结构,提升渲染效率并减少内存占用。

* docs(i18n): 新增翻译字段

为界面添加"Add"、"Delete"、"AdvancedJSON"和"Save"等关键操作的翻译字段,支持中英文双语显示。

* perf(vite): 优化分包策略以提升构建性能

重构 manualChunks 逻辑,按功能类别分组依赖项,并增加大型库的独立分包规则。

* style: 统一危险操作按钮的文字颜色

在所有确认操作的弹窗按钮中添加白色文字样式,保持视觉一致性。

* fix(components): 调整下拉菜单对齐方式

根据菜单项状态动态设置下拉菜单的对齐方向和起始位置。

* fix(types): 修复在线用户API分页类型

添加ModelOnlineUserApi接口类型,包含分页信息,并移除index.ts中重复的类型定义。

* chore: auto-fix linting and formatting issues

* feat(locales): 添加无过期相关翻译项

为英文和中文翻译文件添加"NoExpiry"、"SetNoExpiry"等无过期相关字段的翻译。

fix(components): 移除重复的图标按钮选项

从IconButton组件中删除重复的"more"图标选项。

* feat(ServerCard): 优化日期选择器并添加下拉提示

为日期选择器添加下拉布局和年份范围限制,并在公共笔记区域增加下拉项生效提示文本。

* chore: auto-fix linting and formatting issues

* style: 优化多个组件的UI交互细节

统一按钮悬停样式并简化国际化文本调用,移除冗余的单位显示和空值判断逻辑。

* refactor(ServerCard): 移除网络路由相关代码

删除 ServerCard 组件中与 plan.networkRoute 相关的字段验证和错误显示逻辑。

* chore: auto-fix linting and formatting issues

* feat(ui): 添加Switch组件并改进服务器表单交互

- 新增Radix UI Switch组件依赖及实现
- 将IPv4/IPv6输入改为开关控件,优化用户体验
- 添加"按量付费"选项和新的翻译字段
- 改进网络路由和备注输入的占位提示
- 修复暗黑模式下的按钮背景色

* style(components): 为禁止按钮添加白色文本样式

* chore: auto-fix linting and formatting issues

* fix(ServerCard): 修复日期选择器样式和滚动问题

调整日期选择器的宽度和高度限制,添加滚动容器以解决内容溢出问题

* refactor(server-config): 简化复选框checked属性的布尔转换

使用!!操作符简化controllerField.value的布尔值转换,使代码更简洁

* feat(国际化): 添加告警规则和搜索框的国际化支持

为告警规则组件添加多语言支持,包括服务器监控选项、忽略提示和示例文本。同时将搜索框的占位文本替换为国际化字段。

* chore: auto-fix linting and formatting issues

* fix(switch): 修正 Switch 组件 ref 类型定义错误

---------

Co-authored-by: Guccen <171530509+Chillln@users.noreply.github.com>
2025-10-02 14:23:11 +08:00
Buriburizaemon ead00a49cf <edit>adjust some settings. 2025-09-13 13:56:50 +08:00
Buriburizaemon 896fd90da3 <edit>Change vite config, to fix css unfind bug. 2025-09-13 10:10:48 +08:00
Buriburizaemon 72e61121c2 <add>Domains support 2025-09-12 23:26:51 +08:00
naiba 875750d74e chore: add locales 2025-08-23 21:09:54 +08:00
Weblate (bot) bb996c481f Translated using Weblate (Chinese (Traditional Han script)) (#137)
Currently translated at 100.0% (181 of 181 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/zh_Hant/
Translation: Nezha/Admin frontend

Co-authored-by: TurboHK <turbohkcoltd@gmail.com>
2025-08-23 21:07:02 +08:00
Weblate (bot) c679a3e9fd Translated using Weblate (French) (#136)
Currently translated at 48.6% (88 of 181 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/fr/
Translation: Nezha/Admin frontend

Co-authored-by: TommyLPB <hcrochetcanard@gmail.com>
2025-08-02 15:53:17 +08:00
Weblate (bot) 8462908e10 Translated using Weblate (French) (#135)
Currently translated at 48.0% (87 of 181 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/fr/
Translation: Nezha/Admin frontend

Co-authored-by: TommyLPB <hcrochetcanard@gmail.com>
2025-07-27 10:10:09 +08:00
Weblate (bot) 5d37614543 Translated using Weblate (French) (#133)
Currently translated at 25.9% (47 of 181 strings)

Added translation using Weblate (French)

Translated using Weblate (Indonesian)

Currently translated at 9.9% (18 of 181 strings)




Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/fr/
Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/id/
Translation: Nezha/Admin frontend

Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
Co-authored-by: TommyLPB <hcrochetcanard@gmail.com>
2025-07-25 21:46:13 +08:00
naiba 5f854c3dd0 feat: 批量转移服务器给其他用户 2025-06-16 23:44:30 +08:00
Weblate (bot) bf7c42e4e7 Added translation using Weblate (Indonesian) (#132)
Translated using Weblate (Spanish)

Currently translated at 100.0% (180 of 180 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (180 of 180 strings)




Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/es/
Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/zh_Hans/
Translation: Nezha/Admin frontend

Co-authored-by: Kris <krishoodbyair@gmail.com>
Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
2025-06-08 00:49:08 +08:00
TomyJan 41f62d8cd7 feat: separate real ip header of frontend/agent (#130)
* feat: separate real ip header of frontend/agent

* test(ci): test

* Revert "test(ci): test"

This reverts commit 7d2f16ed24e5f95f6101dc3ac67816ece2dc5ade.

* chore: auto-fix linting and formatting issues
2025-04-13 18:40:35 +08:00
naiba 833d2d904c chore(i18n): add locale config options 2025-03-29 13:21:14 +08:00
Weblate (bot) 3c3e8771dc Translated using Weblate (Spanish) (#128)
Currently translated at 96.1% (173 of 180 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/es/
Translation: Nezha/Admin frontend

Co-authored-by: Andres Pava <hola@andrespava.com>
2025-03-29 11:27:36 +08:00
naiba 0e4986cf92 feat(i18n): add locales 2025-03-27 19:11:56 +08:00
UUBulb f5c8131a2c fix config pusher (#127)
* fix config pusher

* chore: auto-fix linting and formatting issues
2025-03-25 22:40:56 +08:00
naiba f85cc2fde3 chore: update locale 2025-03-22 22:37:01 +08:00
Weblate (bot) 2553990aa1 Translated using Weblate (Russian) (#126)
Currently translated at 100.0% (180 of 180 strings)

Added translation using Weblate (Russian)



Translate-URL: https://hosted.weblate.org/projects/nezha/admin-frontend/ru/
Translation: Nezha/Admin frontend

Co-authored-by: bios let <bioslet@gmail.com>
2025-03-22 22:33:15 +08:00
Moraxyc 0a6e2b019d fix(deps): upgrade next-themes to ^0.4.6 for React 19 compatibility (#125)
Upgraded `next-themes` from `^0.3.0` to `^0.4.6` to resolve compatibility issues with React 19.
The previous version (`0.3.0`) does not support React 19, which caused conflicts.

Changes:
- Updated `package.json` dependency: `"next-themes": "^0.4.6"`
- `bun.lockb` updated accordingly.
2025-03-16 12:09:14 +08:00
UUBulb bf43adffe5 update setting api (#123) 2025-03-08 18:42:55 +08:00
UUBulb 1ee664f09b update settings api (#121)
* update settings api

* chore: auto-fix linting and formatting issues
2025-02-28 22:00:07 +08:00
UUBulb 41d4d7fc69 chore: correct cron experssion placeholder (#120) 2025-02-20 22:57:08 +08:00