Compare commits

...

6 Commits

Author SHA1 Message Date
Thomas Camlong
03e14ce3ce 🚀 Patch v0.9.2 : Small bug fixes and corrections 2022-08-12 15:38:33 +02:00
Thomas Camlong
d51de68ef3 Merge branch 'master' into dev 2022-08-12 15:37:44 +02:00
ajnart
090ae0e205 🔖 Bumb version to patch v0.9.2 2022-08-12 15:36:56 +02:00
ajnart
7ba27ef9f1 Add Dashdot name indicator 2022-08-12 15:30:53 +02:00
ajnart
48e1808992 🐛 Fix a bug with the openedUrl
Fixes #337
2022-08-12 15:09:45 +02:00
ajnart
85b1a2d7da 🐛 Fixing bug with image display
Fixes #336
2022-08-12 15:07:43 +02:00
5 changed files with 36 additions and 32 deletions

View File

@@ -1,2 +1,2 @@
export const REPO_URL = 'ajnart/homarr'; export const REPO_URL = 'ajnart/homarr';
export const CURRENT_VERSION = 'v0.9.1'; export const CURRENT_VERSION = 'v0.9.2';

View File

@@ -1,6 +1,6 @@
{ {
"name": "homarr", "name": "homarr",
"version": "0.9.1", "version": "0.9.2",
"description": "Homarr - A homepage for your server.", "description": "Homarr - A homepage for your server.",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

View File

@@ -172,6 +172,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
onSubmit={form.onSubmit(() => { onSubmit={form.onSubmit(() => {
const newForm = { ...form.values }; const newForm = { ...form.values };
if (newForm.newTab === true) newForm.newTab = undefined; if (newForm.newTab === true) newForm.newTab = undefined;
if (newForm.openedUrl === '') newForm.openedUrl = undefined;
if (newForm.category === null) newForm.category = undefined; if (newForm.category === null) newForm.category = undefined;
if (newForm.status.length === 1 && newForm.status[0] === '200') { if (newForm.status.length === 1 && newForm.status[0] === '200') {
delete newForm.status; delete newForm.status;

View File

@@ -6,12 +6,12 @@ import {
Center, Center,
createStyles, createStyles,
useMantineColorScheme, useMantineColorScheme,
Image,
} from '@mantine/core'; } from '@mantine/core';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { useState } from 'react'; import { useState } from 'react';
import { useSortable } from '@dnd-kit/sortable'; import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities'; import { CSS } from '@dnd-kit/utilities';
import Image from 'next/image';
import { serviceItem } from '../../tools/types'; import { serviceItem } from '../../tools/types';
import PingComponent from '../../modules/ping/PingModule'; import PingComponent from '../../modules/ping/PingModule';
import AppShelfMenu from './AppShelfMenu'; import AppShelfMenu from './AppShelfMenu';
@@ -125,13 +125,11 @@ export function AppShelfItem(props: any) {
target={service.newTab === false ? '_top' : '_blank'} target={service.newTab === false ? '_top' : '_blank'}
> >
<Image <Image
style={{ styles={{ root: { cursor: 'pointer' } }}
cursor: 'pointer',
}}
width={80} width={80}
height={80} height={80}
src={service.icon} src={service.icon}
objectFit="contain" fit="contain"
/> />
</Anchor> </Anchor>
</motion.i> </motion.i>

View File

@@ -1,4 +1,4 @@
import { createStyles, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { createStyles, Stack, Title, useMantineColorScheme, useMantineTheme } from '@mantine/core';
import { IconCalendar as CalendarIcon } from '@tabler/icons'; import { IconCalendar as CalendarIcon } from '@tabler/icons';
import axios from 'axios'; import axios from 'axios';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
@@ -214,30 +214,35 @@ export function DashdotComponent() {
</div> </div>
{graphs.map((graph) => ( {graphs.map((graph) => (
<iframe <Stack>
className={classes.iframe} <Title style={{ position: 'absolute', right: 0 }} order={4} mt={10} mr={25}>
style={ {graph.name}
isCompact </Title>
? { <iframe
width: graph.spanTwo ? '100%' : 'calc(50% - 5px)', className={classes.iframe}
} style={
: undefined isCompact
} ? {
key={graph.name} width: graph.spanTwo ? '100%' : 'calc(50% - 5px)',
title={graph.name} }
src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.name.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme === : undefined
'dark' }
? theme.colors.dark[7] key={graph.name}
: theme.colors.gray[0] title={graph.name}
).substring(1)}${isCompact ? '&gap=10' : '&gap=5'}&innerRadius=${theme.radius.lg}${ src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.name.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme ===
graph.params 'dark'
? `&${Object.entries(graph.params) ? theme.colors.dark[7]
.map(([key, value]) => `${key}=${value.toString()}`) : theme.colors.gray[0]
.join('&')}` ).substring(1)}${isCompact ? '&gap=10' : '&gap=5'}&innerRadius=${theme.radius.lg}${
: '' graph.params
}`} ? `&${Object.entries(graph.params)
frameBorder="0" .map(([key, value]) => `${key}=${value.toString()}`)
/> .join('&')}`
: ''
}`}
frameBorder="0"
/>
</Stack>
))} ))}
</div> </div>
)} )}