Code refactoring, renabled app title customization.
With React 19 header title API title doesn't need react-helmet anymore :)
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { ThemeProvider } from '@emotion/react'
|
import { ThemeProvider } from '@emotion/react'
|
||||||
import ArchiveIcon from '@mui/icons-material/Archive'
|
|
||||||
import CloudDownloadIcon from '@mui/icons-material/CloudDownload'
|
|
||||||
import ChevronLeft from '@mui/icons-material/ChevronLeft'
|
import ChevronLeft from '@mui/icons-material/ChevronLeft'
|
||||||
|
import CloudDownloadIcon from '@mui/icons-material/CloudDownload'
|
||||||
import Dashboard from '@mui/icons-material/Dashboard'
|
import Dashboard from '@mui/icons-material/Dashboard'
|
||||||
import LiveTvIcon from '@mui/icons-material/LiveTv'
|
import LiveTvIcon from '@mui/icons-material/LiveTv'
|
||||||
import Menu from '@mui/icons-material/Menu'
|
import Menu from '@mui/icons-material/Menu'
|
||||||
@@ -17,7 +16,8 @@ import ListItemIcon from '@mui/material/ListItemIcon'
|
|||||||
import ListItemText from '@mui/material/ListItemText'
|
import ListItemText from '@mui/material/ListItemText'
|
||||||
import Toolbar from '@mui/material/Toolbar'
|
import Toolbar from '@mui/material/Toolbar'
|
||||||
import Typography from '@mui/material/Typography'
|
import Typography from '@mui/material/Typography'
|
||||||
import { grey, red } from '@mui/material/colors'
|
import { grey } from '@mui/material/colors'
|
||||||
|
import { useAtomValue } from 'jotai'
|
||||||
import { useMemo, useState } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
import { Link, Outlet } from 'react-router-dom'
|
import { Link, Outlet } from 'react-router-dom'
|
||||||
import { settingsState } from './atoms/settings'
|
import { settingsState } from './atoms/settings'
|
||||||
@@ -29,7 +29,6 @@ import SocketSubscriber from './components/SocketSubscriber'
|
|||||||
import ThemeToggler from './components/ThemeToggler'
|
import ThemeToggler from './components/ThemeToggler'
|
||||||
import { useI18n } from './hooks/useI18n'
|
import { useI18n } from './hooks/useI18n'
|
||||||
import Toaster from './providers/ToasterProvider'
|
import Toaster from './providers/ToasterProvider'
|
||||||
import { useAtomValue } from 'jotai'
|
|
||||||
import { getAccentValue } from './utils'
|
import { getAccentValue } from './utils'
|
||||||
|
|
||||||
export default function Layout() {
|
export default function Layout() {
|
||||||
@@ -58,6 +57,7 @@ export default function Layout() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
|
<title>{settings.appTitle}</title>
|
||||||
<SocketSubscriber />
|
<SocketSubscriber />
|
||||||
<Box sx={{ display: 'flex' }}>
|
<Box sx={{ display: 'flex' }}>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const ExtraDownloadOptions: React.FC = () => {
|
|||||||
autoHighlight
|
autoHighlight
|
||||||
defaultValue={
|
defaultValue={
|
||||||
customTemplates
|
customTemplates
|
||||||
.filter(({ id, name }) => id === "0" || name === "default")
|
.filter(({ id, name }) => id === "0" || name.toLowerCase() === "default")
|
||||||
.map(({ name, content }) => ({ label: name, content }))
|
.map(({ name, content }) => ({ label: name, content }))
|
||||||
.at(0)
|
.at(0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,6 @@ export default function Settings() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} md={12}>
|
<Grid item xs={12} md={12}>
|
||||||
<TextField
|
<TextField
|
||||||
disabled={reverseProxy}
|
|
||||||
fullWidth
|
fullWidth
|
||||||
label={i18n.t('appTitle')}
|
label={i18n.t('appTitle')}
|
||||||
defaultValue={appTitle}
|
defaultValue={appTitle}
|
||||||
|
|||||||
Reference in New Issue
Block a user