8000 Indicator for Unseen messages on Approve Investment button by yashop7 · Pull Request #413 · block-core/angor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dismiss alert

Indicator for Unseen messages on Approve Investment button #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions src/Angor/Client/Pages/View.razor
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,20 @@
</i>
Manage funds
</a>
<a href=@($"/signatures/{project.ProjectInfo.ProjectIdentifier}") class="btn btn-border-warning animate-scale">
8000 <i class="me-2">
<Icon IconName="signature" />
</i>
Approve investments
</a>
<div class="position-relative d-inline-block mx-2">
<a href="@($"/signatures/{project.ProjectInfo.ProjectIdentifier}")" class="btn btn-border-warning animate-scale">
<i class="me-2">
<Icon IconName="signature" />
</i>
Approve investments
</a>
@if (hasPendingMessages)
{
<span class="position-absolute top-0 start-100 translate-middle rounded-circle btn-border-warning" style="width: 16px; height: 16px; z-index: 1; background-color: #7e7537;">
<span class="visually-hidden">New activity</span>
</span>
}
</div>

<a href=@($"/unfunded/{project.ProjectInfo.ProjectIdentifier}")
class="btn btn-border-danger animate-scale @(CanReleaseUnfundedProject() ? "" : "disabled")">
Expand Down Expand Up @@ -811,6 +819,7 @@
private bool isGeneratingNsec;
private string errorMessage = string.Empty;
private bool isRepublishing = false;
private bool hasPendingMessages = false;

private string error;

Expand Down Expand Up @@ -869,6 +878,18 @@
{
founder = true;
NavMenuState.SetActivePage("founder");
if (project is FounderProject founderProject)
{
await _RelayService.LookupSignaturesDirectMessagesForPubKeyAsync(founderProject.ProjectInfo.NostrPubKey, founderProject.LastRequestForSignaturesTime?.AddSeconds(1), 1,
_ =>
{
if (hasPendingMessages)
return;

hasPendingMessages = true;
InvokeAsync(StateHasChanged);
});
}
projectStats.Loading = false;
SetProjectLinksAndRefreshBalance();
return;
Expand Down
0