ui: credit the project's dependencies in About
CI / test (push) Successful in 47s

A "Built with" section beside "Made by": the Nostr Dev Kit (formerly
rust-nostr), GTK, libadwaita, Rust and tokio, each a link row the same way
the author credit is. The README already thanks the Nostr Dev Kit in its
Acknowledgements section; this is the same credit where users look for it.
This commit is contained in:
raucao committed 2026-11-30 23:04:15 +04:00
1 parent f3043065f7
commit b2519f6214
1 file changed
+37
+37
View File
@@ -37,6 +37,24 @@ const TRADEMARK: &str = "https://gitea.kosmos.org/raucao/regent/src/branch/main/
/// (`the_nostr_profile_parses` keeps the nprofile and the npub in step).
const NOSTR: &str = "https://njump.me/nprofile1qythwumn8ghj7mn0wd68ytntdaek6mmn9ehhyee0qy2hwumn8ghj7mn0wd68ytn00p68ytnyv4mz7qpqraustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89s8k58x2";
/// The library Regent is built on: `nostr`/`nostr-sdk` provide the NIP-46,
/// NIP-44/NIP-04 and NIP-49 primitives. Credited on its own, the way the
/// README's Acknowledgements section does.
const NOSTR_DEV_KIT: &str = "https://nostrdevkit.org";
/// The toolkit every widget is built from.
const GTK: &str = "https://www.gtk.org";
/// The widget and pattern layer above GTK; the UI is written against it
/// throughout, not against GTK directly.
const LIBADWAITA: &str = "https://gnome.pages.gitlab.gnome.org/libadwaita/";
/// The language the app is written in.
const RUST: &str = "https://www.rust-lang.org";
/// The async runtime the signer, the icon fetches and NIP-05 checks run on.
const TOKIO: &str = "https://tokio.rs";
const COMMENTS: &str = "\
Regent signs Nostr events and encrypts or decrypts messages for other \
applications, without ever handing them your private key. Every request is \
@@ -82,6 +100,25 @@ pub fn present(parent: Option<&impl IsA<gtk::Widget>>) {
let author = format!("Râu Cao {NOSTR}");
dialog.add_credit_section(Some("Made by"), &[&author]);
// "Built with" credits the project's dependencies: the Nostr stack, the
// toolkit and the language/runtime. A trailing URL makes each entry a
// `LinkRow`, exactly like the author above.
let ndk_credit = format!("Nostr Dev Kit {NOSTR_DEV_KIT}");
let gtk_credit = format!("GTK {GTK}");
let libadwaita_credit = format!("libadwaita {LIBADWAITA}");
let rust_credit = format!("Rust {RUST}");
let tokio_credit = format!("tokio {TOKIO}");
dialog.add_credit_section(
Some("Built with"),
&[
&ndk_credit,
&gtk_credit,
&libadwaita_credit,
&rust_credit,
&tokio_credit,
],
);
// Details-page links. The author's Nostr profile is already the "Made by"
// credit's link, so it is not repeated here.
dialog.add_link("Source Code", REPOSITORY);