mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 15:05:48 +01:00
✨ Ability to change title and icons
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user