From c464e311153c2eebd3ea496a5e59d24b84de6d48 Mon Sep 17 00:00:00 2001 From: SondreB Date: Sun, 22 Dec 2024 21:51:23 +0100 Subject: [PATCH] Add a link to profile editor for founders (#232) - Fix the other link that goes to Hub. - Remove link on the hex pubkey, just duplicate UI. --- src/Angor/Client/Pages/View.razor | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/Angor/Client/Pages/View.razor b/src/Angor/Client/Pages/View.razor index 6b090623..f549d3b3 100644 --- a/src/Angor/Client/Pages/View.razor +++ b/src/Angor/Client/Pages/View.razor @@ -356,14 +356,15 @@ else
- + *@
@if (founder) { + @if (isGeneratingNsec) @@ -733,13 +734,29 @@ else }); } + private async void OpenInBrowseProfileAsync() + { + var npub = NostrHelper.ConvertHexToNpub(project.ProjectInfo.NostrPubKey); + + if (!string.IsNullOrEmpty(npub)) + { + var url = $"https://profile.angor.io/profile/{npub}"; + + await Js.InvokeVoidAsync("window.open", url, "_blank"); + } + else + { + notificationComponent.ShowNotificationMessage("Public key is not available.", 3); + } + } + private async void OpenInBrowseAsync() { var pubkey = project.ProjectInfo.NostrPubKey; if (!string.IsNullOrEmpty(pubkey)) { - var url = $"https://hub.angor.io/profile/{pubkey}"; + var url = $"https://hub.angor.io/project/{pubkey}"; await Js.InvokeVoidAsync("window.open", url, "_blank"); }