Ability to change title and icons

This commit is contained in:
Aimsucks
2022-06-07 00:07:56 +00:00
parent 7935fb6616
commit 6af5166aa5
7 changed files with 174 additions and 86 deletions

View File

@@ -1,13 +1,16 @@
import { Group, Image, Text } from '@mantine/core';
import { NextLink } from '@mantine/next';
import * as React from 'react';
import { useConfig } from '../../tools/state';
export function Logo({ style }: any) {
const { config } = useConfig();
return (
<Group spacing="xs">
<Image
width={50}
src="/imgs/logo.png"
src={config.logo ?? "/imgs/logo.png"}
style={{
position: 'relative',
}}
@@ -25,7 +28,8 @@ export function Logo({ style }: any) {
variant="gradient"
gradient={{ from: 'red', to: 'orange', deg: 145 }}
>
Homarr
{/* Added the .replace to remove emojis because they get screwed up by the gradient */}
{config.title.replace(/([\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g, '') ?? "Homarr"}
</Text>
</NextLink>
</Group>