mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Apply review feedback
This commit is contained in:
parent
1dede0ce2b
commit
11da1312ce
2 changed files with 16 additions and 3 deletions
|
@ -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';
|
||||
|
||||
|
@ -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 '';
|
||||
|
||||
|
@ -39,6 +44,7 @@ const LogItemList: FunctionComponent<LogItemProps> = ({ logs }: LogItemProps) =>
|
|||
secondary={getDate(log)}
|
||||
secondaryTypographyProps={{ variant: 'body1' }}
|
||||
/>
|
||||
<OpenInNewIcon />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
);
|
||||
|
|
|
@ -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';
|
||||
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue