feat: Add log cleanup settings and update localization files

- Introduced log cleanup settings in the admin panel, allowing configuration of automatic log clearing and retention periods.
- Updated English, Spanish, French, German, and other localization files to include new log cleanup settings.
- Added new fields for referral percentage and first purchase only in user settings.
- Implemented API endpoints for getting and updating log settings.
- Enhanced the admin dashboard with a new log cleanup form component.
This commit is contained in:
web
2025-09-01 10:25:04 -07:00
parent d4b37e4997
commit 6ccf9b8bdc
88 changed files with 827 additions and 125 deletions
+30
View File
@@ -6,6 +6,7 @@ import {
deleteNode,
filterNodeList,
filterServerList,
resetSortWithNode,
toggleNodeStatus,
updateNode,
} from '@/services/admin/server';
@@ -235,6 +236,35 @@ export default function NodesPage() {
];
},
}}
onSort={async (source, target, items) => {
const sourceIndex = items.findIndex((item) => String(item.id) === source);
const targetIndex = items.findIndex((item) => String(item.id) === target);
const originalSorts = items.map((item) => item.sort);
const [movedItem] = items.splice(sourceIndex, 1);
items.splice(targetIndex, 0, movedItem!);
const updatedItems = items.map((item, index) => {
const originalSort = originalSorts[index];
const newSort = originalSort !== undefined ? originalSort : item.sort;
return { ...item, sort: newSort };
});
const changedItems = updatedItems.filter((item, index) => {
return item.sort !== items[index]?.sort;
});
if (changedItems.length > 0) {
resetSortWithNode({
sort: changedItems.map((item) => ({
id: item.id,
sort: item.sort,
})) as API.SortItem[],
});
}
return updatedItems;
}}
/>
);
}