Commit 1ff115ac97

1ff115ac97e41f6cb26a121f20f0d39e4b220afe

parent: 02745527b1

Verified · cmc ci/build: success ci/quality: success ci/test: success

cmc <hello@cleberg.net> · 2026-11-25 05:34 UTC

web: redesign dashboard (/) and profile views (/owner) with cards, live filters, and tab swaps

Layout: unified · split

Changed files (4)
internal/web/static/app.js +48 −9
@@ -366,31 +366,43 @@
366 } 366 }
367 }); 367 });
368 368
369 // ---- 8. Live client-side table filter (/admin/users) ---- 369 // ---- 8. Live client-side table & list filters ----
370 document.addEventListener('input', (e) => { 370 document.addEventListener('input', (e) => {
371 const inp = e.target.closest('input[data-filter-table]'); 371 const inp = e.target.closest('input[data-filter-table], input[data-filter-list]');
372 if (!inp) return; 372 if (!inp) return;
373 const table = document.getElementById(inp.dataset.filterTable);
374 if (!table) return;
375 const q = inp.value.trim().toLowerCase(); 373 const q = inp.value.trim().toLowerCase();
376 for (const row of table.querySelectorAll('tbody tr')) { 374 if (inp.dataset.filterTable) {
377 row.hidden = q !== '' && !row.textContent.toLowerCase().includes(q); 375 const table = document.getElementById(inp.dataset.filterTable);
376 if (!table) return;
377 for (const row of table.querySelectorAll('tbody tr')) {
378 row.hidden = q !== '' && !row.textContent.toLowerCase().includes(q);
379 }
380 return;
381 }
382 const list = document.getElementById(inp.dataset.filterList);
383 if (!list) return;
384 const ul = list.tagName === 'UL' ? list : list.querySelector('ul');
385 if (!ul) return;
386 for (const item of ul.querySelectorAll(':scope > li')) {
387 if (item.classList.contains('empty')) continue;
388 item.hidden = q !== '' && !item.textContent.toLowerCase().includes(q);
378 } 389 }
379 }); 390 });
380 391
381 // ---- 9. In-place Refresh (/admin) ---- 392 // ---- 9. In-place Refresh (/admin, /) ----
382 document.addEventListener('click', async (e) => { 393 document.addEventListener('click', async (e) => {
383 const btn = e.target.closest('button[data-refresh]'); 394 const btn = e.target.closest('button[data-refresh]');
384 if (!btn) return; 395 if (!btn) return;
385 const url = btn.dataset.refresh; 396 const url = btn.dataset.refresh;
397 const targetId = btn.dataset.refreshTarget || 'admin-queues';
386 btn.disabled = true; 398 btn.disabled = true;
387 try { 399 try {
388 const res = await fetch(url, { credentials: 'same-origin' }); 400 const res = await fetch(url, { credentials: 'same-origin' });
389 if (!res.ok) { showToast('Refresh failed', true); return; } 401 if (!res.ok) { showToast('Refresh failed', true); return; }
390 const html = await res.text(); 402 const html = await res.text();
391 const doc = new DOMParser().parseFromString(html, 'text/html'); 403 const doc = new DOMParser().parseFromString(html, 'text/html');
392 const next = doc.getElementById('admin-queues'); 404 const next = doc.getElementById(targetId);
393 const cur = document.getElementById('admin-queues'); 405 const cur = document.getElementById(targetId);
394 if (next && cur) { 406 if (next && cur) {
395 cur.replaceWith(next); 407 cur.replaceWith(next);
396 initScrollSpy(); 408 initScrollSpy();
@@ -403,6 +415,33 @@
403 } 415 }
404 }); 416 });
405 417
418 // ---- 9b. Smooth in-place tab switching (profile tabs) ----
419 document.addEventListener('click', async (e) => {
420 if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
421 const a = e.target.closest('nav[data-tab-swap] a');
422 if (!a) return;
423 const targetId = a.closest('nav[data-tab-swap]').dataset.tabSwap;
424 const cur = document.getElementById(targetId);
425 if (!cur) return;
426 e.preventDefault();
427 try {
428 const res = await fetch(a.href, { credentials: 'same-origin' });
429 if (!res.ok) { location.href = a.href; return; }
430 const html = await res.text();
431 const doc = new DOMParser().parseFromString(html, 'text/html');
432 const next = doc.getElementById(targetId);
433 if (!next) { location.href = a.href; return; }
434 cur.replaceWith(next);
435 history.pushState({ tabSwap: targetId }, '', a.href);
436 initCopyButtons(next);
437 } catch {
438 location.href = a.href;
439 }
440 });
441 window.addEventListener('popstate', (e) => {
442 if (e.state && e.state.tabSwap) location.reload();
443 });
444
406 // ---- 10. Scroll-spy on sticky section navs ---- 445 // ---- 10. Scroll-spy on sticky section navs ----
407 function initScrollSpy() { 446 function initScrollSpy() {
408 const nav = document.querySelector('nav[data-scrollspy]'); 447 const nav = document.querySelector('nav[data-scrollspy]');
internal/web/static/style.css +60 −3
@@ -2207,15 +2207,15 @@ dialog.cmdk::backdrop { background: rgb(0 0 0 / 0.45); }
2207} 2207}
2208 2208
2209/* ---- account & admin redesign ---- */ 2209/* ---- account & admin redesign ---- */
2210.setcard { 2210.setcard, section.activity {
2211 background: var(--canvas); 2211 background: var(--canvas);
2212 border: 1px solid var(--faint); 2212 border: 1px solid var(--faint);
2213 border-radius: var(--r-card); 2213 border-radius: var(--r-card);
2214 padding: var(--sp-5); 2214 padding: var(--sp-5);
2215 margin: 0 0 var(--sp-5); 2215 margin: 0 0 var(--sp-5);
2216} 2216}
2217.setcard > h2:first-child { margin-top: 0; } 2217.setcard > h2:first-child, section.activity > h2:first-child { margin-top: 0; }
2218.setcard > h2 { display: flex; align-items: center; gap: var(--sp-2); } 2218.setcard > h2, section.activity > h2 { display: flex; align-items: center; gap: var(--sp-2); }
2219.setcard-danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--faint)); } 2219.setcard-danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--faint)); }
2220.setcard .tablewrap { overflow: visible; } 2220.setcard .tablewrap { overflow: visible; }
2221@media (max-width: 52rem) { 2221@media (max-width: 52rem) {
@@ -2266,3 +2266,60 @@ html.js form[data-autosave] button[type="submit"] { display: none; }
2266} 2266}
2267.toast-show { opacity: 1; transform: translateY(0); } 2267.toast-show { opacity: 1; transform: translateY(0); }
2268.toast-err { background: var(--bad); color: var(--canvas); } 2268.toast-err { background: var(--bad); color: var(--canvas); }
2269
2270/* ---- dashboard & profile polish ---- */
2271.dashpins, .feedcol {
2272 background: var(--canvas);
2273 border: 1px solid var(--faint);
2274 border-radius: var(--r-card);
2275 padding: var(--sp-4);
2276}
2277.dashcard-head {
2278 display: flex;
2279 align-items: baseline;
2280 justify-content: space-between;
2281 gap: var(--sp-2);
2282 margin-bottom: var(--sp-2);
2283}
2284.dashcard-head h2 { margin: 0; }
2285.dashfilter {
2286 width: 100%;
2287 margin: 0 0 var(--sp-2);
2288}
2289.dashsec { margin-bottom: var(--sp-5); }
2290.dashsec h2 {
2291 display: flex;
2292 align-items: center;
2293 gap: var(--sp-2);
2294 margin: 0 0 var(--sp-2);
2295}
2296.profilecard {
2297 background: var(--canvas);
2298 border: 1px solid var(--faint);
2299 border-radius: var(--r-card);
2300 padding: var(--sp-5);
2301 margin-bottom: var(--sp-4);
2302}
2303.profiletop {
2304 display: flex;
2305 align-items: flex-start;
2306 gap: var(--sp-4);
2307 flex-wrap: wrap;
2308}
2309.avatar-lg {
2310 width: 52px;
2311 height: 52px;
2312 font-size: var(--fs-5);
2313}
2314.profileid { flex: 1; min-width: 14rem; }
2315.profileid h1 { margin: 0 0 var(--sp-1); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
2316.profilemeta {
2317 display: flex;
2318 flex-wrap: wrap;
2319 gap: var(--sp-2) var(--sp-4);
2320 font-size: var(--fs-1);
2321 color: var(--muted);
2322 margin-top: var(--sp-2);
2323}
2324.profilemeta a { color: var(--muted); }
2325.profilemeta a:hover { color: var(--link); }
internal/web/templates/dashboard.html +25 −7
@@ -12,25 +12,38 @@
12</ul> 12</ul>
13{{end}} 13{{end}}
14{{define "queue"}} 14{{define "queue"}}
15<section class="dashsec">
15<h2 id="{{$.ID}}">{{$.Title}} <span class="count">{{len $.Items}}</span></h2> 16<h2 id="{{$.ID}}">{{$.Title}} <span class="count">{{len $.Items}}</span></h2>
16{{if $.Hint}}<p class="hint">{{$.Hint}}</p>{{end}} 17{{if $.Hint}}<p class="hint">{{$.Hint}}</p>{{end}}
17{{template "itemlist" dict "Items" $.Items "Kind" $.Kind "Empty" $.Empty}} 18{{template "itemlist" dict "Items" $.Items "Kind" $.Kind "Empty" $.Empty}}
19</section>
18{{end}} 20{{end}}
19{{define "tile"}}{{if $.N}}<a class="tile wants" href="#{{$.ID}}"><b>{{$.N}}</b><span>{{$.Label}}</span></a>{{else}}<div class="tile"><b>0</b><span>{{$.Label}}</span></div>{{end}}{{end}} 21{{define "tile"}}{{if $.N}}<a class="tile wants" href="#{{$.ID}}"><b>{{$.N}}</b><span>{{$.Label}}</span></a>{{else}}<div class="tile"><b>0</b><span>{{$.Label}}</span></div>{{end}}{{end}}
20{{define "content"}} 22{{define "content"}}
23<div class="pagehead">
24 <h1>Dashboard</h1>
25 <span class="grow"></span>
26 <button type="button" class="btn" data-refresh="/" data-refresh-target="dash-root">Refresh</button>
27 <a class="button" href="/new">New repository</a>
28</div>
29
30<div id="dash-root">
21<div class="dashgrid"> 31<div class="dashgrid">
22 32
23<aside class="dashpins" aria-label="Pinned repositories"> 33<aside class="dashpins" aria-label="Pinned repositories">
24 <h2 class="colhead">Pinned</h2> 34 <div class="dashcard-head">
25 {{if .Pins}}<p class="meta">issues · merge requests · last build</p> 35 <h2 class="colhead">Pinned</h2>
26 <ul class="pins"> 36 <a class="meta" href="/{{.Viewer}}/-/repositories">All →</a>
37 </div>
38 {{if .Pins}}<input type="search" class="dashfilter" aria-label="Filter pinned repositories" placeholder="Filter pinned…" data-filter-list="dash-pins-list">
39 <p class="meta">issues · MRs · last build</p>
40 <ul id="dash-pins-list" class="pins">
27 {{range .Pins}}<li><a href="/{{.Owner}}/{{.Name}}"><span class="owner">{{.Owner}}/</span>{{.Name}}</a><span class="n" title="{{.Issues}} open issue{{if ne .Issues 1}}s{{end}}, {{.MRs}} open merge request{{if ne .MRs 1}}s{{end}}{{with .Build}}, last build {{.}}{{end}}"><b{{if .Issues}} class="wants"{{end}}>{{.Issues}} <span class="vh">open issues</span></b> <b{{if .MRs}} class="wants"{{end}}>{{.MRs}} <span class="vh">open merge requests</span></b> <span class="dot{{if eq .Build "success"}} ok{{else if or (eq .Build "failure") (eq .Build "error")}} bad{{else if or (eq .Build "pending") (eq .Build "running")}} pend{{end}}"><span class="vh">{{with .Build}}last build {{.}}{{else}}no builds{{end}}</span></span></span></li> 41 {{range .Pins}}<li><a href="/{{.Owner}}/{{.Name}}"><span class="owner">{{.Owner}}/</span>{{.Name}}</a><span class="n" title="{{.Issues}} open issue{{if ne .Issues 1}}s{{end}}, {{.MRs}} open merge request{{if ne .MRs 1}}s{{end}}{{with .Build}}, last build {{.}}{{end}}"><b{{if .Issues}} class="wants"{{end}}>{{.Issues}} <span class="vh">open issues</span></b> <b{{if .MRs}} class="wants"{{end}}>{{.MRs}} <span class="vh">open merge requests</span></b> <span class="dot{{if eq .Build "success"}} ok{{else if or (eq .Build "failure") (eq .Build "error")}} bad{{else if or (eq .Build "pending") (eq .Build "running")}} pend{{end}}"><span class="vh">{{with .Build}}last build {{.}}{{else}}no builds{{end}}</span></span></span></li>
28 {{end}}</ul> 42 {{end}}</ul>
29 {{else}}<p class="none">nothing pinned — press Pin on a repository you visit</p>{{end}} 43 {{else}}<p class="none">Nothing pinned — press Pin on a repository you visit.</p>{{end}}
30</aside> 44</aside>
31 45
32<section class="dashmain"> 46<section class="dashmain">
33<h1>Dashboard</h1>
34<div class="tiles"> 47<div class="tiles">
35 {{template "tile" dict "N" (len .Reviews) "ID" "reviews" "Label" "waiting on your review"}} 48 {{template "tile" dict "N" (len .Reviews) "ID" "reviews" "Label" "waiting on your review"}}
36 {{template "tile" dict "N" (len .Assigned) "ID" "assigned" "Label" "assigned to you"}} 49 {{template "tile" dict "N" (len .Assigned) "ID" "assigned" "Label" "assigned to you"}}
@@ -41,8 +54,9 @@
41{{if .Assigned}}{{template "queue" dict "ID" "assigned" "Title" "Assigned to you" "Items" .Assigned "Kind" "issues" "Empty" "Nothing assigned to you"}}{{end}} 54{{if .Assigned}}{{template "queue" dict "ID" "assigned" "Title" "Assigned to you" "Items" .Assigned "Kind" "issues" "Empty" "Nothing assigned to you"}}{{end}}
42{{if .MRs}}{{template "queue" dict "ID" "mrs" "Title" "Open merge requests" "Items" .MRs "Kind" "mrs" "Empty" "No open merge requests" "Hint" "Your MRs across all repos."}}{{end}} 55{{if .MRs}}{{template "queue" dict "ID" "mrs" "Title" "Open merge requests" "Items" .MRs "Kind" "mrs" "Empty" "No open merge requests" "Hint" "Your MRs across all repos."}}{{end}}
43{{if .Issues}}{{template "queue" dict "ID" "issues" "Title" "Open issues" "Items" .Issues "Kind" "issues" "Empty" "No open issues" "Hint" "Your issues across all repos."}}{{end}} 56{{if .Issues}}{{template "queue" dict "ID" "issues" "Title" "Open issues" "Items" .Issues "Kind" "issues" "Empty" "No open issues" "Hint" "Your issues across all repos."}}{{end}}
44{{if not (or .Reviews .Assigned .MRs .Issues)}}<p class="none">Nothing open.</p>{{end}} 57{{if not (or .Reviews .Assigned .MRs .Issues)}}<div class="setcard"><p class="none">All clear — nothing open or waiting on you.</p></div>{{end}}
45{{range .Queries}} 58{{range .Queries}}
59<section class="dashsec">
46<h2 id="query-{{.Name}}"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">{{.Name}}</a> <span class="count">{{.Count}}</span></h2> 60<h2 id="query-{{.Name}}"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">{{.Name}}</a> <span class="count">{{.Count}}</span></h2>
47<p class="hint"><code>{{.Query}}</code></p> 61<p class="hint"><code>{{.Query}}</code></p>
48{{if .Error}}<p class="none">{{.Error}}</p>{{else}} 62{{if .Error}}<p class="none">{{.Error}}</p>{{else}}
@@ -57,14 +71,18 @@
57</ul> 71</ul>
58{{if gt .Count (len .Items)}}<p class="pager"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">all {{.Count}} →</a></p>{{end}} 72{{if gt .Count (len .Items)}}<p class="pager"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">all {{.Count}} →</a></p>{{end}}
59{{end}} 73{{end}}
74</section>
60{{end}} 75{{end}}
61</section> 76</section>
62 77
63<aside class="feedcol" aria-label="Recent activity"> 78<aside class="feedcol" aria-label="Recent activity">
64 <h2 class="colhead">Recent activity</h2> 79 <div class="dashcard-head">
80 <h2 class="colhead">Recent activity</h2>
81 </div>
65 {{range .Feed}}<p class="feedline"><a href="/{{.Actor}}">{{.Actor}}</a> {{.Verb}} <a href="{{.URL}}"{{if .Jobs}} title="{{join .Jobs ", "}}"{{end}}>{{.Ref}}</a>{{if .Extra}} {{.Extra}}{{end}}<br><span class="none">{{.Repo}} · <span title="{{whenT .WhenT}}">{{ago .WhenT}}</span></span></p> 82 {{range .Feed}}<p class="feedline"><a href="/{{.Actor}}">{{.Actor}}</a> {{.Verb}} <a href="{{.URL}}"{{if .Jobs}} title="{{join .Jobs ", "}}"{{end}}>{{.Ref}}</a>{{if .Extra}} {{.Extra}}{{end}}<br><span class="none">{{.Repo}} · <span title="{{whenT .WhenT}}">{{ago .WhenT}}</span></span></p>
66 {{else}}<p class="none">No activity yet</p>{{end}} 83 {{else}}<p class="none">No activity yet</p>{{end}}
67</aside> 84</aside>
68 85
86</div>
69</div> 87</div>
70{{end}} 88{{end}}
internal/web/templates/owner.html +55 −36
@@ -1,20 +1,26 @@
1{{define "title"}}{{.Owner}} · {{.Site}}{{end}} 1{{define "title"}}{{.Owner}} · {{.Site}}{{end}}
2{{define "content"}} 2{{define "content"}}
3<section class="profilehead"> 3<section class="profilehead profilecard">
4<h1>{{.Owner}} <span class="chip chip-neutral">{{.Kind}}</span></h1> 4 <div class="profiletop">
5{{if .Profile.Description}}<p class="desc lede">{{.Profile.Description}}</p>{{end}} 5 <span class="avatar avatar-lg" aria-hidden="true">{{initial .Owner}}</span>
6{{if .Profile.Website}}<p class="meta"><a href="{{.Profile.Website}}" rel="nofollow me">{{.Profile.Website}}</a></p>{{end}} 6 <div class="profileid">
7{{if .Profile.Links}}<p class="meta">{{range $i, $l := .Profile.Links}}{{if $i}} · {{end}}<a href="{{$l.URL}}" rel="nofollow me">{{if $l.Label}}{{$l.Label}}{{else}}{{$l.URL}}{{end}}</a>{{end}}</p>{{end}} 7 <h1>{{.Owner}} <span class="chip chip-neutral">{{.Kind}}</span></h1>
8{{if .Orgs}}<p class="meta">member of {{range .Orgs}}<a class="memberchip" href="/{{.Name}}">{{.Name}}</a> {{end}}</p>{{end}} 8 {{if .Profile.Description}}<p class="desc lede">{{.Profile.Description}}</p>{{end}}
9{{if .Members}}<p class="meta">members {{range .Members}}<a class="memberchip" href="/{{.Name}}">{{.Name}} <span class="role">{{.Role}}</span></a> {{end}}</p>{{end}} 9 <div class="profilemeta">
10{{if and (eq .Kind "org") .Repos}}<p class="meta"><a href="/{{.Owner}}/-/labels">labels</a> · <a href="/{{.Owner}}/-/milestones">milestones</a></p>{{end}} 10 {{if .Profile.Website}}<a href="{{.Profile.Website}}" rel="nofollow me">{{.Profile.Website}}</a>{{end}}
11 {{range .Profile.Links}}<a href="{{.URL}}" rel="nofollow me">{{if .Label}}{{.Label}}{{else}}{{.URL}}{{end}}</a>{{end}}
12 {{if and (eq .Kind "org") .Repos}}<a href="/{{.Owner}}/-/labels">Labels</a><a href="/{{.Owner}}/-/milestones">Milestones</a>{{end}}
13 </div>
14 </div>
15 {{if .Self}}<span class="grow"></span><a class="button btn" href="/settings#profile">Edit profile</a>{{end}}
16 </div>
17 {{if .Orgs}}<p class="meta">Member of {{range .Orgs}}<a class="memberchip" href="/{{.Name}}">{{.Name}}</a> {{end}}</p>{{end}}
18 {{if .Members}}<p class="meta">Members {{range .Members}}<a class="memberchip" href="/{{.Name}}">{{.Name}} <span class="role">{{.Role}}</span></a> {{end}}</p>{{end}}
11</section> 19</section>
12{{if and .Notice (ne .Tab "snippets") (ne .Tab "people")}}<p class="notice" role="status">{{.Notice}}</p>{{end}} 20{{if and .Notice (ne .Tab "snippets") (ne .Tab "people")}}<p class="notice" role="status">{{.Notice}}</p>{{end}}
13{{/* The profile is sections rather than one stack: a long About used to 21
14 push the repositories off the bottom of the page (#242). About is 22<div id="owner-panel">
15 the bare /{owner}; the rest hang off /-/. A tab nobody may open is 23<nav class="tabs profiletabs" aria-label="Profile" data-tab-swap="owner-panel">
16 not offered and its URL is a 404. */}}
17<nav class="tabs profiletabs" aria-label="Profile">
18 <a {{if eq .Tab "about"}}aria-current="page" {{end}}href="/{{.Owner}}">About</a> 24 <a {{if eq .Tab "about"}}aria-current="page" {{end}}href="/{{.Owner}}">About</a>
19 <a {{if eq .Tab "repos"}}aria-current="page" {{end}}href="/{{.Owner}}/-/repositories">Repositories{{if .Repos}} <i>{{len .Repos}}</i>{{end}}</a> 25 <a {{if eq .Tab "repos"}}aria-current="page" {{end}}href="/{{.Owner}}/-/repositories">Repositories{{if .Repos}} <i>{{len .Repos}}</i>{{end}}</a>
20 {{if .Self}}<a {{if eq .Tab "bookmarks"}}aria-current="page" {{end}}href="/{{.Owner}}/-/bookmarks">Bookmarks</a>{{end}} 26 {{if .Self}}<a {{if eq .Tab "bookmarks"}}aria-current="page" {{end}}href="/{{.Owner}}/-/bookmarks">Bookmarks</a>{{end}}
@@ -25,17 +31,14 @@
25{{if eq .Tab "about"}} 31{{if eq .Tab "about"}}
26{{if .AboutHTML}}<section class="readme"><div class="rendered">{{.AboutHTML}}</div></section>{{end}} 32{{if .AboutHTML}}<section class="readme"><div class="rendered">{{.AboutHTML}}</div></section>{{end}}
27<section class="activity"> 33<section class="activity">
28<h2>activity <span class="count">{{.ActivityTotal}} in the last year</span></h2> 34<h2>Activity <span class="count">{{.ActivityTotal}} in the last year</span></h2>
29<div class="actgraph-scroll"> 35<div class="actgraph-scroll">
30<div class="actgraph"> 36<div class="actgraph">
31{{range .Activity}}<div class="actweek">{{if .Month}}<span class="actmonth">{{.Month}}</span>{{end}}{{range .Days}}<span class="actday{{if .Pad}} pad{{else}} l{{.Level}}{{end}}"{{if not .Pad}} title="{{.Count}} on {{.Date}}"{{end}}></span>{{end}}</div>{{end}} 37{{range .Activity}}<div class="actweek">{{if .Month}}<span class="actmonth">{{.Month}}</span>{{end}}{{range .Days}}<span class="actday{{if .Pad}} pad{{else}} l{{.Level}}{{end}}"{{if not .Pad}} title="{{.Count}} on {{.Date}}"{{end}}></span>{{end}}</div>{{end}}
32</div> 38</div>
33</div> 39</div>
34<p class="actlegend"><span>Less</span><span class="actday l0"></span><span class="actday l1"></span><span class="actday l2"></span><span class="actday l3"></span><span class="actday l4"></span><span>More</span></p> 40<p class="actlegend"><span>Less</span><span class="actday l0"></span><span class="actday l1"></span><span class="actday l2"></span><span class="actday l3"></span><span class="actday l4"></span><span>More</span></p>
35{{/* The graph is the year at a glance; the log is what happened lately. 41{{if .Log}}<h3 class="logsub">Recent</h3>
36 It is the newest events, not all of them — the atom feed is the one
37 that goes back. */}}
38{{if .Log}}<h3 class="logsub">recent</h3>
39<div class="ownerlog"> 42<div class="ownerlog">
40{{range .Log}}<p class="feedline"><a href="/{{.Actor}}">{{.Actor}}</a> {{.Verb}} <a href="{{.URL}}"{{if .Jobs}} title="{{join .Jobs ", "}}"{{end}}>{{.Ref}}</a>{{if .Extra}} {{.Extra}}{{end}}<br><span class="none">{{.Repo}} · <span title="{{whenT .WhenT}}">{{ago .WhenT}}</span></span></p> 43{{range .Log}}<p class="feedline"><a href="/{{.Actor}}">{{.Actor}}</a> {{.Verb}} <a href="{{.URL}}"{{if .Jobs}} title="{{join .Jobs ", "}}"{{end}}>{{.Ref}}</a>{{if .Extra}} {{.Extra}}{{end}}<br><span class="none">{{.Repo}} · <span title="{{whenT .WhenT}}">{{ago .WhenT}}</span></span></p>
41{{end}} 44{{end}}
@@ -46,10 +49,15 @@
46{{end}} 49{{end}}
47 50
48{{if eq .Tab "repos"}} 51{{if eq .Tab "repos"}}
49<ul class="repolist rows"> 52{{if .Repos}}<div class="listhead">
53 <input type="search" class="tablefilter" aria-label="Filter repositories" placeholder="Filter repositories…" data-filter-list="owner-repos">
54 <span class="spacer"></span>
55 {{if .Self}}<a class="button" href="/new">New repository</a>{{end}}
56</div>{{end}}
57<div id="owner-repos"><ul class="repolist rows">
50{{range .Repos}}{{template "reporow" .}} 58{{range .Repos}}{{template "reporow" .}}
51{{else}}<li class="empty">no visible repositories</li>{{end}} 59{{else}}<li class="empty">no visible repositories</li>{{end}}
52</ul> 60</ul></div>
53{{end}} 61{{end}}
54 62
55{{if eq .Tab "bookmarks"}} 63{{if eq .Tab "bookmarks"}}
@@ -69,7 +77,12 @@
69 77
70{{if eq .Tab "snippets"}} 78{{if eq .Tab "snippets"}}
71{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}} 79{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
72{{if .Self}}<p class="meta"><a href="/{{.Owner}}/-/snippets/new">new snippet</a> · or <code>gitbay snippet create &lt;file&gt; &lt; file</code></p>{{end}} 80{{if .Self}}<div class="listhead">
81 <p class="meta"><code>gitbay snippet create &lt;file&gt; &lt; file</code></p>
82 <span class="spacer"></span>
83 <a class="button" href="/{{.Owner}}/-/snippets/new">new snippet</a>
84</div>{{end}}
85<section class="setcard">
73{{if .SnippetRows}}<div class="tablewrap"><table class="keys"> 86{{if .SnippetRows}}<div class="tablewrap"><table class="keys">
74<tr class="cols"><th scope="col">snippet</th><th scope="col">files</th>{{if .SnippetsAll}}<th scope="col">visibility</th>{{end}}<th scope="col">updated</th></tr> 87<tr class="cols"><th scope="col">snippet</th><th scope="col">files</th>{{if .SnippetsAll}}<th scope="col">visibility</th>{{end}}<th scope="col">updated</th></tr>
75{{range .SnippetRows}}<tr> 88{{range .SnippetRows}}<tr>
@@ -80,17 +93,21 @@
80</tr> 93</tr>
81{{end}}</table></div> 94{{end}}</table></div>
82{{else}}<p class="none">No snippets yet.</p>{{end}} 95{{else}}<p class="none">No snippets yet.</p>{{end}}
96</section>
83{{end}} 97{{end}}
84 98
85{{if eq .Tab "people"}}{{$org := .Owner}} 99{{if eq .Tab "people"}}{{$org := .Owner}}
86<h2>people <span class="count">{{len .Members}}</span></h2>
87{{if .Notice}}<p class="error" role="alert">{{.Notice}}{{if .Reauth}} <a href="/login">Sign in again</a>{{end}}</p>{{end}} 100{{if .Notice}}<p class="error" role="alert">{{.Notice}}{{if .Reauth}} <a href="/login">Sign in again</a>{{end}}</p>{{end}}
101<section class="setcard">
102<h2>People <span class="count">{{len .Members}}</span></h2>
88<div class="tablewrap"><table class="keys"> 103<div class="tablewrap"><table class="keys">
89<tr class="cols"><th scope="col">member</th><th scope="col">role</th><th scope="col"><span class="vh">actions</span></th></tr> 104<tr class="cols"><th scope="col">member</th><th scope="col">role</th><th scope="col"><span class="vh">actions</span></th></tr>
90{{range .Members}}<tr> 105{{range .Members}}<tr>
91 <td><a href="/{{.Name}}">{{.Name}}</a></td> 106 <td><a href="/{{.Name}}">{{.Name}}</a></td>
92 <td>{{.Role}}</td> 107 <td><span class="chip chip-neutral">{{.Role}}</span></td>
93 <td class="act"><form method="post" action="/{{$org}}"><input type="hidden" name="field" value="member-remove"><input type="hidden" name="user" value="{{.Name}}">{{template "confirmfield" .Name}} <button type="submit" class="linklike">Remove</button></form></td> 108 <td class="act"><details class="popover"><summary class="popbtn popbtn-danger">Remove</summary><div class="popmenu">
109 <form method="post" action="/{{$org}}" class="popform"><input type="hidden" name="field" value="member-remove"><input type="hidden" name="user" value="{{.Name}}">{{template "confirmfield" .Name}}<button type="submit" class="danger">Remove</button></form>
110 </div></details></td>
94</tr> 111</tr>
95{{end}}</table></div> 112{{end}}</table></div>
96<details class="editbox"> 113<details class="editbox">
@@ -104,11 +121,13 @@
104 <option value="member">member</option> 121 <option value="member">member</option>
105 <option value="admin">admin</option> 122 <option value="admin">admin</option>
106 </select> 123 </select>
107 <button type="submit" class="btn">Apply</button> 124 <span class="btngroup"><button type="submit">Apply</button></span>
108 </form> 125 </form>
109</details> 126</details>
127</section>
110 128
111<h2>teams <span class="count">{{len .Teams}}</span></h2> 129<section class="setcard">
130<h2>Teams <span class="count">{{len .Teams}}</span></h2>
112<p class="meta">Teams scope repository access inside the organization: members 131<p class="meta">Teams scope repository access inside the organization: members
113of a team get its role on every repository it is granted.</p> 132of a team get its role on every repository it is granted.</p>
114{{range .Teams}}<details class="difffold" open> 133{{range .Teams}}<details class="difffold" open>
@@ -154,12 +173,9 @@ of a team get its role on every repository it is granted.</p>
154 {{template "confirmfield" .Name}} 173 {{template "confirmfield" .Name}}
155 <button type="submit" class="btn">Revoke</button> 174 <button type="submit" class="btn">Revoke</button>
156 </form>{{end}} 175 </form>{{end}}
157 <form method="post" action="/{{$org}}" class="setform"> 176 <details class="popover"><summary class="popbtn popbtn-danger">Delete team…</summary><div class="popmenu">
158 <input type="hidden" name="field" value="team-delete"> 177 <form method="post" action="/{{$org}}" class="popform"><input type="hidden" name="field" value="team-delete"><input type="hidden" name="team" value="{{.Name}}">{{template "confirmfield" .Name}}<button type="submit" class="danger">Delete</button></form>
159 <input type="hidden" name="team" value="{{.Name}}"> 178 </div></details>
160 {{template "confirmfield" .Name}}
161 <button type="submit" class="danger">Delete this team</button>
162 </form>
163 </div> 179 </div>
164</details> 180</details>
165{{else}}<p class="none">No teams yet.</p>{{end}} 181{{else}}<p class="none">No teams yet.</p>{{end}}
@@ -172,8 +188,10 @@ of a team get its role on every repository it is granted.</p>
172 <button type="submit" class="btn">Create</button> 188 <button type="submit" class="btn">Create</button>
173 </form> 189 </form>
174</details> 190</details>
191</section>
175 192
176<h2>organization</h2> 193<section class="setcard">
194<h2>Organization</h2>
177<details class="editbox"> 195<details class="editbox">
178 <summary>Rename</summary> 196 <summary>Rename</summary>
179 <form method="post" action="/{{$org}}" class="setform"> 197 <form method="post" action="/{{$org}}" class="setform">
@@ -184,8 +202,9 @@ of a team get its role on every repository it is granted.</p>
184 </form> 202 </form>
185 <p class="meta">Every clone URL under this organization changes with the name.</p> 203 <p class="meta">Every clone URL under this organization changes with the name.</p>
186</details> 204</details>
187<p class="meta">Deleting an organization is a CLI operation, like deleting a 205<p class="meta">Deleting an organization is a CLI operation:</p>
188repository: it wants a typed confirmation rather than a button.</p> 206<pre class="message copyable" tabindex="0"><code>gitbay org delete {{$org}} --yes</code></pre>
189<pre class="message" tabindex="0">gitbay org delete {{$org}} --yes</pre> 207</section>
190{{end}} 208{{end}}
209</div>
191{{end}} 210{{end}}