Skip to content

Commit

Permalink
🚀 Patch v0.9.2 : Small bug fixes and corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnart authored Aug 12, 2022
2 parents f680c01 + d51de68 commit 03e14ce
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion data/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const REPO_URL = 'ajnart/homarr';
export const CURRENT_VERSION = 'v0.9.1';
export const CURRENT_VERSION = 'v0.9.2';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homarr",
"version": "0.9.1",
"version": "0.9.2",
"description": "Homarr - A homepage for your server.",
"license": "MIT",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/components/AppShelf/AddAppShelfItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
onSubmit={form.onSubmit(() => {
const newForm = { ...form.values };
if (newForm.newTab === true) newForm.newTab = undefined;
if (newForm.openedUrl === '') newForm.openedUrl = undefined;
if (newForm.category === null) newForm.category = undefined;
if (newForm.status.length === 1 && newForm.status[0] === '200') {
delete newForm.status;
Expand Down
8 changes: 3 additions & 5 deletions src/components/AppShelf/AppShelfItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
Center,
createStyles,
useMantineColorScheme,
Image,
} from '@mantine/core';
import { motion } from 'framer-motion';
import { useState } from 'react';
import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import Image from 'next/image';
import { serviceItem } from '../../tools/types';
import PingComponent from '../../modules/ping/PingModule';
import AppShelfMenu from './AppShelfMenu';
Expand Down Expand Up @@ -125,13 +125,11 @@ export function AppShelfItem(props: any) {
target={service.newTab === false ? '_top' : '_blank'}
>
<Image
style={{
cursor: 'pointer',
}}
styles={{ root: { cursor: 'pointer' } }}
width={80}
height={80}
src={service.icon}
objectFit="contain"
fit="contain"
/>
</Anchor>
</motion.i>
Expand Down
55 changes: 30 additions & 25 deletions src/modules/dashdot/DashdotModule.tsx
Original file line number Diff line number Diff line change
@@ -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 axios from 'axios';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -214,30 +214,35 @@ export function DashdotComponent() {
</div>

{graphs.map((graph) => (
<iframe
className={classes.iframe}
style={
isCompact
? {
width: graph.spanTwo ? '100%' : 'calc(50% - 5px)',
}
: undefined
}
key={graph.name}
title={graph.name}
src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.name.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme ===
'dark'
? theme.colors.dark[7]
: theme.colors.gray[0]
).substring(1)}${isCompact ? '&gap=10' : '&gap=5'}&innerRadius=${theme.radius.lg}${
graph.params
? `&${Object.entries(graph.params)
.map(([key, value]) => `${key}=${value.toString()}`)
.join('&')}`
: ''
}`}
frameBorder="0"
/>
<Stack>
<Title style={{ position: 'absolute', right: 0 }} order={4} mt={10} mr={25}>
{graph.name}
</Title>
<iframe
className={classes.iframe}
style={
isCompact
? {
width: graph.spanTwo ? '100%' : 'calc(50% - 5px)',
}
: undefined
}
key={graph.name}
title={graph.name}
src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.name.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme ===
'dark'
? theme.colors.dark[7]
: theme.colors.gray[0]
).substring(1)}${isCompact ? '&gap=10' : '&gap=5'}&innerRadius=${theme.radius.lg}${
graph.params
? `&${Object.entries(graph.params)
.map(([key, value]) => `${key}=${value.toString()}`)
.join('&')}`
: ''
}`}
frameBorder="0"
/>
</Stack>
))}
</div>
)}
Expand Down

0 comments on commit 03e14ce

Please sign in to comment.