feat: set custom footer via config file
This commit is contained in:
1 parent
14daf3cab1
commit
c2fc0ae8ec
3 files changed
+8
-23
No files matched your search
+5
-23
@@ -1,31 +1,13 @@
|
||||
import { Divider, Text } from '@mantine/core'
|
||||
import { Divider } from '@mantine/core'
|
||||
import { pageConfig } from '@/uptime.config'
|
||||
|
||||
export default function Footer() {
|
||||
const defaultFooter = '<p style="text-align: center; font-size: 12px; margin-top: 10px;"> Open-source monitoring and status page powered by <a href="https://github.com/lyc8503/UptimeFlare" target="_blank">Uptimeflare</a>, made with ❤ by <a href="https://github.com/lyc8503" target="_blank">lyc8503</a>. </p>'
|
||||
|
||||
return (
|
||||
<>
|
||||
<Divider mt="lg" />
|
||||
<Text
|
||||
size="xs"
|
||||
mt="xs"
|
||||
mb="xs"
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
Open-source monitoring and status page powered by{' '}
|
||||
<a href="https://github.com/lyc8503/UptimeFlare" target="_blank">
|
||||
Uptimeflare
|
||||
</a>{' '}
|
||||
and{' '}
|
||||
<a href="https://www.cloudflare.com/" target="_blank">
|
||||
Cloudflare
|
||||
</a>
|
||||
, made with ❤ by{' '}
|
||||
<a href="https://github.com/lyc8503" target="_blank">
|
||||
lyc8503
|
||||
</a>
|
||||
.
|
||||
</Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: pageConfig.customFooter ?? defaultFooter }} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -8,6 +8,7 @@ export type PageConfig = {
|
||||
maintenances?: {
|
||||
upcomingColor?: string
|
||||
}
|
||||
customFooter?: string
|
||||
}
|
||||
|
||||
export type MaintenanceConfig = {
|
||||
|
||||
@@ -24,6 +24,8 @@ const pageConfig: PageConfig = {
|
||||
// Active alerts will always use the color specified in the MaintenanceConfig
|
||||
upcomingColor: 'gray',
|
||||
},
|
||||
// [OPTIONAL] Custom footer html
|
||||
// customFooter: '',
|
||||
}
|
||||
|
||||
const workerConfig: WorkerConfig = {
|
||||
|
||||
Reference in new issue
Block a user