mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
♻️ Display of available properties in menu
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { Title } from '@mantine/core';
|
import { Title } from '@mantine/core';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { openContextModalGeneric } from '../../../../tools/mantineModalManagerExtensions';
|
import { openContextModalGeneric } from '../../../../tools/mantineModalManagerExtensions';
|
||||||
|
import WidgetsDefinitions from '../../../../widgets';
|
||||||
import { IWidget } from '../../../../widgets/widgets';
|
import { IWidget } from '../../../../widgets/widgets';
|
||||||
import { useWrapperColumnCount } from '../../Wrappers/gridstack/store';
|
import { useWrapperColumnCount } from '../../Wrappers/gridstack/store';
|
||||||
import { GenericTileMenu } from '../GenericTileMenu';
|
import { GenericTileMenu } from '../GenericTileMenu';
|
||||||
import { WidgetEditModalInnerProps } from './WidgetsEditModal';
|
import { WidgetEditModalInnerProps } from './WidgetsEditModal';
|
||||||
import { WidgetsRemoveModalInnerProps } from './WidgetsRemoveModal';
|
import { WidgetsRemoveModalInnerProps } from './WidgetsRemoveModal';
|
||||||
import WidgetsDefinitions from '../../../../widgets';
|
|
||||||
|
|
||||||
export type WidgetChangePositionModalInnerProps = {
|
export type WidgetChangePositionModalInnerProps = {
|
||||||
widgetId: string;
|
widgetId: string;
|
||||||
@@ -76,7 +76,8 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
|
|||||||
handleClickChangePosition={handleChangeSizeClick}
|
handleClickChangePosition={handleChangeSizeClick}
|
||||||
handleClickDelete={handleDeleteClick}
|
handleClickDelete={handleDeleteClick}
|
||||||
displayEdit={
|
displayEdit={
|
||||||
typeof widget.properties !== 'undefined' && Object.keys(widget.properties).length !== 0
|
typeof widget.properties !== 'undefined' &&
|
||||||
|
Object.keys(widgetDefinitionObject?.options ?? {}).length !== 0
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user