Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

lil tweaks

Changed files
+33 -7
who-am-i
+1 -1
who-am-i/demo/index.html
···
<body>
<h1>hey <span id="who"></span></h1>
-
<iframe src="http://127.0.0.1:9997/prompt" id="whoami" style="border: none" height="130" width="280"></iframe>
+
<iframe src="http://127.0.0.1:9997/prompt" id="whoami" style="border: none" height="160" width="320"></iframe>
<script type="text/javascript">
window.onmessage = message => {
-1
who-am-i/src/identity_resolver.rs
···
http_client: Arc::clone(&http_client),
});
let doc = resolver.resolve(&Did::new(did).unwrap()).await.unwrap(); // TODO: this is only half the resolution? or is atrium checking dns?
-
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
doc.also_known_as.and_then(|mut aka| {
if aka.is_empty() {
None
+32 -5
who-am-i/templates/prompt-known.hbs
···
padding: 0.25rem 0.5rem;
}
p {
-
margin: 0.5rem 0;
+
margin: 1rem 0 0;
+
text-align: center;
+
}
+
.parent-host {
+
font-weight: bold;
+
color: #48c;
+
display: inline-block;
+
padding: 0 0.125rem;
+
border-radius: 0.25rem;
+
border: 1px solid #aaa;
+
font-size: 0.8rem;
}
#loader {
···
flex-grow: 1;
justify-content: center;
align-items: center;
-
margin-bottom: 1rem;
}
.spinner {
animation: rotation 1.618s ease-in-out infinite;
···
display: flex;
flex-direction: column;
justify-content: center;
-
margin-bottom: 1rem;
}
#action {
background: #eee;
···
cursor: pointer;
}
#action:hover #allow {
-
color: #396;
+
color: #285;
}
+
#or {
+
font-size: 0.8rem;
+
text-align: center;
+
}
+
#or p {
+
margin: 0 0 1rem;
+
}
.hidden {
display: none !important;
···
</header>
<main>
-
<p>Share your identity with {{ parent_host }}?</p>
+
<p>
+
Share your identity with
+
<span class="parent-host">{{ parent_host }}</span>?
+
</p>
<div id="loader">
<span class="spinner"></span>
</div>
···
<button id="allow">Allow</button>
</div>
</div>
+
<div id="or">
+
<p>or, <a id="switch" href="#">use another account</a></p>
+
</div>
</main>
</div>
···
var actionEl = document.getElementById('action');
var handleEl = document.getElementById('handle');
var allowEl = document.getElementById('allow');
+
var switchEl = document.getElementById('switch');
+
+
switchEl.addEventListener('click', e => {
+
e.preventDefault();
+
console.log('switch plz');
+
});
var DID = {{{json did}}};
let user_info = new URL('/user-info', window.location);