Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/ajnart/homarr into fix-ldap-…
Browse files Browse the repository at this point in the history
…filters
  • Loading branch information
SeDemal committed Apr 23, 2024
2 parents 02c9221 + 7dffe39 commit 6c385bd
Show file tree
Hide file tree
Showing 30 changed files with 1,347 additions and 126 deletions.
96 changes: 96 additions & 0 deletions public/locales/en/modules/media-transcoding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"descriptor": {
"name": "Media Transcoding",
"description": "Displays information about media transcoding",
"settings": {
"title": "Media Transcoding Settings",
"appId": {
"label": "Select an app"
},
"defaultView": {
"label": "Default view",
"data": {
"workers": "Workers",
"queue": "Queue",
"statistics": "Statistics"
}
},
"showHealthCheck": {
"label": "Show Health Check indicator"
},
"showHealthChecksInQueue": {
"label": "Show Health Checks in queue"
},
"queuePageSize": {
"label": "Queue: Items per page"
},
"showAppIcon": {
"label": "Show app icon in the bottom right corner"
}
}
},
"noAppSelected": "Please select an app in the widget settings",
"views": {
"workers": {
"table": {
"header": {
"name": "File",
"eta": "ETA",
"progress": "Progress"
},
"empty": "Empty",
"tooltip": {
"transcode": "Transcode",
"healthCheck": "Health Check"
}
}
},
"queue": {
"table": {
"header": {
"name": "File",
"size": "Size"
},
"footer": {
"currentIndex": "{{start}}-{{end}} of {{total}}"
},
"empty": "Empty",
"tooltip": {
"transcode": "Transcode",
"healthCheck": "Health Check"
}
}
},
"statistics": {
"empty": "Empty",
"box": {
"transcodes": "Transcodes: {{value}}",
"healthChecks": "Health Checks: {{value}}",
"files": "Files: {{value}}",
"spaceSaved": "Saved: {{value}}"
},
"pies": {
"transcodes": "Transcodes",
"healthChecks": "Health Checks",
"videoCodecs": "Codecs",
"videoContainers": "Containers",
"videoResolutions": "Resolutions"
}
}
},
"error": {
"title": "Error",
"message": "An error occurred while fetching data from Tdarr."
},
"tabs": {
"workers": "Workers",
"queue": "Queue",
"statistics": "Statistics"
},
"healthCheckStatus": {
"title": "Health Check",
"queued": "Queued",
"healthy": "Healthy",
"unhealthy": "Unhealthy"
}
}
7 changes: 7 additions & 0 deletions public/locales/en/modules/torrents-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@
"label": "Display filtered torrents list ratio",
"info": "If disabled, only the global ratio will be display. The global ratio will still use the labels if set"
},
"columnOrdering":{
"label": "Enable reordering the columns"
},
"rowSorting":{
"label": "Enable sorting the rows"
},
"columns": {
"label": "Select columns to display",
"data": {
"date": "Date Added",
"down": "Down",
"up": "Up",
"eta": "ETA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { useTranslation } from 'next-i18next';
import { highlight, languages } from 'prismjs';
import Editor from 'react-simple-code-editor';
import { useColorTheme } from '~/tools/color';
import { BackgroundImageAttachment, BackgroundImageRepeat, BackgroundImageSize } from '~/types/settings';
import {
BackgroundImageAttachment,
BackgroundImageRepeat,
BackgroundImageSize,
} from '~/types/settings';

import { useBoardCustomizationFormContext } from '../form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,10 @@ export const availableIntegrations = [
value: 'proxmox',
image: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/proxmox.png',
label: 'Proxmox',
},
{
value: 'tdarr',
image: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/tdarr.png',
label: 'Tdarr',
}
] as const satisfies Readonly<SelectItem[]>;
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ const CitySelectModal = ({ opened, closeModal, query, onCitySelected }: CitySele
if (isError === true)
return (
<Modal
title={
<Title order={4}>
{t('modal.title')} - {query}
</Title>
}
title={t('modal.title') + ' - ' + query}
size="xl"
opened={opened}
onClose={closeModal}
Expand All @@ -193,11 +189,7 @@ const CitySelectModal = ({ opened, closeModal, query, onCitySelected }: CitySele

return (
<Modal
title={
<Title order={4}>
{t('modal.title')} - {query}
</Title>
}
title={t('modal.title') + ' - ' + query}
size="xl"
opened={opened}
onClose={closeModal}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const WidgetsEditModal = ({

return (
<Stack>
{items.map(([key, _], index) => {
{items.map(([key], index) => {
const option = (currentWidgetDefinition as any).options[key] as IWidgetOptionValue;
const value = moduleProperties[key] ?? option.defaultValue;

Expand Down Expand Up @@ -395,6 +395,7 @@ const WidgetOptionTypeSwitch: FC<{
</Flex>
</Stack>
);

/* eslint-enable no-case-declarations */
default:
return null;
Expand Down
5 changes: 2 additions & 3 deletions src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Title } from '@mantine/core';
import { useTranslation } from 'next-i18next';
import { openContextModalGeneric } from '~/tools/mantineModalManagerExtensions';
import { IWidget } from '~/widgets/widgets';
Expand Down Expand Up @@ -38,7 +37,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
const handleDeleteClick = () => {
openContextModalGeneric<WidgetsRemoveModalInnerProps>({
modal: 'integrationRemove',
title: <Title order={4}>{t('common:remove')}</Title>,
title: t('common:remove'),
innerProps: {
widgetId: widget.id,
widgetType: integration,
Expand All @@ -63,7 +62,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
const handleEditClick = () => {
openContextModalGeneric<WidgetEditModalInnerProps>({
modal: 'integrationOptions',
title: <Title order={4}>{t('descriptor.settings.title')}</Title>,
title: t('descriptor.settings.title'),
innerProps: {
widgetId: widget.id,
widgetType: integration,
Expand Down
6 changes: 3 additions & 3 deletions src/components/Dashboard/Wrappers/Category/Category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export const DashboardCategory = ({ category }: DashboardCategoryProps) => {
>
<Accordion.Item value={category.name}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Accordion.Control icon={isEditMode && <CategoryEditMenu category={category} />}>
<Accordion.Control>
<Title order={3}>{category.name}</Title>
</Accordion.Control>
{!isEditMode && (
{!isEditMode ? (
<Menu withArrow withinPortal>
<Menu.Target>
<ActionIcon variant="light" mr="md">
Expand All @@ -114,7 +114,7 @@ export const DashboardCategory = ({ category }: DashboardCategoryProps) => {
</Menu.Item>
</Menu.Dropdown>
</Menu>
)}
) : <CategoryEditMenu category={category} />}
</Box>
<Accordion.Panel>
<div
Expand Down
8 changes: 2 additions & 6 deletions src/components/Manage/Board/create-board.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Stack, Text, TextInput, Title } from '@mantine/core';
import { Button, Group, Stack, Text, TextInput } from '@mantine/core';
import { useForm } from '@mantine/form';
import { ContextModalProps, modals } from '@mantine/modals';
import { Trans, useTranslation } from 'next-i18next';
Expand Down Expand Up @@ -80,11 +80,7 @@ export const CreateBoardModal = ({ id }: ContextModalProps<{}>) => {
export const openCreateBoardModal = () => {
modals.openContextModal({
modal: 'createBoardModal',
title: (
<Title order={4}>
<Trans i18nKey="manage/boards:modals.create.title" />
</Title>
),
title: <Trans i18nKey="manage/boards:modals.create.title" />,
innerProps: {},
});
};
8 changes: 2 additions & 6 deletions src/components/Manage/Board/delete-board.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Stack, Text, Title } from '@mantine/core';
import { Button, Group, Stack, Text } from '@mantine/core';
import { ContextModalProps, modals } from '@mantine/modals';
import { Trans, useTranslation } from 'next-i18next';
import { api } from '~/utils/api';
Expand Down Expand Up @@ -51,11 +51,7 @@ export const DeleteBoardModal = ({ id, innerProps }: ContextModalProps<InnerProp
export const openDeleteBoardModal = (innerProps: InnerProps) => {
modals.openContextModal({
modal: 'deleteBoardModal',
title: (
<Title order={4}>
<Trans i18nKey="manage/boards:modals.delete.title" />
</Title>
),
title: <Trans i18nKey="manage/boards:modals.delete.title" />,
innerProps,
});
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Select, Stack, Text, Title } from '@mantine/core';
import { Button, Group, Select, Stack, Text } from '@mantine/core';
import { useForm } from '@mantine/form';
import { ContextModalProps, modals } from '@mantine/modals';
import { showNotification } from '@mantine/notifications';
Expand Down Expand Up @@ -132,11 +132,7 @@ export const DockerSelectBoardModal = ({ id, innerProps }: ContextModalProps<Inn
export const openDockerSelectBoardModal = (innerProps: InnerProps) => {
modals.openContextModal({
modal: 'dockerSelectBoardModal',
title: (
<Title order={4}>
<Trans i18nKey="tools/docker:modals.selectBoard.title" />
</Title>
),
title: <Trans i18nKey="tools/docker:modals.selectBoard.title" />,
innerProps,
});
umami.track('Add to homarr modal');
Expand Down
8 changes: 2 additions & 6 deletions src/components/Manage/User/Invite/copy-invite.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, CopyButton, Mark, Stack, Text, Title } from '@mantine/core';
import { Button, CopyButton, Mark, Stack, Text } from '@mantine/core';
import { ContextModalProps, modals } from '@mantine/modals';
import { Trans, useTranslation } from 'next-i18next';
import Link from 'next/link';
Expand Down Expand Up @@ -65,11 +65,7 @@ const useInviteUrl = (id: string, token: string) => {
export const openCopyInviteModal = (data: InnerProps) => {
modals.openContextModal({
modal: 'copyInviteModal',
title: (
<Title order={4}>
<Trans i18nKey="manage/users/invites:modals.copy.title" />
</Title>
),
title: <Trans i18nKey="manage/users/invites:modals.copy.title" />,
innerProps: data,
});
};
8 changes: 2 additions & 6 deletions src/components/Manage/User/Invite/create-invite.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Stack, Text, Title } from '@mantine/core';
import { Button, Group, Stack, Text } from '@mantine/core';
import { DateTimePicker } from '@mantine/dates';
import { useForm } from '@mantine/form';
import { ContextModalProps, modals } from '@mantine/modals';
Expand Down Expand Up @@ -79,11 +79,7 @@ export const CreateInviteModal = ({ id }: ContextModalProps<{}>) => {
export const openCreateInviteModal = () => {
modals.openContextModal({
modal: 'createInviteModal',
title: (
<Title order={4}>
<Trans i18nKey="manage/users/invites:modals.create.title" />
</Title>
),
title: <Trans i18nKey="manage/users/invites:modals.create.title" />,
innerProps: {},
});
};
12 changes: 5 additions & 7 deletions src/components/Manage/User/change-user-role.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Stack, Text, Title } from '@mantine/core';
import { Button, Group, Stack, Text } from '@mantine/core';
import { ContextModalProps, modals } from '@mantine/modals';
import { Trans, useTranslation } from 'next-i18next';
import { api } from '~/utils/api';
Expand Down Expand Up @@ -48,12 +48,10 @@ export const openRoleChangeModal = (user: InnerProps) => {
modals.openContextModal({
modal: 'changeUserRoleModal',
title: (
<Title order={4}>
<Trans
i18nKey={`manage/users:modals.change-role.${user.type}.title`}
values={{ name: user.name }}
/>
</Title>
<Trans
i18nKey={`manage/users:modals.change-role.${user.type}.title`}
values={{ name: user.name }}
/>
),
innerProps: user,
});
Expand Down
8 changes: 2 additions & 6 deletions src/components/Manage/User/delete-user.modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Group, Stack, Text, Title } from '@mantine/core';
import { Button, Group, Stack, Text } from '@mantine/core';
import { ContextModalProps, modals } from '@mantine/modals';
import { Trans, useTranslation } from 'next-i18next';
import { api } from '~/utils/api';
Expand Down Expand Up @@ -46,11 +46,7 @@ export const DeleteUserModal = ({ id, innerProps }: ContextModalProps<InnerProps
export const openDeleteUserModal = (user: InnerProps) => {
modals.openContextModal({
modal: 'deleteUserModal',
title: (
<Title order={4}>
<Trans i18nKey="manage/users:modals.delete.title" values={{ name: user.name }} />
</Title>
),
title: <Trans i18nKey="manage/users:modals.delete.title" values={{ name: user.name }} />,
innerProps: user,
});
};
Loading

0 comments on commit 6c385bd

Please sign in to comment.