Files
site_aegisone/py_service/app/templates/base.html
T
angel 72b6879f4b v1.7.0: refactor max_bot to flat structure, add VCF+UserModel+NLP history context, portal pages and proxy fixes
- Refactored max_bot from nested packages to flat module structure
- Q2: Extended BotUser model (patronymic, email, org, address, vcf_raw, contact_hash, phone_verified, email_verified, last_interaction, total_conversations, total_tickets)
- Q2: VCF parser (FN, N, TEL, EMAIL, ORG, ADR), upsert on re-contact, NLP history context (_get_user_history_context -> YandexGPT)
- Q1: Broadcast preview modal with 10s confirmation timer
- Q3: CSS var(--white)->var(--bg-card), var(--text)->var(--text-primary)
- Q4: bot_settings showNotification(), editable max_bot_id
- Q5: Webhook secret passthrough via X-Max-Bot-Api-Secret
- Masking sensitive keys, dialog_cleared handler, migrate via _add_column_if_not_exists()
- Rate limit (asyncio.sleep 0.5 per 10), dead code removed, conv.intent context in contact.py
- Portal pages: bot_consent, bot_kb (edit), bot_settings, bot_test, bot_tickets, portal_settings
- Tests: 21/21 passing, added test_yandex_gpt.py, test_email_sender.py
- Deploy: deploy_full.sh, schema.sql, seed_knowledge_base.sql
2026-05-29 02:30:30 +03:00

73 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<script>(function(){var t=localStorage.getItem('aegisone_service_theme')||'system';if(t==='dark'||(t==='system'&&matchMedia('(prefers-color-scheme:dark)').matches))document.documentElement.setAttribute('data-theme','dark');else if(t==='light'||(t==='system'&&matchMedia('(prefers-color-scheme:light)').matches))document.documentElement.setAttribute('data-theme','light');})();</script>
<title>{% block title %}Service Portal — AegisOne Engineering{% endblock %}</title>
<link rel="stylesheet" href="/service/static/css/service.css">
<link rel="stylesheet" href="/service/static/css/service-theme.css">
<link rel="icon" type="image/x-icon" href="/service/static/img/favicons/favicon.ico">
<link rel="icon" type="image/svg+xml" href="/service/static/img/favicon.svg">
<link rel="icon" type="image/png" sizes="32x32" href="/service/static/img/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/service/static/img/favicons/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/service/static/img/favicons/apple-touch-icon.png">
<link rel="manifest" href="/service/static/img/favicons/site.webmanifest">
{% block extra_head %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}">
{% if user %}
<nav class="navbar">
<div class="navbar__brand">
<a href="/service/dashboard">AegisOne Service</a>
</div>
<ul class="navbar__menu">
{% if available_roles|length > 1 %}
<li class="role-switcher">
<button class="role-btn" onclick="document.querySelector('.role-dropdown').classList.toggle('open')">
<span class="role-btn-label">{{ role_override_active and '⚡' or '' }} {{ user.role }}</span>
<span class="role-btn-arrow"></span>
</button>
<div class="role-dropdown">
{% for r in available_roles %}
<a href="#" class="role-dropdown-item {% if r == user.role %}active{% endif %}" onclick="event.preventDefault(); roleSwitcher.switchRole('{{ r }}')">
{{ r }}
</a>
{% endfor %}
{% if role_override_active %}
<div class="role-dropdown-divider"></div>
<a href="#" class="role-dropdown-item role-dropdown-reset" onclick="event.preventDefault(); roleSwitcher.resetRole()">
← Сбросить ({{ original_role }})
</a>
{% endif %}
</div>
</li>
{% endif %}
<li class="theme-switcher">
<button id="theme-btn" onclick="toggleTheme()" title="Авто">🖥</button>
</li>
</ul>
</nav>
{% endif %}
{% block content %}{% endblock %}
<div class="toast-container" id="toast-container"></div>
<script src="/service/static/js/theme.js"></script>
<script src="/service/static/js/role-switcher.js"></script>
<script>
function showNotification(msg, type){
type = type || 'success';
var container = document.getElementById('toast-container');
if(!container){ container = document.createElement('div'); container.className='toast-container'; container.id='toast-container'; document.body.appendChild(container); }
var t = document.createElement('div');
t.className = 'toast toast-' + type;
t.textContent = msg;
container.appendChild(t);
setTimeout(function(){ t.style.opacity='0'; t.style.transition='opacity 0.3s'; setTimeout(function(){ t.remove() },300) }, 3000);
}
</script>
{% block extra_scripts %}{% endblock %}
</body>
</html>