Add app home Spaces shell and session diagnostics profile menu
Post-login lands on Spaces empty state instead of a principal dump. Profile menu exposes Session details with identity, tenant, roles/groups, and authz diagnostics for operator refinement (CSOC-WP-0004 T01/T07).
This commit is contained in:
parent
8169102866
commit
422cd613f6
10 changed files with 404 additions and 88 deletions
|
|
@ -20,15 +20,36 @@
|
|||
color: var(--color-text);
|
||||
line-height: 1.5;
|
||||
}
|
||||
header {
|
||||
header.app-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 1.5rem;
|
||||
gap: 1rem;
|
||||
padding: 0.85rem 1.5rem;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
header a { color: inherit; text-decoration: none; font-weight: 600; }
|
||||
main { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
|
||||
header.app-header a.brand {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
header .nav-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
flex: 1;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
header .nav-main a {
|
||||
color: var(--color-muted);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
header .nav-main a:hover,
|
||||
header .nav-main a.active { color: var(--color-text); }
|
||||
header .nav-end { display: flex; align-items: center; gap: 0.75rem; }
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.25rem;
|
||||
|
|
@ -42,6 +63,7 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
.btn.secondary { background: #171717; }
|
||||
.btn.small { padding: 0.4rem 0.85rem; font-size: 0.9rem; }
|
||||
.muted { color: var(--color-muted); }
|
||||
.card {
|
||||
border: 1px solid #e5e5e5;
|
||||
|
|
@ -59,22 +81,88 @@
|
|||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
}
|
||||
dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.35rem 1rem; }
|
||||
dl { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 1rem; }
|
||||
dt { color: var(--color-muted); }
|
||||
dd { margin: 0; word-break: break-all; }
|
||||
main { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
|
||||
|
||||
/* Profile menu */
|
||||
.profile-menu { position: relative; }
|
||||
.profile-menu > summary {
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.4rem 0.75rem;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 999px;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
user-select: none;
|
||||
}
|
||||
.profile-menu > summary::-webkit-details-marker { display: none; }
|
||||
.profile-menu > summary:hover { border-color: #ccc; }
|
||||
.profile-menu[open] > summary { border-color: var(--color-primary); }
|
||||
.profile-menu .menu-panel {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: calc(100% + 0.35rem);
|
||||
min-width: 14rem;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 8px 24px rgba(0,0,0,0.08);
|
||||
padding: 0.4rem 0;
|
||||
z-index: 40;
|
||||
}
|
||||
.profile-menu .menu-panel a,
|
||||
.profile-menu .menu-panel button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 0.55rem 1rem;
|
||||
border: none;
|
||||
background: none;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.profile-menu .menu-panel a:hover,
|
||||
.profile-menu .menu-panel button:hover { background: #f5f5f5; }
|
||||
.profile-menu .menu-meta {
|
||||
padding: 0.5rem 1rem 0.35rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--color-muted);
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="{% url 'core:landing' %}">{{ site_name }}</a>
|
||||
<nav>
|
||||
{% if user.is_authenticated %}
|
||||
<a class="btn secondary" href="{% url 'identity:logout' %}">Sign out</a>
|
||||
{% else %}
|
||||
<a class="btn" href="{% url 'identity:login' %}">Sign in</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<header class="app-header">
|
||||
<a class="brand" href="{% if user.is_authenticated %}{% url 'core:app_home' %}{% else %}{% url 'core:landing' %}{% endif %}">{{ site_name }}</a>
|
||||
{% if user.is_authenticated %}
|
||||
<nav class="nav-main" aria-label="Main">
|
||||
<a href="{% url 'core:app_home' %}" {% if request.resolver_match.url_name == 'app_home' %}class="active"{% endif %}>Spaces</a>
|
||||
</nav>
|
||||
<div class="nav-end">
|
||||
<details class="profile-menu">
|
||||
<summary title="Account menu">{{ nav_display_name|default:user.get_username }}</summary>
|
||||
<div class="menu-panel" role="menu">
|
||||
<div class="menu-meta">Signed in</div>
|
||||
<a href="{% url 'core:account_session' %}" role="menuitem">Session details</a>
|
||||
<a href="{% url 'identity:logout' %}" role="menuitem">Sign out</a>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="nav-end">
|
||||
<a class="btn small" href="{% url 'identity:login' %}">Sign in</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
<main>
|
||||
{% if messages %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue