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 %}
6
< div class = " head " > < h1 > Keys < small > {{ me.username }} · Oxygen identities linked to your account</ small > </ h1 > </ div >
7
< 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 >
8
{% if let Some(n) = notice %}< p class = " note " > {{ n }}</ p > {% endif %}
9
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
10
{% if let Some((id, bytes, name)) = pending %}
11
< form class = " card wide " method = " post" action = " /settings/keys/verify" >
12
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
13
< input type = " hidden" name = " challenge" value = " {{ id }}" >
14
< h2 > Prove you hold the key of {{ name }}</ h2 >
15
< p > Run this in any checkout that uses that identity and paste the output:</ p >
16
< p class = " secret " > oxy identity sign-challenge {{ bytes }}</ p >
17
< label for = " signature" > Signature</ label > < textarea id = " signature " name = " signature" rows = " 4" required > </ textarea >
18
< button type = " submit" > LINK KEY</ button >
19
</ form >
20
{% endif %}
21
{% if keys.is_empty() %}< p class = " empty " > No keys linked yet.</ p > {% else %}
22
< div class = " table " > < table >
23
< tr > < th > Key</ th > < th > Identity</ th > < th > Linked</ th > < th > </ th > </ tr >
24
{% for k in keys %}
25
< tr > < td > < code > {{ k.key|short }}</ code > </ td > < td > {{ k.name }} < span class = " mute " > {{ k.email }}</ span > </ td > < td > < time title = " {{ k.linked_ms|when_i }}" > {{ k.linked_ms|ago_i }}</ time > </ td >
26
< td > < form class = " tiny " method = " post" action = " /settings/keys/unlink" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < input type = " hidden" name = " key" value = " {{ k.key }}" > < button > unlink</ button > </ form > </ td > </ tr >
27
{% endfor %}
28
</ table > </ div >
29
{% endif %}
30
< form class = " card " method = " post" action = " /settings/keys/upload" enctype = " multipart/form-data" >
31
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
32
< h2 > Link a key</ h2 >
33
< label for = " identity" > Identity file (from < code > oxy identity export</ code > )</ label > < input type = " file" id = " identity " name = " identity" required >
34
< button type = " submit" > UPLOAD</ button >
35
</ form >
36
{% endblock %}