From 3412aadb9c5bb1bf8ff8146cbb630752ac1f5fa5 Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Tue, 23 Sep 2025 09:26:18 +0200 Subject: [PATCH] Fix jwt-token --- client/src/components/AlertModals.jsx | 38 +- client/src/components/MovementAlertsPanel.jsx | 35 +- client/src/pages/Alerts.jsx | 7 +- client/src/pages/Debug.jsx | 112 ++--- client/src/pages/Settings.jsx | 4 +- client/src/utils/tempTranslations.js | 392 ++++++++++++++++++ 6 files changed, 494 insertions(+), 94 deletions(-) diff --git a/client/src/components/AlertModals.jsx b/client/src/components/AlertModals.jsx index 78cde0d..7d1cfd4 100644 --- a/client/src/components/AlertModals.jsx +++ b/client/src/components/AlertModals.jsx @@ -2,10 +2,12 @@ import React, { useState, useEffect } from 'react'; import api from '../services/api'; import { format } from 'date-fns'; import { formatFrequency } from '../utils/formatFrequency'; +import { useTranslation } from '../utils/tempTranslations'; import { XMarkIcon } from '@heroicons/react/24/outline'; // Edit Alert Rule Modal export const EditAlertModal = ({ rule, onClose, onSuccess }) => { + const { t } = useTranslation(); const [formData, setFormData] = useState({ name: '', description: '', @@ -104,7 +106,7 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => { onClose(); } catch (error) { console.error('Error updating alert rule:', error); - alert('Failed to update alert rule'); + alert(t('alerts.form.updateFailed')); } finally { setSaving(false); } @@ -114,7 +116,7 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => {
-

Edit Alert Rule

+

{t('alerts.form.editAlertRule')}