Merge pull request #50 from walkxcode/devel

Multiple QoL updates!
This commit is contained in:
Aj - Thomas
2022-05-12 14:19:42 +02:00
committed by GitHub
8 changed files with 171 additions and 50 deletions

View File

@@ -73,11 +73,7 @@ export default function AddItemShelfItem(props: any) {
}
function MatchIcon(name: string, form: any) {
// TODO: In order to avoid all the requests, we could fetch
// https://data.jsdelivr.com/v1/package/gh/IceWhaleTech/AppIcon@main
// and then iterate over the files -> files -> name and then remove the extension (.png)
// Compare it to the input and then fetch the icon
fetch(`https://cdn.jsdelivr.net/gh/IceWhaleTech/AppIcon@main/all/${name.toLowerCase()}.png`)
fetch(`https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name.replace(/\s+/g, '-').toLowerCase()}.png`)
.then((res) => {
if (res.status === 200) {
form.setFieldValue('icon', res.url);
@@ -89,7 +85,7 @@ function MatchIcon(name: string, form: any) {
return false;
}
export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & any) {
const { setOpened } = props;
const { addService, config, setConfig } = useConfig();

View File

@@ -60,7 +60,7 @@ export function Footer({ links }: FooterCenteredProps) {
>
<Group className={classes.links}>{items}</Group>
<Group spacing="xs" position="right" noWrap>
<ActionIcon<'a'> component="a" href="https://github.com/ajnart/myhomepage" size="lg">
<ActionIcon<'a'> component="a" href="https://github.com/ajnart/homarr" size="lg">
<BrandGithub size={18} />
</ActionIcon>
</Group>

View File

@@ -2,14 +2,9 @@ import { Text } from '@mantine/core';
import * as React from 'react';
export function Logo({ style }: any) {
return (
<Text
sx={style}
weight="bold"
variant="gradient"
gradient={{ from: 'red', to: 'orange', deg: 145 }}
>
MyHomePage
</Text>
);
return (
<Text sx={style} weight="bold" variant="gradient" gradient={{ from: 'red', to: 'orange', deg: 145 }}>
Homarr
</Text>
);
}