8000 Add Messages feature by miladsoft · Pull Request #343 · block-core/angor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Messages feature #343

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 49 commits into from
May 13, 2025
Merged

Add Messages feature #343

merged 49 commits into from
May 13, 2025

Conversation

miladsoft
Copy link
Member

No description provided.

- Removed unnecessary padding from navigation links in dashboard.css.
- Updated Invest.razor to remove redundant class for card component.
- Introduced DirectMessage model to encapsulate message properties.
- Created IMessageService interface and MessageService implementation for handling direct messages.
- Added methods for initializing, loading, sending, and refreshing messages in MessageService.
- Updated app.css to enhance loader styles and ensure consistent appearance.
- Replaced old bitcoin SVG with a new design for better visual representation.
- Registered IMessageService in Program.cs for dependency injection.
- Cleaned up Signatures.razor by removing the now redundant DirectMessage class.
@miladsoft miladsoft requested a review from dangershony April 24, 2025 09:00
@dangershony
Copy link
Member

The refresh button deletes all messages and then fetches them again, this is probably not necessary, it is also annoying to click refresh all the time, can we not keep the subscription open when the popup is open?

image

@dangershony
Copy link
Member

can we put the npub of the other side here?
image

@dangershony
Copy link
Member

We should probably sanitize what we allow to display (not allow links or not allow to click them, no js etc...)

image

@dangershony
Copy link
Member
dangershony commented May 7, 2025

Refresh should always be the most right?

image

@dangershony
Copy link
Member
dangershony commented May 7, 2025

take away the message refreshed pop at the bottom

image

@DavidGershony DavidGershony self-requested a review May 13, 2025 13:38
var investorProject = project as InvestorProject;
npubValue = NostrHelper.ConvertHexToNpub(investorProject?.InvestorNPub ?? "") ?? investorProject?.InvestorNPub ?? "";

// Get founder's npub
founderNpub = NostrHelper.ConvertHexToNpub(investorProject.ProjectInfo.NostrPubKey) ??
investorProject.ProjectInfo.NostrPubKey;
founderNpub = NostrHelper.ConvertHexToNpub(project.ProjectInfo.NostrPubKey) ??
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already keep it as NPub in there

private bool showNsec = false;
private string nsecValue = "";
private string npubValue = "";
private string founderNpub = "";
private string currentUserPrivateKeyHex = "";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have it in a component?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean exactly? the popup is already a component

@@ -18,7 +18,7 @@
<NavMenu @bind-IsCollapsed="isSidebarCollapsed" IsDarkTheme="isDarkTheme"/>
<main class="main-content">
<!-- Navbar -->
<nav class="navbar navbar-main navbar-expand-lg px-0 border-radius-xl position-sticky mt-3 z-index-sticky left-auto ms-2 me-2" id="navbarBlur">
<nav class="navbar navbar-main navbar-expand-lg px-0 border-radius-xl position-sticky mt-2 z-index-sticky left-auto ms-2 me-2" id="navbarBlur">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Milad perhaps the message component should be in the main layout if it is a popup?

Copy link
Collaborator
@DavidGershony DavidGershony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is some over complications in the message service

public string SenderPubkey { get; set; }
public string RecipientPubkey { get; set; }
public DateTime Timestamp { get; set; }
public bool IsFromCurrentUser { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this as part of the class? Shouldn't we filter out any message that is not by the investor or founder?

@dangershony dangershony merged commit c97b32b into main May 13, 2025
3 checks passed
@dangershony dangershony deleted the message branch May 13, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0