diff --git a/public/locales/en/widgets/error-boundary.json b/public/locales/en/widgets/error-boundary.json index 4c7b31e2d..cc93a51a3 100644 --- a/public/locales/en/widgets/error-boundary.json +++ b/public/locales/en/widgets/error-boundary.json @@ -7,8 +7,8 @@ } }, "modal": { - "text": "", + "text": "An unexpected error has occurred. Please check your configuration. Please report this issue, if you believe that this is a bug.", "label": "Your error", "reportButton": "Report this error" } -} \ No newline at end of file +} diff --git a/src/components/Dashboard/Tiles/GenericTileMenu.tsx b/src/components/Dashboard/Tiles/GenericTileMenu.tsx index c5f1e9293..8256cca08 100644 --- a/src/components/Dashboard/Tiles/GenericTileMenu.tsx +++ b/src/components/Dashboard/Tiles/GenericTileMenu.tsx @@ -26,7 +26,15 @@ export const GenericTileMenu = ({ return ( - + diff --git a/src/widgets/WidgetWrapper.tsx b/src/widgets/WidgetWrapper.tsx index 43658072c..f0329a49f 100644 --- a/src/widgets/WidgetWrapper.tsx +++ b/src/widgets/WidgetWrapper.tsx @@ -39,7 +39,7 @@ export const WidgetWrapper = ({ const widgetWithDefaultProps = useWidget(widget); return ( - + diff --git a/src/widgets/boundary.tsx b/src/widgets/boundary.tsx index 4980aa183..fe175c50c 100644 --- a/src/widgets/boundary.tsx +++ b/src/widgets/boundary.tsx @@ -2,8 +2,10 @@ import Consola from 'consola'; import React, { ReactNode } from 'react'; import { openModal } from '@mantine/modals'; import { withTranslation } from 'next-i18next'; -import { Button, Card, Center, Code, Group, Stack, Text, Title } from '@mantine/core'; +import { Button, Card, Center, Code, Group, ScrollArea, Stack, Text, Title } from '@mantine/core'; import { IconBrandGithub, IconBug, IconInfoCircle, IconRefresh } from '@tabler/icons-react'; +import { WidgetsMenu } from '../components/Dashboard/Tiles/Widgets/WidgetsMenu'; +import { IWidget } from './widgets'; type ErrorBoundaryState = { hasError: boolean; @@ -13,6 +15,8 @@ type ErrorBoundaryState = { type ErrorBoundaryProps = { t: (key: string) => string; children: ReactNode; + integration: string; + widget: IWidget; }; /** @@ -48,73 +52,77 @@ class ErrorBoundary extends React.Component -
- - - - - {this.props.t('card.title')} - - {this.state.error && ( - - {this.state.error.toString()} - - )} + + +
+ + + + + {this.props.t('card.title')} + + {this.state.error && ( + + {this.state.error.toString()} + + )} + + + + + ), + }) + } + leftIcon={} + variant="light" + > + {this.props.t('card.buttons.details')} + + + - - - - ), - }) - } - leftIcon={} - variant="light" - > - {this.props.t('card.buttons.details')} - - - - -
+
+ ); } diff --git a/src/widgets/date/DateTile.tsx b/src/widgets/date/DateTile.tsx index 7ea004eea..e776a7759 100644 --- a/src/widgets/date/DateTile.tsx +++ b/src/widgets/date/DateTile.tsx @@ -34,7 +34,7 @@ interface DateTileProps { function DateTile({ widget }: DateTileProps) { const date = useDateState(); const formatString = widget.properties.display24HourFormat ? 'HH:mm' : 'h:mm A'; - const { width, height, ref } = useElementSize(); + const { width, ref } = useElementSize(); return (