klg-asutk-app/components/settings/AdvancedSettings.tsx
Yuriy 0150aba4f5 Consolidation: KLG ASUTK + PAPA integration
- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites)
- Remove localhost refs: openapi, inbox page
- Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI
- Add stub routes: knowledge/insights, recommendations, search, log-error
- Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests
- Fix inbox-server: ORDER BY created_at, package.json
- Remove redundant app/api/inbox/files route (rewrites handle it)
- knowledge/ in gitignore (large PDFs)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 17:18:31 +03:00

99 lines
3.3 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import type { UserPreferences } from './types';
interface AdvancedSettingsProps {
preferences: UserPreferences;
onChange: (updater: (prev: UserPreferences) => UserPreferences) => void;
onReset: () => void;
}
export default function AdvancedSettings({
preferences,
onChange,
onReset,
}: AdvancedSettingsProps) {
return (
<div>
<h3 style={{ fontSize: '18px', fontWeight: 'bold', marginBottom: '24px' }}>
Дополнительные настройки
</h3>
<div style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>
<label style={{ display: 'flex', alignItems: 'center', gap: '12px', cursor: 'pointer' }}>
<input
type="checkbox"
checked={preferences.shortcuts.enabled}
onChange={(e) =>
onChange((prev) => ({
...prev,
shortcuts: { ...prev.shortcuts, enabled: e.target.checked },
}))
}
style={{ width: '18px', height: '18px' }}
/>
<div>
<div style={{ fontSize: '14px', fontWeight: '500' }}>Клавиатурные сокращения</div>
<div style={{ fontSize: '12px', color: '#666' }}>
Включить горячие клавиши для быстрой навигации
</div>
</div>
</label>
<label style={{ display: 'flex', alignItems: 'center', gap: '12px', cursor: 'pointer' }}>
<input
type="checkbox"
checked={preferences.shortcuts.showHints}
onChange={(e) =>
onChange((prev) => ({
...prev,
shortcuts: { ...prev.shortcuts, showHints: e.target.checked },
}))
}
style={{ width: '18px', height: '18px' }}
disabled={!preferences.shortcuts.enabled}
/>
<div>
<div style={{ fontSize: '14px', fontWeight: '500' }}>
Показывать подсказки по горячим клавишам
</div>
<div style={{ fontSize: '12px', color: '#666' }}>
Отображать подсказки по клавиатурным сокращениям
</div>
</div>
</label>
<div
style={{
padding: '16px',
backgroundColor: '#fff3cd',
borderRadius: '4px',
border: '1px solid #ffc107',
}}
>
<div style={{ fontSize: '14px', fontWeight: '500', marginBottom: '8px' }}>
Сброс настроек
</div>
<div style={{ fontSize: '12px', color: '#666', marginBottom: '12px' }}>
Сбросить все настройки к значениям по умолчанию
</div>
<button
onClick={onReset}
style={{
padding: '8px 16px',
backgroundColor: '#ff9800',
color: 'white',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
fontSize: '14px',
}}
>
Сбросить настройки
</button>
</div>
</div>
</div>
);
}