feat(group): add node group management UI

Add node group management interface with automatic user assignment and traffic-based grouping.

Features:
- Node group CRUD with traffic range configuration
- Three grouping modes: average, subscription-based, and traffic-based
- Group recalculation with preview and history tracking
- Subscribe-to-group mapping management
- User subscription group locking
- Group calculation history with detailed reports
- Multi-language support (en-US, zh-CN)
- Enhanced node and subscription forms with group selection
This commit is contained in:
EUForest
2026-03-08 23:39:30 +08:00
parent dc55d85056
commit ae31019477
55 changed files with 6249 additions and 262 deletions
+13 -1
View File
@@ -24,8 +24,20 @@ export function differenceInDays(date1: Date, date2: Date): number {
export function formatDate(date?: Date | number, showTime = true) {
if (!date) return;
// 如果是数字(Unix时间戳),需要判断是秒级还是毫秒级
// Unix时间戳(秒级):10位数字,如 1771936457
// JavaScript时间戳(毫秒级):13位数字
let dateValue = date;
if (typeof date === "number") {
// 如果小于 10000000000(100亿),认为是秒级时间戳,需要乘以1000
if (date < 10000000000) {
dateValue = date * 1000;
}
}
const timeZone = localStorage.getItem("timezone") || "UTC";
return intlFormat(date, {
return intlFormat(dateValue, {
year: "numeric",
month: "numeric",
day: "numeric",