mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 15:05:48 +01:00
Fix widget delete modal
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
"version": "Version",
|
"version": "Version",
|
||||||
"changePosition": "Change position",
|
"changePosition": "Change position",
|
||||||
"remove": "Remove",
|
"remove": "Remove",
|
||||||
|
"removeConfirm": "Are you sure that you want to remove {{item}} ?",
|
||||||
"sections": {
|
"sections": {
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"dangerZone": "Danger zone"
|
"dangerZone": "Danger zone"
|
||||||
|
|||||||
@@ -19,10 +19,6 @@
|
|||||||
"url": {
|
"url": {
|
||||||
"label": "Dash. URL"
|
"label": "Dash. URL"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"remove": {
|
|
||||||
"title": "Remove Dash. widget",
|
|
||||||
"confirm": "Are you sure, that you want to remove the Dash. widget?"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"card": {
|
"card": {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
|
|||||||
const handleDeleteClick = () => {
|
const handleDeleteClick = () => {
|
||||||
openContextModalGeneric<WidgetsRemoveModalInnerProps>({
|
openContextModalGeneric<WidgetsRemoveModalInnerProps>({
|
||||||
modal: 'integrationRemove',
|
modal: 'integrationRemove',
|
||||||
title: <Title order={4}>{t('descriptor.remove.title')}</Title>,
|
title: <Title order={4}>{t('common:remove')}</Title>,
|
||||||
innerProps: {
|
innerProps: {
|
||||||
widgetId: integration,
|
widgetId: integration,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button, Group, Stack, Text } from '@mantine/core';
|
import { Button, Group, Stack, Text } from '@mantine/core';
|
||||||
import { ContextModalProps } from '@mantine/modals';
|
import { ContextModalProps } from '@mantine/modals';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { Trans, useTranslation } from 'next-i18next';
|
||||||
import { useConfigContext } from '../../../../config/provider';
|
import { useConfigContext } from '../../../../config/provider';
|
||||||
import { useConfigStore } from '../../../../config/store';
|
import { useConfigStore } from '../../../../config/store';
|
||||||
|
|
||||||
@@ -32,7 +32,11 @@ export const WidgetsRemoveModal = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text>{t('descriptor.remove.confirm')}</Text>
|
<Trans
|
||||||
|
i18nKey="common:removeConfirm"
|
||||||
|
components={[<Text weight={500} />]}
|
||||||
|
values={{ item: innerProps.widgetId }}
|
||||||
|
/>
|
||||||
<Group position="right">
|
<Group position="right">
|
||||||
<Button onClick={() => context.closeModal(id)} variant="light">
|
<Button onClick={() => context.closeModal(id)} variant="light">
|
||||||
{t('common:cancel')}
|
{t('common:cancel')}
|
||||||
|
|||||||
Reference in New Issue
Block a user