{# ============================================================ MMaxAI Hosting Panel — base layout (Copilot style) ------------------------------------------------------------ New shell: persistent sidebar + sticky topbar + cmd-bar. Loads panel.css for legacy components (.card, .btn, .badge, .form-*, .table) and copilot.css for the new layout tokens. ============================================================ #} {% block title %}{{ title }}{% endblock %} · {{ panel_title or "MMaxAI Hosting" }} {% if user %}
{# ---------------- Sidebar ---------------- #}
{# ---------------- Main wrap ---------------- #}
{% block crumbs %} Workspace /

{{ title }}

{% endblock %}
{% block topbar_extra %}{% endblock %}
{{ panel_icon('user')|safe }} {{ panel_icon('logout')|safe }}
{% if request.state.plan_tier_outdated %}
⚠️
{{ _("Site updated") }} {{ _("Your account was on an old plan. We have automatically moved you to the free tier.") }}
{{ _("Need help? Telegram") }} @helpforwacodebot
{% endif %}
{% block content %}{% endblock %}
{# ---------------- Language switcher dropdown ---------------- #} {% else %} {# ---------------- Logged-out fallback ---------------- #} {# Public pages (login/register) do NOT extend base.html — they have their own full document. This branch only fires if a child template was wrongly rendered for an unauthenticated request. Render an empty shell so the child template's `{% block content %}` override still works without nesting. Note: jinja forbids defining the same block twice in one template, even across mutually-exclusive branches — so the fallback here uses a distinct ``public_content`` block name. #}
{% block public_content %}{% endblock %}
{% endif %}
{# ---------------- Flash messages ---------------- #} {# Server queues one-shot toasts in the ``panel_flash`` cookie via ``_flash_set`` in routes.py. ``_flash_middleware`` in app.py pops the cookie on EVERY request — not just /login and /register — and stuffs the decoded payload on ``request.state.flashes``. Any template that extends ``base.html`` therefore gets the toast regardless of where the POST->302 landed (e.g. POST /login redirects to /dashboard, which used to silently miss the "Welcome back!" toast). ``panel_flash.js`` reads the array and renders toasts top-right with the upgraded animations. #} {# ---------------- AI chat overlay ---------------- #} {% block scripts %}{% endblock %}