From 2e66666bdf14e278a567297888ac80895ae67824 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Fri, 25 Oct 2024 12:53:45 -0400 Subject: [PATCH] ssb: Indicate which connections are one-shot / sync now connections. --- apps/ssb.json | 2 +- apps/ssb/tf-tab-connections.js | 1 + docs/release.md | 8 ++++---- src/ssb.js.c | 4 ++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 7053e6f4..25e47aaa 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🐌", - "previous": "&CsZ2FBYY9awXNPPHAhTlrOHuKlGU6RXZJ3UTV3UQRIE=.sha256" + "previous": "&IH3DadMNF785idnMI/LuCpIJQxzvpg1PDp8BI7m1Nx0=.sha256" } diff --git a/apps/ssb/tf-tab-connections.js b/apps/ssb/tf-tab-connections.js index a28d0ba7..7bcd8c35 100644 --- a/apps/ssb/tf-tab-connections.js +++ b/apps/ssb/tf-tab-connections.js @@ -129,6 +129,7 @@ class TfTabConnectionsElement extends LitElement { > Close + ${connection.flags.one_shot ? '🔃' : undefined} ${connection.tunnel !== undefined ? '🚇' diff --git a/docs/release.md b/docs/release.md index 7e5a663d..aa4442c2 100644 --- a/docs/release.md +++ b/docs/release.md @@ -10,10 +10,10 @@ - make a release on gitea - upload the artifacts - nix - - comment out the hash in default.nix - - update the version - - run `nix build` - - update the hash + - comment out the hash in default.nix + - update the version + - run `nix build` + - update the hash - bump the versions in GNUmakefile for the next release - make - commit diff --git a/src/ssb.js.c b/src/ssb.js.c index fd45051e..41820c50 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -1115,6 +1115,10 @@ static JSValue _tf_ssb_connections(JSContext* context, JSValueConst this_val, in JS_SetPropertyStr(context, object, "tunnel", JS_NewInt32(context, tunnel_index)); } JS_SetPropertyStr(context, object, "requests", tf_ssb_connection_requests_to_object(connection)); + JSValue flags_object = JS_NewObject(context); + int flags = tf_ssb_connection_get_flags(connection); + JS_SetPropertyStr(context, flags_object, "one_shot", JS_NewBool(context, (flags & k_tf_ssb_connect_flag_one_shot) != 0)); + JS_SetPropertyStr(context, object, "flags", flags_object); JS_SetPropertyUint32(context, result, i, object); } }