-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Messages feature #343
Conversation
- 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.
…r better rendering
…s, and initialize chat message handling
…mprove message handling logic
…Signatures page component usage
…and improve initialization logic
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) ?? |
There was a problem hiding this comment.
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 = ""; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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?
There was a problem hiding this 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; } |
There was a problem hiding this comment.
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?
No description provided.