feat: configurable favicon service URL (#659)
This commit is contained in:
parent
e544c0a801
commit
f8cca5522f
28 changed files with 151 additions and 20 deletions
33
src/pages/secondary/SystemSettingsPage/index.tsx
Normal file
33
src/pages/secondary/SystemSettingsPage/index.tsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { DEFAULT_FAVICON_URL_TEMPLATE } from '@/constants'
|
||||
import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
|
||||
import { useContentPolicy } from '@/providers/ContentPolicyProvider'
|
||||
import { forwardRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const SystemSettingsPage = forwardRef(({ index }: { index?: number }, ref) => {
|
||||
const { t } = useTranslation()
|
||||
const { faviconUrlTemplate, setFaviconUrlTemplate } = useContentPolicy()
|
||||
|
||||
return (
|
||||
<SecondaryPageLayout ref={ref} index={index} title={t('System')}>
|
||||
<div className="space-y-4 mt-3">
|
||||
<div className="px-4 space-y-2">
|
||||
<Label htmlFor="favicon-url" className="text-base font-normal">
|
||||
{t('Favicon URL')}
|
||||
</Label>
|
||||
<Input
|
||||
id="favicon-url"
|
||||
type="text"
|
||||
value={faviconUrlTemplate}
|
||||
onChange={(e) => setFaviconUrlTemplate(e.target.value)}
|
||||
placeholder={DEFAULT_FAVICON_URL_TEMPLATE}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</SecondaryPageLayout>
|
||||
)
|
||||
})
|
||||
SystemSettingsPage.displayName = 'SystemSettingsPage'
|
||||
export default SystemSettingsPage
|
||||
Loading…
Add table
Add a link
Reference in a new issue