feat: redesign /logs page with table UI and date range filter

- Replace timeline view with table layout (Time, Operator, Type, Message)
- Add date range filter using @mantine/dates DatePickerInput
- Add SegmentedControl for log type filter
- Disable App Logs and Settings menu on /dev
- Remove Activity Logs menu from /dev (moved to /logs)
- Add dateFrom/dateTo query params to /api/logs backend
- Import @mantine/dates/styles.css to fix datepicker styling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-29 11:27:05 +08:00
parent 6b6e3f3430
commit 3c6fac1943
7 changed files with 164 additions and 253 deletions

View File

@@ -109,11 +109,11 @@ const navItems = [
{ label: 'Overview', icon: TbLayoutDashboard, key: 'overview' },
{ label: 'Operators', icon: TbUsers, key: 'operators' },
{ label: 'Bugs', icon: TbBug, key: 'bugs' },
{ label: 'App Logs', icon: TbServer, key: 'app-logs' },
{ label: 'Activity Logs', icon: TbActivity, key: 'activity-logs' },
{ label: 'App Logs', icon: TbServer, key: 'app-logs', disabled: true },
// { label: 'Activity Logs', icon: TbActivity, key: 'activity-logs' },
{ label: 'Database', icon: TbDatabase, key: 'database' },
{ label: 'Project', icon: TbSitemap, key: 'project' },
{ label: 'Settings', icon: TbSettings, key: 'settings' },
// { label: 'Settings', icon: TbSettings, key: 'settings' },
]
function DevPage() {
@@ -204,7 +204,8 @@ function DevPage() {
variant={active === item.key ? 'filled' : 'subtle'}
color={active === item.key ? 'blue' : 'gray'}
size="lg"
onClick={() => setActive(item.key)}
disabled={item.disabled}
onClick={() => !item.disabled && setActive(item.key)}
>
<Icon size={18} />
</ActionIcon>
@@ -218,7 +219,8 @@ function DevPage() {
leftSection={<Icon size={16} />}
rightSection={active === item.key ? <TbChevronRight size={14} /> : undefined}
active={active === item.key}
onClick={() => setActive(item.key)}
disabled={item.disabled}
onClick={() => !item.disabled && setActive(item.key)}
style={{ borderRadius: 6 }}
/>
)