Commit Graph

137 Commits

Author SHA1 Message Date
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
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
UUBulb 0a6b1c671f fix ws protocol (#117) 2025-02-07 22:16:45 +08:00
UUBulb 9b63e4fbda bug fixes (#116)
* bug fixes

* fix ws url
2025-02-05 18:46:42 +08:00
UUBulb dfe7d57ea4 feat: batch set server config (#114)
* feat: batch set server config

* make every field optional

* chore: auto-fix linting and formatting issues

* update

* [WIP] improve batch edit ux

* chore: auto-fix linting and formatting issues
2025-02-04 11:19:52 +08:00
Weblate (bot) 38c3467106 Translated using Weblate (Chinese (Traditional Han script)) (#113)
Currently translated at 100.0% (177 of 177 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (177 of 177 strings)


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

Co-authored-by: UUBulb <uub@kuzu.uk>
2025-02-04 11:14:58 +08:00
UUBulb a794b6dd31 feat: edit server config online (#112)
* feat: edit server config online

* fix schema

* fix error
2025-01-31 13:32:16 +08:00
UUBulb 42b85f74a9 ddns: allow overriding domains per configuration (#111) 2025-01-30 12:15:21 +08:00
UUBulb 0ba41828dd minor bug fixes (#110) 2025-01-29 15:07:20 +08:00
naiba 30ae419cbd feat: disable nat 2025-01-21 22:21:52 +08:00
Weblate (bot) 0d275084d9 Translated using Weblate (German) (#107)
Currently translated at 100.0% (175 of 175 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 99.4% (174 of 175 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (175 of 175 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (175 of 175 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (175 of 175 strings)

Added translation using Weblate (Tamil)





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

Co-authored-by: Barium <peter.kuehfuss+weblate@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-01-21 20:47:01 +08:00
UUBulb 7bdbbe6eaf fix: prevent null dereferences (#106) 2025-01-20 22:08:18 +08:00
Weblate (bot) 478ee8b7e6 Translated using Weblate (Chinese (Traditional Han script)) (#105)
Currently translated at 99.4% (174 of 175 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (175 of 175 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (175 of 175 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (175 of 175 strings)

Added translation using Weblate (Tamil)




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

Co-authored-by: UUBulb <uub@kuzu.uk>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-01-20 22:07:57 +08:00
UUBulb ff11783945 chore: update translations (#101)
* chore: update translations

* fix: form values type conversion

* feat: terminal fullscreen mode

* fix
2025-01-19 21:09:52 +08:00
UUBulb 53a937af4b fix(fm): close dialog after upload completed (#97) 2025-01-07 19:54:47 +08:00
仓鼠 fb681b6470 fix: Fix login provider button gap (#94)
* fix: oauth2_providers button gap

* fix: remove test code
2025-01-06 21:02:58 +08:00
UUBulb a45e789178 improve: replace long line of words with clipboard button (#95)
* improve: replace long line of words with clipboard button

* change module path
2025-01-06 21:02:39 +08:00
仓鼠 b643a5d86f feat: add back to home link on mobile (#93) 2025-01-05 22:56:19 +08:00
仓鼠 f667f6baa9 fix: back to home page redirect (#90) 2025-01-04 20:47:37 +08:00
UUBulb 2d7c41a5b2 update waf api (#91) 2025-01-04 20:47:14 +08:00
仓鼠 231f483876 feat: menu add back to home item (#89)
* feat: menu add back to home item

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
2025-01-04 18:42:58 +08:00
UUBulb f93d266810 improve: add missing try-catch cases (#86)
* improve: add missing try-catch cases

* i18n: support german

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
2025-01-03 22:43:36 +08:00
仓鼠 290459997c fix: footer year text (#88)
* fix: footer year text

* fix: oauth2 list add space

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
2025-01-03 22:43:00 +08:00
Weblate (bot) 367e9ee46d Translated using Weblate (German) (#87)
Currently translated at 100.0% (171 of 171 strings)



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

Co-authored-by: Barium <peter.kuehfuss+weblate@gmail.com>
2025-01-03 22:42:32 +08:00
Weblate (bot) 840156cfc8 Translated using Weblate (Chinese (Traditional Han script)) (#85)
Currently translated at 100.0% (171 of 171 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (171 of 171 strings)


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

Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-31 23:59:39 +08:00
UUBulb 5517a8df38 update oauth2 (#84)
* update oauth2

* i18n

* fix validation

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
2024-12-31 23:11:41 +08:00
naiba d54372fb0c chore: add type 2024-12-30 21:15:17 +08:00
仓鼠 aaa8baff8f style: login button (#83)
* style: login button

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
2024-12-30 20:45:11 +08:00
UUBulb 01add8b160 optimize fm (#82)
* optimize fm

* chore: auto-fix linting and formatting issues

* fix: type

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
Co-authored-by: naiba <hi@nai.ba>
Co-authored-by: naiba <naiba@users.noreply.github.com>
2024-12-29 22:19:50 +08:00
naiba 97a5deb648 feat: oauth2 登录 2024-12-28 23:50:24 +08:00
Weblate (bot) fbf931293e Translated using Weblate (German) (#77)
Currently translated at 100.0% (170 of 170 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (170 of 170 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (170 of 170 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (170 of 170 strings)




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

Co-authored-by: Kris <krishoodbyair@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-26 22:31:51 +08:00