show relay on client auth

This commit is contained in:
greenart7c3
2023-10-16 14:09:37 -03:00
parent 6f5345c9d4
commit 81b20511be
3 changed files with 14 additions and 0 deletions
@@ -11,6 +11,7 @@ import androidx.compose.material.icons.filled.AccessTime
import androidx.compose.material.icons.filled.CalendarMonth
import androidx.compose.material.icons.filled.ContentPaste
import androidx.compose.material.icons.filled.Person
import androidx.compose.material.icons.filled.Wifi
import androidx.compose.material3.Card
import androidx.compose.material3.Divider
import androidx.compose.material3.Text
@@ -91,6 +92,14 @@ fun EventData(
event.content
)
if (event.kind == 22242) {
EventRow(
Icons.Default.Wifi,
stringResource(R.string.relay),
event.tags.firstOrNull { it.size > 1 && it[0] == "relay" }?.get(1)?.removePrefix("wss://")?.removePrefix("ws://") ?: ""
)
}
Divider(
modifier = Modifier.padding(top = 15.dp),
thickness = Dp.Hairline
+4
View File
@@ -0,0 +1,4 @@
<vector android:height="120dp" android:viewportHeight="47"
android:viewportWidth="47" android:width="120dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#712F8F" android:fillType="evenOdd" android:pathData="M35,11C37.209,11 39,9.209 39,7C39,4.791 37.209,3 35,3C32.791,3 31,4.791 31,7C31,9.209 32.791,11 35,11ZM35,14C38.866,14 42,10.866 42,7C42,3.134 38.866,0 35,0C31.134,0 28,3.134 28,7C28,8.359 28.387,9.627 29.057,10.7L26.611,13.146C25.019,11.828 22.976,11.035 20.747,11.035C18.586,11.035 16.598,11.781 15.029,13.029L11.259,9.259C11.73,8.448 12,7.505 12,6.5C12,3.462 9.538,1 6.5,1C3.462,1 1,3.462 1,6.5C1,9.538 3.462,12 6.5,12C7.442,12 8.328,11.763 9.103,11.346L13.012,15.255C12.088,16.689 11.552,18.397 11.552,20.23C11.552,22.265 12.213,24.145 13.332,25.669L11.709,27.291C10.509,26.476 9.06,26 7.5,26C3.358,26 0,29.358 0,33.5C0,37.642 3.358,41 7.5,41C11.642,41 15,37.642 15,33.5C15,32.003 14.561,30.608 13.805,29.437L15.477,27.766C16.969,28.812 18.786,29.426 20.747,29.426C22.612,29.426 24.347,28.871 25.796,27.917L30.589,32.711C29.588,34.132 29,35.865 29,37.736C29,42.56 32.911,46.471 37.736,46.471C42.56,46.471 46.471,42.56 46.471,37.736C46.471,32.911 42.56,29 37.736,29C35.865,29 34.132,29.588 32.71,30.589L28.002,25.881C29.218,24.322 29.942,22.361 29.942,20.23C29.942,18.465 29.445,16.817 28.583,15.417L31.152,12.848C32.256,13.576 33.578,14 35,14ZM9,6.5C9,7.881 7.881,9 6.5,9C5.119,9 4,7.881 4,6.5C4,5.119 5.119,4 6.5,4C7.881,4 9,5.119 9,6.5ZM7.5,38C9.985,38 12,35.985 12,33.5C12,31.015 9.985,29 7.5,29C5.015,29 3,31.015 3,33.5C3,35.985 5.015,38 7.5,38ZM43.471,37.736C43.471,40.903 40.903,43.471 37.736,43.471C34.568,43.471 32,40.903 32,37.736C32,34.568 34.568,32 37.736,32C40.903,32 43.471,34.568 43.471,37.736ZM26.942,20.23C26.942,23.652 24.169,26.426 20.747,26.426C17.326,26.426 14.552,23.652 14.552,20.23C14.552,16.809 17.326,14.035 20.747,14.035C24.169,14.035 26.942,16.809 26.942,20.23Z"/>
</vector>
+1
View File
@@ -78,4 +78,5 @@
<string name="encrypted_decrypted_data">Encrypted/Decrypted data</string>
<string name="data_copied_to_the_clipboard">Data copied to the clipboard</string>
<string name="message_already_encrypted">Message already encrypted</string>
<string name="relay">Relay</string>
</resources>