add translate and make refactor
This commit is contained in:
@@ -1,31 +1,38 @@
|
||||
import Link from 'next/link';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function APISettings() {
|
||||
const t = useTranslations('Global');
|
||||
|
||||
return (
|
||||
<div className="settings-form">
|
||||
<div className="form-section">
|
||||
<h3 className="form-section-title">🔌 API настройки</h3>
|
||||
<h3 className="form-section-title">
|
||||
{t('api-settings')}
|
||||
</h3>
|
||||
<div className="form-group">
|
||||
<label className="form-label">🔑 Ваш API ключ:</label>
|
||||
<label className="form-label">
|
||||
{t('your-api-key')}:
|
||||
</label>
|
||||
<div className="api-key-info-wrapper">
|
||||
<div className="api-key-info">
|
||||
<input readOnly className="form-input" value="testkey" id="api-key-input"></input>
|
||||
<button type="button" className="btn btn-outline">
|
||||
📋 Копировать
|
||||
{t('copy')}
|
||||
</button>
|
||||
</div>
|
||||
<button type="submit" className="btn btn-secondary">
|
||||
🔄 Обновить ключ
|
||||
🔄 {t('update-key')}
|
||||
</button>
|
||||
<small>
|
||||
⚠️ Используйте этот ключ для доступа к API. Не передавайте его третьим лицам.
|
||||
{t('use-this-key-for-api-access')}
|
||||
</small>
|
||||
<div className="api-key-info-documentation">
|
||||
<h4>
|
||||
📚 Документация API
|
||||
{t('api-documentation')}
|
||||
</h4>
|
||||
<p>
|
||||
Полная документация API доступна по ссылке:
|
||||
{t('full-api-documentation-available-at-link')}:
|
||||
<br />
|
||||
<Link href={'api.no-copy.ru/docs'}>api.no-copy.ru/docs</Link>
|
||||
</p>
|
||||
|
||||
@@ -1,24 +1,34 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function DangerZone() {
|
||||
const t = useTranslations('Global');
|
||||
|
||||
return (
|
||||
<div className="danger-zone">
|
||||
<h3>⚠️ Опасная зона</h3>
|
||||
<h3>
|
||||
{t('danger-zone')}
|
||||
</h3>
|
||||
<div className="danger-zone-remove-account">
|
||||
<h4>
|
||||
🗑️ Удаление аккаунта
|
||||
{t('account-deletion')}
|
||||
</h4>
|
||||
<p>
|
||||
⚠️ Удаление аккаунта приведет к безвозвратной потере всех данных, включая загруженный контент, отчеты и настройки. Это действие нельзя отменить.
|
||||
{t('account-deletion-warning')}
|
||||
</p>
|
||||
<button className="btn">🗑️ Удалить аккаунт</button>
|
||||
<button className="btn">
|
||||
{t('delete-account')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="danger-zone-reset-settings">
|
||||
<h4>
|
||||
🔄 Сброс всех настроек
|
||||
{t('reset-all-settings')}
|
||||
</h4>
|
||||
<p>
|
||||
🔧 Восстановить все настройки аккаунта к значениям по умолчанию.
|
||||
{t('reset-settings-description')}
|
||||
</p>
|
||||
<button className="btn">🔄 Сбросить настройки</button>
|
||||
<button className="btn">
|
||||
{t('reset-settings')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function LastActivitySettings() {
|
||||
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('last-activity')}
|
||||
</h3>
|
||||
<div className="last-activiti-wrapper">
|
||||
<div className="no-activiti">
|
||||
📝 Пока нет записей о активности
|
||||
{t('no-activity-records-yet')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useActionState, useState } from 'react';
|
||||
|
||||
export default function NotificationsMonitoringSettings() {
|
||||
@@ -12,35 +13,48 @@ export default function NotificationsMonitoringSettings() {
|
||||
|
||||
const [selectedMonitoringValue, setSelectedMonitoringValue] = useState('weekly');
|
||||
const [selectedWatermarkValue, setSelectedWatermarkValue] = useState('high');
|
||||
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('notifications-and-monitoring')}
|
||||
</h3>
|
||||
<form action={formAction}>
|
||||
<div className="form-group">
|
||||
<label className="form-label">
|
||||
<span>📧 Email уведомления</span>
|
||||
<span>
|
||||
{t('email-notifications')}
|
||||
</span>
|
||||
<span className="toggle-switch">
|
||||
<input type="checkbox" name="notification_email" />
|
||||
<span className="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<small>Получать уведомления о нарушениях на email</small>
|
||||
<small>
|
||||
{t('receive-violation-notifications-on-email')}
|
||||
</small>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label className="form-label">
|
||||
<span>🤖 Автоматический мониторинг</span>
|
||||
<span>
|
||||
{t('automatic-monitoring')}
|
||||
</span>
|
||||
<span className="toggle-switch">
|
||||
<input type="checkbox" name="auto_monitoring" />
|
||||
<span className="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<small>Автоматическая проверка контента в интернете</small>
|
||||
<small>
|
||||
{t('automatic-content-check-on-internet')}
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<label className="form-label">⏱️ Частота мониторинга:</label>
|
||||
<label className="form-label">
|
||||
{t('monitoring-frequency')}:
|
||||
</label>
|
||||
<select
|
||||
name="monitoring_frequency"
|
||||
className="form-input"
|
||||
@@ -48,19 +62,21 @@ export default function NotificationsMonitoringSettings() {
|
||||
onChange={(e) => setSelectedMonitoringValue(e.target.value)}
|
||||
>
|
||||
<option value="daily">
|
||||
Ежедневно
|
||||
{t('daily')}
|
||||
</option>
|
||||
<option value="weekly">
|
||||
Еженедельно
|
||||
{t('weekly')}
|
||||
</option>
|
||||
<option value="monthly">
|
||||
Ежемесячно
|
||||
{t('monthly')}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<label className="form-label">💧 Интенсивность водяного знака:</label>
|
||||
<label className="form-label">
|
||||
{t('watermark-intensity')}:
|
||||
</label>
|
||||
<select
|
||||
name="watermark_intensity"
|
||||
className="form-input"
|
||||
@@ -68,18 +84,20 @@ export default function NotificationsMonitoringSettings() {
|
||||
onChange={(e) => setSelectedWatermarkValue(e.target.value)}
|
||||
>
|
||||
<option value="low">
|
||||
Низкая (незаметный)
|
||||
{t('low')}
|
||||
</option>
|
||||
<option value="medium">
|
||||
Средняя (рекомендуется)
|
||||
{t('medium')}
|
||||
</option>
|
||||
<option value="high">
|
||||
Высокая (максимальная защита)
|
||||
{t('high')}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" className="btn btn-primary">💾 Сохранить изменения</button>
|
||||
<button type="submit" className="btn btn-primary">
|
||||
{t('save-changes')}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useActionState, useState } from 'react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function SafetySetting() {
|
||||
const [errorMessage, formAction, isPending] = useActionState(
|
||||
@@ -9,26 +10,39 @@ export default function SafetySetting() {
|
||||
},
|
||||
undefined
|
||||
);
|
||||
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('security')}
|
||||
</h3>
|
||||
<form action={formAction}>
|
||||
<div className="form-group">
|
||||
<label className="form-label">🔓 Текущий пароль:</label>
|
||||
<label className="form-label">
|
||||
{t('current-password')}:
|
||||
</label>
|
||||
<input type="password" name="current_password" className="form-input" />
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label className="form-label">🔓 Новый пароль:</label>
|
||||
<label className="form-label">
|
||||
{t('new-password')}:
|
||||
</label>
|
||||
<input type="password" name="new_password" className="form-input" />
|
||||
<small>Минимум 6 символов</small>
|
||||
<small>
|
||||
{t('minimum-8-characters')}
|
||||
</small>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label className="form-label">✅ Подтвердите пароль:</label>
|
||||
<label className="form-label">
|
||||
{t('confirm-password')}:
|
||||
</label>
|
||||
<input type="password" name="confirm_password" className="form-input" />
|
||||
</div>
|
||||
<button type="submit" className="btn btn-primary">🔐 Изменить пароль</button>
|
||||
<button type="submit" className="btn btn-primary">
|
||||
{t('change-password')}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function SubscriptionSettings() {
|
||||
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('subscription')}
|
||||
</h3>
|
||||
<div className="subscription-info">
|
||||
<div className="subscription-info-header">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user