refactor(backend): clean up models setup, improve ip utils, add adr docs
- Extract ADR documents for architectural decisions (SQLite, FastAPI, React, APScheduler, Scheduler) - Refactor setup.py: improve code structure and readability - Add IP validation utilities with test coverage - Update frontend components (BanTable, HistoryPage) - Add pre-commit hooks and CONTRIBUTING.md - Add .editorconfig for consistent coding standards
This commit is contained in:
@@ -241,6 +241,7 @@ export const BanTable = memo(function BanTable({ timeRange, origin, source }: Ba
|
||||
items={banItems}
|
||||
columns={banColumns}
|
||||
getRowId={(item: DashboardBanItem) => `${item.ip}:${item.jail}:${item.banned_at}`}
|
||||
aria-label="Ban records table"
|
||||
>
|
||||
<DataGridHeader>
|
||||
<DataGridRow>
|
||||
|
||||
@@ -360,6 +360,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
onClick={(): void => {
|
||||
setCurrentPage(currentPage - 1);
|
||||
}}
|
||||
aria-label="Previous page"
|
||||
/>
|
||||
<Text size={200}>
|
||||
Page {String(currentPage)} / {String(totalPages)}
|
||||
@@ -372,6 +373,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
onClick={(): void => {
|
||||
setCurrentPage(currentPage + 1);
|
||||
}}
|
||||
aria-label="Next page"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user