update translate and styles

This commit is contained in:
smanylov
2025-12-16 20:26:17 +07:00
parent c9784bf18f
commit 169d0d33a0
12 changed files with 171 additions and 78 deletions
+19 -2
View File
@@ -52,8 +52,25 @@ export default function ProtectionSummary() {
</div>
<div className="protection-stat total-checks">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">{t('size')}</div>
{isOpen ? (
<>
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">
{t('size')}
</div>
</>
) :
<>
<div className="protection-stat-row">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">{t('check')}</div>
</div>
<div className="protection-stat-row">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">{t('violations')}</div>
</div>
</>
}
</div>
{isOpen ? (
<div className="protection-stat total-usage">
+39 -14
View File
@@ -1,5 +1,6 @@
'use client'
import { useTranslations } from 'next-intl';
import { useActionState, useState } from 'react'
export default function PersonalDataSettings() {
@@ -12,58 +13,82 @@ export default function PersonalDataSettings() {
const [selectedValue, setSelectedValue] = useState('male');
const t = useTranslations('Global');
return (
<div className="settings-form">
<div className="form-section">
<h3 className="form-section-title">👤 Персональные данные</h3>
<h3 className="form-section-title">
{t('personal-data')}
</h3>
<form action={formAction}>
<div className="form-group">
<label className="form-label">Полное имя:</label>
<label className="form-label">
{t('full-name')}:
</label>
<input type="text" name="full_name" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">Компания:</label>
<label className="form-label">
{t('company')}:
</label>
<input type="text" name="company" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">Email:</label>
<label className="form-label">
{t('email')}:
</label>
<input type="text" name="email" className="form-input" />
<small>
Email нельзя изменить. Обратитесь в поддержку.
{t('email-cant-change')}
</small>
</div>
<div className="form-group">
<label className="form-label">Телефон:</label>
<label className="form-label">
{t('phone')}:
</label>
<input type="phone" name="phone" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">Пол:</label>
<label className="form-label">
{t('gender')}:
</label>
<select
name="gender"
className="form-input"
value={selectedValue}
onChange={(e) => setSelectedValue(e.target.value)}
>
<option value="male">Мужской</option>
<option value="female">Женский</option>
<option value="male">
{t('male')}
</option>
<option value="female">
{t('female')}
</option>
</select>
</div>
<div className="form-group">
<label className="form-label">🎂 День рождения:</label>
<label className="form-label">
{t('birthday')}:
</label>
<input type="date" name="birthday" className="form-input" />
<small>
Используется для отправки поздравления
{t('used-to-send-congratulations')}
</small>
</div>
<div className="form-group">
<label className="form-label">Возраст:</label>
<label className="form-label">
{t('age')}:
</label>
<input type="text" name="age" className="form-input" />
<small>
Заполняется автоматически исходя из даты рождения
{t('automatically-filled-in-based-on-date-of-birth')}
</small>
</div>
<button type="submit" className="btn btn-primary">💾 Сохранить изменения</button>
<button type="submit" className="btn btn-primary">
{t('save-changes')}
</button>
</form>
</div >
</div >