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