mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
♻️ Display of available properties in menu
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { Title } from '@mantine/core';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { openContextModalGeneric } from '../../../../tools/mantineModalManagerExtensions';
|
||||
import WidgetsDefinitions from '../../../../widgets';
|
||||
import { IWidget } from '../../../../widgets/widgets';
|
||||
import { useWrapperColumnCount } from '../../Wrappers/gridstack/store';
|
||||
import { GenericTileMenu } from '../GenericTileMenu';
|
||||
import { WidgetEditModalInnerProps } from './WidgetsEditModal';
|
||||
import { WidgetsRemoveModalInnerProps } from './WidgetsRemoveModal';
|
||||
import WidgetsDefinitions from '../../../../widgets';
|
||||
|
||||
export type WidgetChangePositionModalInnerProps = {
|
||||
widgetId: string;
|
||||
@@ -76,7 +76,8 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
|
||||
handleClickChangePosition={handleChangeSizeClick}
|
||||
handleClickDelete={handleDeleteClick}
|
||||
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