cleanup: prettier + format.

This commit is contained in:
Cory McWilliams 2024-11-20 20:24:58 -05:00
parent ef5ce1d6e1
commit 8836c7f0ca
4 changed files with 41 additions and 17 deletions

View File

@ -17,8 +17,8 @@ import * as tf_tab_query from './tf-tab-query.js';
import * as tf_tag from './tf-tag.js';
import * as tf_styles from './tf-styles.js';
window.addEventListener('load', function() {
window.addEventListener('load', function () {
let style = document.createElement('style');
style.innerText = tf_styles.styles;
document.body.appendChild(style);
});
});

View File

@ -227,7 +227,9 @@ class TfTabConnectionsElement extends LitElement {
<ul class="w3-ul w3-border">
${this.broadcasts
.filter((x) => x.address)
.filter((x) => self.connections.map(c => c.id).indexOf(x.pubkey) == -1)
.filter(
(x) => self.connections.map((c) => c.id).indexOf(x.pubkey) == -1
)
.map((x) => self.render_broadcast(x))}
</ul>
<h2>Connections</h2>

View File

@ -6,12 +6,24 @@
<link type="text/css" rel="stylesheet" href="/static/w3.css" />
<link type="image/svg+xml" rel="icon" href="/static/tildefriends.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="title" content="Tilde Friends - Make friends and apps from your web browser." />
<meta name="description" content="Tilde Friends is a Secure Scuttlebutt client and a platform for building, running, and sharing web applications. " />
<meta
name="title"
content="Tilde Friends - Make friends and apps from your web browser."
/>
<meta
name="description"
content="Tilde Friends is a Secure Scuttlebutt client and a platform for building, running, and sharing web applications. "
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://metatags.io/" />
<meta property="og:title" content="Tilde Friends - Make friends and apps from your web browser." />
<meta property="og:description" content="Tilde Friends is a Secure Scuttlebutt client and a platform for building, running, and sharing web applications. " />
<meta
property="og:title"
content="Tilde Friends - Make friends and apps from your web browser."
/>
<meta
property="og:description"
content="Tilde Friends is a Secure Scuttlebutt client and a platform for building, running, and sharing web applications. "
/>
<meta property="og:image" content="/static/tildefriends.svg" />
<script>

View File

@ -389,16 +389,26 @@ static const char* _tf_ssb_connection_state_to_string(tf_ssb_state_t state)
{
switch (state)
{
case k_tf_ssb_state_invalid: return "invalid";
case k_tf_ssb_state_connected: return "connected";
case k_tf_ssb_state_sent_hello: return "sent hello";
case k_tf_ssb_state_sent_identity: return "sent identity";
case k_tf_ssb_state_verified: return "verified";
case k_tf_ssb_state_server_wait_hello: return "server wait hello";
case k_tf_ssb_state_server_wait_client_identity: return "server wait client identity";
case k_tf_ssb_state_server_verified: return "server verified";
case k_tf_ssb_state_closing: return "closing";
default: return "unknown";
case k_tf_ssb_state_invalid:
return "invalid";
case k_tf_ssb_state_connected:
return "connected";
case k_tf_ssb_state_sent_hello:
return "sent hello";
case k_tf_ssb_state_sent_identity:
return "sent identity";
case k_tf_ssb_state_verified:
return "verified";
case k_tf_ssb_state_server_wait_hello:
return "server wait hello";
case k_tf_ssb_state_server_wait_client_identity:
return "server wait client identity";
case k_tf_ssb_state_server_verified:
return "server verified";
case k_tf_ssb_state_closing:
return "closing";
default:
return "unknown";
}
}