*Privados* was a section holding a list of conversations, and *Miembros* was a page reached from the footer. That is backwards: the list of conversations is a by-product and the people are the thing. So the navigation swaps them — **Inicio · Muro · Miembros · Publicaciones · Calendario · Gestión** — the grid becomes faces and names, and writing to somebody and reading what the two of you have written each other both happen on their page. `/comunidad/miembro/<usuario>` is new, keyed on the login so the address matches the public one. It carries their photo, bio and links, a link out to their public page when they have published one, the whole conversation with them, the write box, block/unblock, and — for an admin — the controls that used to be folded into every card in the directory. `conversation.html` and `inbox.html` are gone; `member.html` replaces both. The split between the two modules did not move. `messages.py` still owns every rule about private messages — who may read a conversation, what counts as having read it, when the conversation comes into being, who may write to whom — and hands the page its contents through the new `history()`. What is left of its routes are the ones that change something: a message sent, a block set or lifted. `members.show` renders. Not losing the unread badge is the part with a real design question in it, and it takes four things: the badge moves to *Miembros*, each card carries its own count, the cards with something unread sort to the top of the grid, and Inicio keeps the panel it already had. Without the sort, the person waiting for an answer is wherever the alphabet put them, which is the one thing the inbox did that a grid of faces does not. Names now link inside. `_person.html` used to link to somebody's *public* page and only when they had published one, so most names on the wall were plain text and there was no way to get from a post to writing to its author. Every caller is behind the login, so it points at the members-area page instead — with the tombstone as the one name with nothing behind it. Old addresses redirect: `/comunidad/privados` to the directory, `/comunidad/privados/con/<id>` to that person's page. The POST that sends a message keeps its address, which is what the form on the new page uses. 512 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
90 lines
3.6 KiB
HTML
90 lines
3.6 KiB
HTML
{# Chrome deliberately mirrors the public site's header and footer, so moving
|
|
between vienalatina.com and the members area does not feel like leaving. #}
|
|
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>{% block title %}Comunidad{% endblock %} — Viena Latina</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='board.css') }}">
|
|
<script src="{{ url_for('static', filename='board.js') }}" defer></script>
|
|
</head>
|
|
<body>
|
|
|
|
<header class="site-bar">
|
|
<div class="site-bar__inner">
|
|
<a class="site-bar__brand" href="/"><span class="site-bar__brand-text">Viena Latina</span></a>
|
|
{% if g.member %}
|
|
{# <details> rather than a button with a handler: the CSP has no
|
|
'unsafe-inline', so a menu that needs onclick="" is a menu that
|
|
silently never opens. This one works with the CSS and the HTML
|
|
alone. #}
|
|
<details class="account">
|
|
<summary class="account__name">{{ g.member.display_name }}</summary>
|
|
<div class="account__menu">
|
|
<a href="{{ url_for('profiles.edit') }}">Mi perfil</a>
|
|
<a href="{{ url_for('members.export') }}">Descargar mis datos</a>
|
|
<form method="post" action="{{ url_for('auth.logout') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="linkish" type="submit">Salir</button>
|
|
</form>
|
|
</div>
|
|
</details>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if g.member %}
|
|
<nav class="site-bar__pages" aria-label="Secciones">
|
|
{# Six entries, and five of them are the same for everybody. The role
|
|
only decides whether Gestión is there — it used to decide three of
|
|
them, which is how an ordinary member ended up signing in to a wall
|
|
and a member list with their own profile and their own private
|
|
messages hidden from them. Account items are in the corner menu
|
|
above, because "Mi perfil" is not a section of the site.
|
|
|
|
*Privados* used to be here, holding a list of conversations. The
|
|
people are the section now and the messages live on each person's
|
|
page, so the unread badge hangs on Miembros: it is the only thing
|
|
left that tells a member somebody wrote to them, which is why it is
|
|
also repeated on the card of whoever wrote. #}
|
|
<ul class="page-nav">
|
|
<li><a href="{{ url_for('home.index') }}">Inicio</a></li>
|
|
<li><a href="{{ url_for('board.threads') }}">Muro</a></li>
|
|
<li>
|
|
<a href="{{ url_for('members.index') }}">Miembros{% set unread = unread_private() %}{% if unread %} <span class="tag">{{ unread }}</span>{% endif %}</a>
|
|
</li>
|
|
<li>
|
|
{# The badge counts what is waiting for a moderator, so for
|
|
anybody else the function returns 0 and nothing is drawn. #}
|
|
<a href="{{ url_for('submissions.index') }}">Publicaciones{% set waiting = pending_review() %}{% if waiting %} <span class="tag">{{ waiting }}</span>{% endif %}</a>
|
|
</li>
|
|
<li><a href="{{ url_for('events.month') }}">Calendario</a></li>
|
|
{% if g.member.role in ('owner', 'admin') %}
|
|
<li><a href="{{ url_for('home.gestion') }}">Gestión</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<div class="page-shell">
|
|
<main class="feed">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% for category, message in messages %}
|
|
<p class="flash flash--{{ category }}">{{ message }}</p>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
|
|
{% block main %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="site-foot">
|
|
<a href="/">Ir al sitio público</a>
|
|
<div class="site-foot__legal">Viena Latina © {{ current_year }} · Área privada</div>
|
|
</footer>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|