Skip to content

Commit 7fa95c8

Browse files
authored
Merge pull request #7 from devqubit-labs/chore/post-migration-setup
Post migration adjustments
2 parents ef700fb + 0e66c9f commit 7fa95c8

2 files changed

Lines changed: 101 additions & 17 deletions

File tree

packages/devqubit-engine/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ with track(project="my-experiment") as run:
3636
Circuit capture requires SDK-specific adapters (separate packages):
3737

3838
```bash
39-
pip install devqubit-qiskit # Qiskit + Aer
40-
pip install devqubit-qiskit-runtime # IBM Quantum Runtime
41-
pip install devqubit-braket # Amazon Braket
42-
pip install devqubit-cirq # Google Cirq
43-
pip install devqubit-pennylane # PennyLane
39+
pip install devqubit[qiskit] # Qiskit + Aer
40+
pip install devqubit[qiskit-runtime] # IBM Quantum Runtime
41+
pip install devqubit[braket] # Amazon Braket
42+
pip install devqubit[cirq] # Google Cirq
43+
pip install devqubit[pennylane] # PennyLane
4444
```
4545

4646
## Configuration

packages/devqubit-ui/src/devqubit_ui/templates/base.html

Lines changed: 96 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959

6060
.logo { font-weight: 700; font-size: 1.25rem; color: var(--primary); }
6161
.logo:hover { text-decoration: none; color: var(--primary-light); }
62+
.logo .teams-badge {
63+
font-size: 0.625rem;
64+
color: var(--gray-500);
65+
margin-left: 0.25rem;
66+
vertical-align: super;
67+
text-transform: uppercase;
68+
letter-spacing: 0.05em;
69+
}
6270

6371
nav { display: flex; gap: 1.5rem; flex: 1; }
6472
nav a { color: var(--gray-300); transition: color 0.15s; }
@@ -263,7 +271,7 @@
263271
/* Fade transition for HTMX swaps */
264272
.htmx-swapping { opacity: 0; transition: opacity 0.1s ease-out; }
265273

266-
/* User menu (Teams) */
274+
/* User menu (for Teams integration) */
267275
.user-menu {
268276
position: relative;
269277
}
@@ -276,6 +284,8 @@
276284
border-radius: 6px;
277285
cursor: pointer;
278286
color: var(--gray-300);
287+
background: none;
288+
border: none;
279289
transition: background-color 0.15s;
280290
}
281291

@@ -297,6 +307,14 @@
297307
color: white;
298308
}
299309

310+
.user-name {
311+
font-size: 0.875rem;
312+
max-width: 120px;
313+
overflow: hidden;
314+
text-overflow: ellipsis;
315+
white-space: nowrap;
316+
}
317+
300318
.user-menu-dropdown {
301319
position: absolute;
302320
top: 100%;
@@ -308,23 +326,55 @@
308326
min-width: 200px;
309327
z-index: 1000;
310328
display: none;
329+
overflow: hidden;
311330
}
312331

313332
.user-menu-dropdown.open { display: block; }
314333

315-
.user-menu-dropdown a {
316-
display: block;
334+
.user-menu-dropdown .user-info {
317335
padding: 0.75rem 1rem;
336+
border-bottom: 1px solid var(--gray-200);
337+
}
338+
339+
.user-menu-dropdown .user-info-name {
340+
font-weight: 500;
341+
color: var(--gray-900);
342+
}
343+
344+
.user-menu-dropdown .user-info-email {
345+
font-size: 0.8125rem;
346+
color: var(--gray-500);
347+
}
348+
349+
.user-menu-dropdown a,
350+
.user-menu-dropdown button.menu-item {
351+
display: block;
352+
width: 100%;
353+
padding: 0.625rem 1rem;
318354
color: var(--gray-700);
319-
border-bottom: 1px solid var(--gray-100);
355+
background: none;
356+
border: none;
357+
text-align: left;
358+
font-size: 0.875rem;
359+
cursor: pointer;
360+
text-decoration: none;
320361
}
321362

322-
.user-menu-dropdown a:hover {
363+
.user-menu-dropdown a:hover,
364+
.user-menu-dropdown button.menu-item:hover {
323365
background: var(--gray-50);
324366
text-decoration: none;
325367
}
326368

327-
.user-menu-dropdown a:last-child { border-bottom: none; }
369+
.user-menu-dropdown .menu-divider {
370+
height: 1px;
371+
background: var(--gray-200);
372+
margin: 0;
373+
}
374+
375+
.user-menu-dropdown .danger {
376+
color: var(--danger);
377+
}
328378

329379
/* Alert messages */
330380
.alert {
@@ -345,22 +395,45 @@
345395
<header>
346396
<div class="container">
347397
{% block logo %}
348-
<a href="/" class="logo">⚛ devqubit</a>
398+
<a href="/" class="logo">⚛ devqubit{% if current_user %}<span class="teams-badge">teams</span>{% endif %}</a>
349399
{% endblock %}
350400

351401
<nav>
352402
{% block nav_start %}{% endblock %}
353-
<a href="/runs" class="{% if request.url.path == '/runs' %}active{% endif %}">Runs</a>
354-
<a href="/projects" class="{% if request.url.path == '/projects' %}active{% endif %}">Projects</a>
355-
<a href="/groups" class="{% if request.url.path == '/groups' %}active{% endif %}">Groups</a>
403+
<a href="/runs" class="{% if request.url.path == '/runs' or request.url.path.startswith('/runs/') %}active{% endif %}">Runs</a>
404+
<a href="/projects" class="{% if request.url.path == '/projects' or request.url.path.startswith('/projects/') %}active{% endif %}">Projects</a>
405+
<a href="/groups" class="{% if request.url.path == '/groups' or request.url.path.startswith('/groups/') %}active{% endif %}">Groups</a>
356406
<a href="/diff" class="{% if request.url.path == '/diff' %}active{% endif %}">Compare</a>
357407
<a href="/search" class="{% if request.url.path == '/search' %}active{% endif %}">Search</a>
358408
{% block nav_items %}{% endblock %}
359409
</nav>
360410

361411
<div class="nav-right">
362412
{% block nav_right %}
363-
{# Teams overrides this block to show user menu #}
413+
{# Teams user menu - shown when current_user is available #}
414+
{% if current_user %}
415+
<div class="user-menu" id="userMenu">
416+
<button class="user-menu-toggle" onclick="document.getElementById('userMenuDropdown').classList.toggle('open')">
417+
<div class="user-avatar">{{ (current_user.name or current_user.email)[:2] | upper }}</div>
418+
<span class="user-name">{{ current_user.name or current_user.email.split('@')[0] }}</span>
419+
</button>
420+
<div class="user-menu-dropdown" id="userMenuDropdown">
421+
<div class="user-info">
422+
<div class="user-info-name">{{ current_user.name or 'User' }}</div>
423+
<div class="user-info-email">{{ current_user.email }}</div>
424+
</div>
425+
<a href="/settings/tokens">API Tokens</a>
426+
<a href="/settings/profile">Profile</a>
427+
{% if current_user.is_admin %}
428+
<a href="/admin">Admin</a>
429+
{% endif %}
430+
<div class="menu-divider"></div>
431+
<form action="/auth/logout" method="post" style="margin: 0;">
432+
<button type="submit" class="menu-item danger">Sign Out</button>
433+
</form>
434+
</div>
435+
</div>
436+
{% endif %}
364437
{% endblock %}
365438
</div>
366439
</div>
@@ -378,6 +451,17 @@
378451

379452
{% block footer %}{% endblock %}
380453

381-
{% block scripts %}{% endblock %}
454+
{% block scripts %}
455+
<script>
456+
// Close user menu when clicking outside
457+
document.addEventListener('click', function(e) {
458+
var menu = document.getElementById('userMenu');
459+
var dropdown = document.getElementById('userMenuDropdown');
460+
if (menu && dropdown && !menu.contains(e.target)) {
461+
dropdown.classList.remove('open');
462+
}
463+
});
464+
</script>
465+
{% endblock %}
382466
</body>
383467
</html>

0 commit comments

Comments
 (0)