✨ Add Tdarr integration and widget (#1882)
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
@@ -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[]>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -395,6 +395,7 @@ const WidgetOptionTypeSwitch: FC<{
|
||||
</Flex>
|
||||
</Stack>
|
||||
);
|
||||
|
||||
/* eslint-enable no-case-declarations */
|
||||
default:
|
||||
return null;
|
||||
|
||||
@@ -63,7 +63,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,
|
||||
|
||||
Reference in New Issue
Block a user