relay: Add Tor Relay Image

This PR just adds the tor icon to relays ending with .onion

Changelog-Added: Tor relay icon

Closes: #2318
Signed-off-by: ericholguin <ericholguin@apache.org>
This commit is contained in:
ericholguin
2024-07-02 20:02:20 -06:00
parent fa70c376b1
commit 653f9fbcbe
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "tor.svg.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -50,6 +50,13 @@ struct RelayView: View {
.padding(.bottom, 2)
.lineLimit(1)
RelayType(is_paid: state.relay_model_cache.model(with_relay_id: relay)?.metadata.is_paid ?? false)
if relay.absoluteString.hasSuffix(".onion") {
Image("tor")
.resizable()
.interpolation(.none)
.frame(width: 20, height: 20)
}
}
Text(relay.absoluteString)
.font(.subheadline)