19bb31ff Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% import "settings_tabs.html" as t %}
3
{% block title %}Keys{% endblock %}
4
{% block tabs %}{% call t::tabs("keys") %}{% endblock %}
5
{% block content %}
ffb67a81 Andy McCall 22 days ago
6
< script type = " application/json" id = " backdrop-data " > { " scene" :" mark" } </ script >
7
{% include "backdrop.html" %}
8
< div data-backdrop-avoid >
19bb31ff Andy McCall 1 month ago ↶
9
< div class = " head " > < h1 > Keys < small > {{ me.username }} · Oxygen identities linked to your account</ small > </ h1 > </ div >
10
< p class = " lead " > A change is yours on every page when it is signed by a key you have proven you hold. Export your identity with < code > oxy identity export</ code > , upload the file, then sign the challenge the hub gives you.</ p >
11
{% if let Some(n) = notice %}< p class = " note " > {{ n }}</ p > {% endif %}
12
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
13
{% if let Some((id, bytes, name)) = pending %}
ffb67a81 Andy McCall 22 days ago
14
< form class = " card wide keys-verify " method = " post" action = " /settings/keys/verify" >
19bb31ff Andy McCall 1 month ago ↶
15
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
16
< input type = " hidden" name = " challenge" value = " {{ id }}" >
17
< h2 > Prove you hold the key of {{ name }}</ h2 >
18
< p > Run this in any checkout that uses that identity and paste the output:</ p >
19
< p class = " secret " > oxy identity sign-challenge {{ bytes }}</ p >
20
< label for = " signature" > Signature</ label > < textarea id = " signature " name = " signature" rows = " 4" required > </ textarea >
21
< button type = " submit" > LINK KEY</ button >
22
</ form >
23
{% endif %}
ffb67a81 Andy McCall 22 days ago
24
< section class = " card-box " >
25
< div class = " card-head " > < h2 > Linked keys</ h2 > < span class = " count-chip " > {{ keys.len() }}</ span > </ div >
26
{% if keys.is_empty() %}< p class = " empty small " > No keys linked yet.</ p > {% else %}
27
< ul class = " rows token-rows " >
28
{% for k in keys %}
29
< li >
30
< div class = " token-main " >
31
< div class = " token-name " > < code > {{ k.key|short }}</ code > < strong > {{ k.name }}</ strong > < span class = " mute " > {{ k.email }}</ span > </ div >
b349e15a Andy McCall 16 days ago ↶
32
< div class = " small mute " > linked < time title = " {{ k.linked_ms|when_i }}" > {{ k.linked_ms|ago_i }}</ time > · last used {% if let Some(u) = k.last_used_ms %}< time title = " {{ u|when_i }}" > {{ u|ago_i }}</ time > {% else %}never{% endif %} · {% if let Some(x) = k.expires_ms() %}expires {{ x|when_i }}{% else %}never expires{% endif %}</ div >
ffb67a81 Andy McCall 22 days ago
33
</ div >
34
< div class = " token-actions " >
35
< form class = " inline " method = " post" action = " /settings/keys/unlink" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < input type = " hidden" name = " key" value = " {{ k.key }}" > < button class = " small danger " title = " Changes it signs stop counting as yours" > Unlink</ button > </ form >
36
</ div >
37
</ li >
38
{% endfor %}
39
</ ul >
40
{% endif %}
41
</ section >
42
< section class = " card-box " >
43
< div class = " card-head " > < h2 > Link a key</ h2 > </ div >
44
< form class = " pad token-form " method = " post" action = " /settings/keys/upload" enctype = " multipart/form-data" >
45
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
46
< label for = " identity" > Identity file (from < code > oxy identity export</ code > )</ label > < input type = " file" id = " identity " name = " identity" required >
47
< button type = " submit" > UPLOAD</ button >
48
</ form >
49
</ section >
50
</ div >
19bb31ff Andy McCall 1 month ago ↶
51
{% endblock %}