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:
12
damus/Assets.xcassets/tor.imageset/Contents.json
vendored
Normal file
12
damus/Assets.xcassets/tor.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "tor.svg.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
damus/Assets.xcassets/tor.imageset/tor.svg.png
vendored
Normal file
BIN
damus/Assets.xcassets/tor.imageset/tor.svg.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user