| 25ab8c73 Andy McCall ↶ |
1 |
{% extends "base.html" %} |
| 2 |
{% block title %}Dashboard{% endblock %} |
| 3 |
{% block content %} |
| 4 |
<div class="head"> |
| 5 |
<h1>Dashboard <small>signed in as {% if let Some(u) = shell.user %}{{ u }}{% endif %}</small></h1> |
| 6 |
</div> |
| f8cf54e9 Andy McCall ↶ |
7 |
<div class="side-layout rev dash"> |
| 25ab8c73 Andy McCall ↶ |
8 |
<div> |
| f8cf54e9 Andy McCall ↶ |
9 |
<section class="card-box"> |
| 10 |
<div class="card-head"><h2>Waiting for your review</h2><span class="count-chip">{{ reviews.len() }}</span></div> |
| 25ab8c73 Andy McCall ↶ |
11 |
{% if reviews.is_empty() %} |
| 12 |
<p class="empty small">Nothing waits on you. Proposals by others in your repositories land here until you review them.</p> |
| 13 |
{% else %} |
| 14 |
<ul class="rows"> |
| 15 |
{% for p in reviews %} |
| 16 |
<li> |
| 17 |
<div> |
| 18 |
<a class="name" href="/{{ p.owner }}/{{ p.name }}/proposal/{{ p.number }}"><span class="mute">{{ p.owner }}/{{ p.name }} #{{ p.number }}</span> <strong>{{ p.title }}</strong></a> |
| 19 |
{% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %} |
| 20 |
<p class="small">by {{ p.author }}</p> |
| 21 |
</div> |
| 22 |
<div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div> |
| 23 |
</li> |
| 24 |
{% endfor %} |
| 25 |
</ul> |
| 26 |
{% endif %} |
| f8cf54e9 Andy McCall ↶ |
27 |
</section> |
| 25ab8c73 Andy McCall ↶ |
28 |
|
| 29 |
{% if !authored.is_empty() %} |
| f8cf54e9 Andy McCall ↶ |
30 |
<section class="card-box"> |
| 31 |
<div class="card-head"><h2>Your proposals</h2><span class="count-chip">{{ authored.len() }}</span></div> |
| 25ab8c73 Andy McCall ↶ |
32 |
<ul class="rows"> |
| 33 |
{% for p in authored %} |
| 34 |
<li> |
| 35 |
<div> |
| 36 |
<a class="name" href="/{{ p.owner }}/{{ p.name }}/proposal/{{ p.number }}"><span class="mute">{{ p.owner }}/{{ p.name }} #{{ p.number }}</span> <strong>{{ p.title }}</strong></a> |
| 37 |
{% if p.state == "draft" %}<span class="tag">draft</span>{% endif %} |
| 38 |
{% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %} |
| 39 |
</div> |
| 40 |
<div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div> |
| 41 |
</li> |
| 42 |
{% endfor %} |
| 43 |
</ul> |
| f8cf54e9 Andy McCall ↶ |
44 |
</section> |
| 25ab8c73 Andy McCall ↶ |
45 |
{% endif %} |
| 46 |
|
| 47 |
{% if !assigned.is_empty() %} |
| f8cf54e9 Andy McCall ↶ |
48 |
<section class="card-box"> |
| 49 |
<div class="card-head"><h2>Issues assigned to you</h2><span class="count-chip">{{ assigned.len() }}</span></div> |
| 25ab8c73 Andy McCall ↶ |
50 |
<ul class="rows"> |
| 51 |
{% for i in assigned %} |
| 52 |
<li> |
| 53 |
<div><a class="name" href="/{{ i.owner }}/{{ i.name }}/issue/{{ i.number }}"><span class="mute">{{ i.owner }}/{{ i.name }} #{{ i.number }}</span> <strong>{{ i.title }}</strong></a></div> |
| 54 |
<div class="right small">updated <time title="{{ i.updated_ms|when_i }}">{{ i.updated_ms|ago_i }}</time></div> |
| 55 |
</li> |
| 56 |
{% endfor %} |
| 57 |
</ul> |
| f8cf54e9 Andy McCall ↶ |
58 |
</section> |
| 25ab8c73 Andy McCall ↶ |
59 |
{% endif %} |
| 60 |
|
| f8cf54e9 Andy McCall ↶ |
61 |
<section class="card-box"> |
| 62 |
<div class="card-head"><h2>Recent activity</h2></div> |
| 25ab8c73 Andy McCall ↶ |
63 |
{% if feed.is_empty() %} |
| 64 |
<p class="empty small">No activity yet. Push to a repository and it shows here.</p> |
| 65 |
{% else %} |
| 66 |
<ul class="feed"> |
| 67 |
{% for a in feed %} |
| 68 |
<li> |
| 10174045 Andy McCall ↶ |
69 |
<span class="who">{% if a.actor.is_empty() %}the hub{% else %}<img class="avatar xs" src="/avatar/{{ a.actor }}" alt=""> <a href="/{{ a.actor }}">{{ a.actor }}</a>{% endif %}</span> |
| 25ab8c73 Andy McCall ↶ |
70 |
{% if a.kind == "push" %}pushed <span class="lbl lbl-bm">{{ a.event }}</span> to |
| 71 |
{% else if a.kind == "release" %}published <a href="{{ a.url() }}">{{ a.title }}</a> in |
| 72 |
{% else %}{{ a.event }} {{ a.kind }} <a href="{{ a.url() }}">#{{ a.number }} {{ a.title }}</a> in |
| 73 |
{% endif %} |
| 74 |
<a href="/{{ a.owner }}/{{ a.name }}">{{ a.owner }}/{{ a.name }}</a> |
| 75 |
<time class="mute small" title="{{ a.at_ms|when_i }}">{{ a.at_ms|ago_i }}</time> |
| 76 |
</li> |
| 77 |
{% endfor %} |
| 78 |
</ul> |
| 79 |
{% endif %} |
| f8cf54e9 Andy McCall ↶ |
80 |
</section> |
| 25ab8c73 Andy McCall ↶ |
81 |
</div> |
| f8cf54e9 Andy McCall ↶ |
82 |
<aside class="side cards"> |
| 83 |
<section class="side-card"><h3>Your repositories <span class="count-chip">{{ mine.len() }}</span><a class="more" href="/new">+ New</a></h3><div class="body"> |
| 25ab8c73 Andy McCall ↶ |
84 |
{% if mine.is_empty() %} |
| 85 |
<p class="small mute">None yet. <a href="/new">Create one</a>, or <a href="/explore">explore</a>.</p> |
| 86 |
{% else %} |
| f8cf54e9 Andy McCall ↶ |
87 |
<ul class="plain repo-list"> |
| 25ab8c73 Andy McCall ↶ |
88 |
{% for r in mine %} |
| f8cf54e9 Andy McCall ↶ |
89 |
<li><a href="/{{ r.owner }}/{{ r.name }}" title="{{ r.owner }}/{{ r.name }}"><span class="mute">{{ r.owner }} /</span> {{ r.name }}</a>{% if r.visibility != "public" %}<span class="tag">{{ r.visibility }}</span>{% endif %}</li> |
| 25ab8c73 Andy McCall ↶ |
90 |
{% endfor %} |
| 91 |
</ul> |
| 92 |
{% endif %} |
| f8cf54e9 Andy McCall ↶ |
93 |
</div></section> |
| 25ab8c73 Andy McCall ↶ |
94 |
</aside> |
| 95 |
</div> |
| 96 |
{% endblock %} |