Skip to content

Commit

Permalink
Apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
viown committed Jan 16, 2025
1 parent 1dede0c commit 11da131
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/apps/dashboard/features/logs/components/LogItemList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { FunctionComponent } from 'react';
import type { LogFile } from '@jellyfin/sdk/lib/generated-client/models/log-file';
import { List, ListItem, ListItemButton, ListItemText } from '@mui/material';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemText from '@mui/material/ListItemText';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import { useApi } from 'hooks/useApi';
import datetime from 'scripts/datetime';

Expand All @@ -11,6 +15,7 @@ type LogItemProps = {
const LogItemList: FunctionComponent<LogItemProps> = ({ logs }: LogItemProps) => {
const { api } = useApi();

// TODO: Use getUri from TS SDK once available.
const getLogFileUrl = (logFile: LogFile) => {
if (!api) return '';

Expand Down Expand Up @@ -39,6 +44,7 @@ const LogItemList: FunctionComponent<LogItemProps> = ({ logs }: LogItemProps) =>
secondary={getDate(log)}
secondaryTypographyProps={{ variant: 'body1' }}
/>
<OpenInNewIcon />
</ListItemButton>
</ListItem>
);
Expand Down
11 changes: 9 additions & 2 deletions src/apps/dashboard/routes/logs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { getConfigurationApi } from '@jellyfin/sdk/lib/utils/api/configuration-a
import Loading from 'components/loading/LoadingComponent';
import Page from 'components/Page';
import globalize from 'lib/globalize';
import { Alert, Box, Button, FormControlLabel, Stack, Switch, TextField, Typography } from '@mui/material';
import Alert from '@mui/material/Alert';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import FormControlLabel from '@mui/material/FormControlLabel';
import Stack from '@mui/material/Stack';
import Switch from '@mui/material/Switch';
import TextField from '@mui/material/TextField';
import Typography from '@mui/material/Typography';
import { type ActionFunctionArgs, Form, useActionData } from 'react-router-dom';
import ServerConnections from 'components/ServerConnections';
import { useServerLogs } from 'apps/dashboard/features/logs/api/useServerLogs';
Expand Down Expand Up @@ -121,7 +128,7 @@ const Logs = () => {
</Button>
</Stack>
</Form>
<Box className='serverLogs readOnlyContent' sx={{ mt: 1 }}>
<Box className='serverLogs readOnlyContent' sx={{ mt: 3 }}>
<LogItemList logs={logs} />
</Box>
</Box>
Expand Down

0 comments on commit 11da131

Please sign in to comment.