This repository has been archived on 2026-11-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
WGTools-Extended/app/templates/base.html
T
asminme affe28ad71
Wydanie WGTools-Extended / release (push) Failing after 16s
1.0.0
2026-10-30 00:35:08 +01:00

196 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
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.
<!doctype html>
<html lang="{{ language }}" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow,noarchive,nosnippet">
<script>
(() => {
try {
const savedTheme = localStorage.getItem('wgtools.theme') || 'dark';
const actualTheme = savedTheme === 'system'
? (matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
: savedTheme;
document.documentElement.dataset.theme = actualTheme;
const sidebarCollapsed = localStorage.getItem('wgtools.sidebar.collapsed') === '1';
if (sidebarCollapsed) document.documentElement.classList.add('sidebar-pref-collapsed');
const savedLanguage = localStorage.getItem('wgtools.language');
const cookieMatch = document.cookie.match(/(?:^|;\s*)wgtools_language=([^;]+)/);
const cookieLanguage = cookieMatch ? decodeURIComponent(cookieMatch[1]) : '';
if (['en','ru','de','fr','it','es','pl'].includes(savedLanguage) && savedLanguage !== cookieLanguage) {
document.documentElement.style.visibility = 'hidden';
document.cookie = `wgtools_language=${encodeURIComponent(savedLanguage)}; Path=/; Max-Age=31536000; SameSite=Lax`;
location.reload();
}
} catch (_) {}
})();
</script>
<title>{{ branding.name or 'Panel' }}</title>
<link rel="icon" type="image/png" href="{{ branding.logo or (base_path ~ '/static/img/favicon.png?v=' ~ version ~ '&r=' ~ asset_rev) }}">
<link rel="apple-touch-icon" href="{{ branding.logo or (base_path ~ '/static/img/wgtools-logo.png?v=' ~ version ~ '&r=' ~ asset_rev) }}">
<link rel="stylesheet" href="{{ base_path }}/static/css/app.css?v={{ version }}&r={{ asset_rev }}">
<style>html[data-theme] { --accent: {{ branding.color }}; }</style>
</head>
<body data-base-path="{{ base_path }}" data-page="{{ page }}" data-role="{{ request.state.access.role }}" data-interface="{{ interface }}" data-refresh="{{ refresh_seconds }}" data-online-threshold="{{ online_threshold }}">
<header class="topbar">
<div class="brand">
<img class="brand-mark brand-logo" src="{{ branding.logo or (base_path ~ '/static/img/wgtools-logo.png?v=' ~ version ~ '&r=' ~ asset_rev) }}" alt="">
<div>
<div class="brand-title">{{ branding.name }}</div>
</div>
</div>
<div class="topbar-right">
<div class="interface-switcher-wrap">
<button type="button" class="top-status interface-switcher-button" id="interface-switcher-button" aria-expanded="false" aria-haspopup="menu">
<span id="header-dot" class="status-dot unknown"></span>
<span id="header-status">{{ interface }} · {{ tr('common.checking') }}</span>
<span class="interface-switcher-caret">▾</span>
</button>
<div class="interface-switcher-menu" id="interface-switcher-menu" role="menu" hidden></div>
</div>
{% if current_user %}
<a class="topbar-update-link" id="topbar-update-notice" href="{{ base_path }}/settings#about" hidden aria-label="{{ tr('settings.update_sidebar') }}" title="{{ tr('settings.update_sidebar_hint') }}">↑ <span id="topbar-update-version"></span></a>
<button type="button" class="topbar-theme-toggle" id="topbar-theme-toggle" aria-label="{{ tr('settings.theme') }}" title="{{ tr('settings.theme') }}">
<span class="topbar-theme-icon" aria-hidden="true">
<svg class="theme-icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.65 17.65l1.42 1.42M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.65 6.35l1.42-1.42"/></svg>
<svg class="theme-icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20.985 12.486A9 9 0 0 1 11.514 3.015 9 9 0 1 0 20.985 12.486Z"/></svg>
</span>
</button>
{% if not current_user or request.state.access.role == 'admin' %}<button type="button" class="topbar-audit-toggle" id="topbar-audit-button" aria-label="{{ tr('settings.audit_log') }}" data-tooltip="{{ tr('settings.audit_log') }}">
<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="4" width="14" height="17" rx="2"/><path d="M9 4.5V3h6v1.5M9 10h6M9 14h6M9 18h4"/></svg>
</button>{% endif %}
{% if request.state.access.role == 'admin' %}<button type="button" class="topbar-help" id="help-button" title="{{ tr('help.open') }}" aria-label="{{ tr('help.open') }}">?</button>{% endif %}
<div class="user-chip"><span class="user-chip-name">{{ current_user.username }}</span><button type="button" class="topbar-logout" id="logout-button">{{ tr('auth.sign_out') }}</button></div>
{% endif %}
</div>
</header>
<aside class="sidebar" id="sidebar">
<nav aria-label="{{ tr('nav.navigation') }}">
<a href="{{ base_path }}/" class="nav-item {% if page == 'dashboard' %}active{% endif %}" data-tooltip="{{ tr('nav.dashboard') }}">
<span class="nav-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M3 11.5 12 4l9 7.5"/><path d="M5.5 10.5V20h13v-9.5"/><path d="M9.5 20v-6h5v6"/></svg></span>
<span class="nav-label" data-i18n="nav.dashboard">{{ tr('nav.dashboard') }}</span>
</a>
{% if not current_user or request.state.access.role == 'admin' %}<a href="{{ base_path }}/server" class="nav-item {% if page == 'server' %}active{% endif %}" data-tooltip="{{ tr('nav.server') }}">
<span class="nav-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="6" rx="1.5"/><rect x="4" y="14" width="16" height="6" rx="1.5"/><path d="M8 7h.01M8 17h.01M12 7h5M12 17h5"/></svg></span>
<span class="nav-label" data-i18n="nav.server">{{ tr('nav.server') }}</span>
</a>{% endif %}
<a href="{{ base_path }}/clients" class="nav-item {% if page == 'clients' %}active{% endif %}" data-tooltip="{{ tr('nav.clients') }}">
<span class="nav-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="9" cy="8" r="3"/><path d="M3.5 19c.6-3.4 2.5-5 5.5-5s4.9 1.6 5.5 5"/><circle cx="17" cy="9" r="2.3"/><path d="M15.5 14.5c2.8-.4 4.5 1.1 5 4.5"/></svg></span>
<span class="nav-label" data-i18n="nav.clients">{{ tr('nav.clients') }}</span>
</a>
{% if not current_user or request.state.access.role == 'admin' %}<a href="{{ base_path }}/settings" class="nav-item {% if page == 'settings' %}active{% endif %}" data-tooltip="{{ tr('nav.settings') }}">
<span class="nav-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M19 12a7 7 0 0 0-.1-1.2l2-1.5-2-3.4-2.5 1A7 7 0 0 0 14.3 5L14 2h-4l-.3 3a7 7 0 0 0-2.1 1.2l-2.5-1-2 3.4 2 1.5A7 7 0 0 0 5 12c0 .4 0 .8.1 1.2l-2 1.5 2 3.4 2.5-1A7 7 0 0 0 9.7 19l.3 3h4l.3-3a7 7 0 0 0 2.1-1.2l2.5 1 2-3.4-2-1.5c.1-.4.1-.8.1-1.2Z"/></svg></span>
<span class="nav-label" data-i18n="nav.settings">{{ tr('nav.settings') }}</span>
</a>{% endif %}
</nav>
<div class="sidebar-bottom">
<div class="sidebar-footer">
<button type="button" class="sidebar-collapse-button" id="sidebar-collapse-button" aria-expanded="true" aria-label="{{ tr('settings.collapse_sidebar') }}" data-tooltip="{{ tr('settings.collapse_sidebar') }}">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16M16 9l-3 3 3 3"/></svg>
<span class="sidebar-collapse-caption" data-i18n="settings.collapse_sidebar">{{ tr('settings.collapse_sidebar') }}</span>
</button>
</div>
</div>
</aside>
<main class="content">
{% block content %}{% endblock %}
</main>
{% if current_user %}
<div class="modal-backdrop" id="audit-modal" data-refresh-seconds="{{ refresh_seconds }}" hidden>
<div class="modal-card modal-wide audit-modal" role="dialog" aria-modal="true" aria-labelledby="audit-modal-title">
<div class="modal-head">
<div><h2 id="audit-modal-title">{{ tr('settings.audit_log') }}</h2><p>{{ tr('settings.audit_log_subtitle') }}</p></div>
<button class="icon-btn" type="button" data-modal-close="audit-modal" aria-label="{{ tr('common.close') }}" data-tooltip="{{ tr('common.close') }}">×</button>
</div>
<div class="modal-body audit-modal-body">
<div class="audit-toolbar">
<div class="quick-search-wrap audit-search-wrap">
<input id="audit-quick-search" class="quick-search-input" type="search" autocomplete="off" placeholder="{{ tr('settings.audit_search') }}" aria-label="{{ tr('settings.audit_search') }}">
<button class="quick-search-clear" id="audit-quick-search-clear" type="button" aria-label="{{ tr('settings.audit_search_clear') }}" data-tooltip="{{ tr('settings.audit_search_clear') }}" hidden>×</button>
</div>
<span class="audit-retention-note">{{ tr('settings.audit_retention_note') }}</span>
</div>
<div class="table-wrap audit-table-wrap">
<table>
<thead><tr><th>{{ tr('settings.audit_time') }}</th><th>{{ tr('settings.audit_user') }}</th><th>{{ tr('settings.audit_action') }}</th><th>{{ tr('settings.audit_object') }}</th><th>{{ tr('settings.audit_result') }}</th></tr></thead>
<tbody id="audit-table-body"><tr><td colspan="5" class="empty">{{ tr('common.loading') }}</td></tr></tbody>
</table>
</div>
</div>
<div class="modal-actions">
<button type="button" class="btn" data-modal-close="audit-modal">{{ tr('common.close') }}</button>
<button type="button" class="btn primary" id="audit-refresh-button">{{ tr('common.refresh') }}</button>
</div>
</div>
</div>
{% endif %}
{% if current_user %}
<div class="modal-backdrop" id="help-modal" hidden>
<div class="modal-card help-modal" role="dialog" aria-modal="true" aria-labelledby="help-modal-title">
<div class="modal-head help-modal-head">
<div>
<h2 id="help-modal-title">{{ tr('help.title') }}</h2>
<p>{{ tr('help.subtitle') }}</p>
</div>
<button class="icon-btn" type="button" data-modal-close="help-modal" aria-label="{{ tr('common.close') }}" data-tooltip="{{ tr('common.close') }}">×</button>
</div>
<div class="help-layout">
<nav class="help-nav" aria-label="{{ tr('help.navigation') }}">
{% for section in help_sections %}
<button type="button" class="help-nav-item {% if loop.first %}active{% endif %}" data-help-target="{{ section.id }}">{{ section.title }}</button>
{% endfor %}
</nav>
<div class="help-content">
<div class="help-example-note">{{ tr('help.example_note') }}</div>
{% for section in help_sections %}
<section class="help-section" data-help-section="{{ section.id }}" {% if not loop.first %}hidden{% endif %}>
<div class="help-section-head">
<h3>{{ section.title }}</h3>
<p>{{ section.intro }}</p>
</div>
{% for topic in section.topics %}
<article class="help-topic">
<h4>{{ topic.title }}</h4>
{% for paragraph in topic.paragraphs %}<p>{{ paragraph }}</p>{% endfor %}
{% if topic.bullets %}
<ul>{% for bullet in topic.bullets %}<li>{{ bullet }}</li>{% endfor %}</ul>
{% endif %}
{% if topic.example_lines %}
<div class="help-example">
{% if topic.example_title %}<div class="help-example-title">{{ topic.example_title }}</div>{% endif %}
<pre>{{ topic.example_lines|join('\n') }}</pre>
</div>
{% endif %}
{% if topic.warning %}<div class="help-warning">{{ topic.warning }}</div>{% endif %}
</article>
{% endfor %}
</section>
{% endfor %}
</div>
</div>
<div class="modal-actions help-actions">
<button type="button" class="btn" data-modal-close="help-modal">{{ tr('common.close') }}</button>
</div>
</div>
</div>
{% endif %}
<div id="toast" class="toast"></div>
<script>
window.WGTOOLS_I18N = {language: {{ language|tojson }}, messages: {{ messages_json|safe }}};
</script>
<script src="{{ base_path }}/static/js/i18n.js?v={{ version }}&r={{ asset_rev }}"></script>
<script src="{{ base_path }}/static/js/app.js?v={{ version }}&r={{ asset_rev }}"></script>
</body>
</html>