mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-15 09:46:19 +01:00
Add translations for en & de in Dashdot; Fix PR comments
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Collapse, createStyles, Stack, Text } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons';
|
||||
import { Reorder, useDragControls } from 'framer-motion';
|
||||
import { FC, ReactNode, useState } from 'react';
|
||||
import { FC, ReactNode } from 'react';
|
||||
import { IDraggableListInputValue } from '../../../../widgets/widgets';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
@@ -14,7 +15,6 @@ const useStyles = createStyles((theme) => ({
|
||||
}`,
|
||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.white,
|
||||
marginBottom: theme.spacing.xs,
|
||||
gap: theme.spacing.xs,
|
||||
},
|
||||
row: {
|
||||
display: 'flex',
|
||||
@@ -80,7 +80,7 @@ const ListItem: FC<{
|
||||
const { classes, cx } = useStyles();
|
||||
const controls = useDragControls();
|
||||
|
||||
const [showContent, setShowContent] = useState(false);
|
||||
const [opened, handlers] = useDisclosure(false);
|
||||
const hasContent = props.children != null && Object.keys(props.children).length !== 0;
|
||||
|
||||
return (
|
||||
@@ -100,8 +100,8 @@ const ListItem: FC<{
|
||||
|
||||
{hasContent && (
|
||||
<IconChevronDown
|
||||
className={cx(classes.clickableIcons, { [classes.rotate]: showContent })}
|
||||
onClick={() => setShowContent(!showContent)}
|
||||
className={cx(classes.clickableIcons, { [classes.rotate]: opened })}
|
||||
onClick={() => handlers.toggle()}
|
||||
size={18}
|
||||
stroke={1.5}
|
||||
/>
|
||||
@@ -109,7 +109,7 @@ const ListItem: FC<{
|
||||
</div>
|
||||
|
||||
{hasContent && (
|
||||
<Collapse in={showContent}>
|
||||
<Collapse in={opened}>
|
||||
<Stack className={classes.collapseContent}>{props.children}</Stack>
|
||||
</Collapse>
|
||||
)}
|
||||
|
||||
@@ -205,7 +205,7 @@ const WidgetOptionTypeSwitch: FC<{
|
||||
labels={Object.fromEntries(
|
||||
Object.entries(option.items).map(([graphName]) => [
|
||||
graphName,
|
||||
t(`descriptor.settings.${graphName}.label`),
|
||||
t(`descriptor.settings.${key}.${graphName}.label`),
|
||||
])
|
||||
)}
|
||||
>
|
||||
@@ -217,7 +217,7 @@ const WidgetOptionTypeSwitch: FC<{
|
||||
key={`${graphName}.${subKey}.${i}`}
|
||||
option={setting as IWidgetOptionValue}
|
||||
widgetId={widgetId}
|
||||
propName={`${graphName}.${subKey}`}
|
||||
propName={`${key}.${graphName}.${subKey}`}
|
||||
value={typedVal.find((v) => v.key === graphName)?.subValues?.[subKey]}
|
||||
handleChange={(_, newVal) =>
|
||||
handleChange(
|
||||
|
||||
Reference in New Issue
Block a user