Display search property alongside host in relay name (#452)

This commit is contained in:
heyhoe
2023-03-23 22:25:07 +09:00
committed by GitHub
parent d5f828ffb8
commit e95f1fe369
4 changed files with 30 additions and 5 deletions

View File

@ -9,7 +9,7 @@ import { RootState } from "State/Store";
import Timeline from "Element/Timeline";
import { System } from "System";
import { TimelineSubject } from "Feed/TimelineFeed";
import { debounce, sha256, unwrap } from "Util";
import { debounce, getRelayName, sha256, unwrap } from "Util";
import messages from "./messages";
@ -87,7 +87,7 @@ export default function RootPage() {
<optgroup label="Paid Relays">
{paidRelays.map(a => (
<option key={a.url} value={a.url}>
{new URL(a.url).host}
{getRelayName(a.url)}
</option>
))}
</optgroup>
@ -95,7 +95,7 @@ export default function RootPage() {
<optgroup label="Public Relays">
{publicRelays.map(a => (
<option key={a.url} value={a.url}>
{new URL(a.url).host}
{getRelayName(a.url)}
</option>
))}
</optgroup>