Demo contacts page.

This commit is contained in:
Burak Kaan Köse
2025-10-29 19:35:04 +01:00
parent 3db1fd0dde
commit b0ac6e4e55
25 changed files with 970 additions and 16 deletions
@@ -36,6 +36,12 @@ public class AccountContact : IEquatable<AccountContact>
/// </summary>
public bool IsRootContact { get; set; }
/// <summary>
/// When true, indicates that the contact has been manually modified by the user.
/// Contacts with this flag set to true should not be updated during synchronization.
/// </summary>
public bool IsOverridden { get; set; } = false;
public override bool Equals(object obj)
{
return Equals(obj as AccountContact);
+1 -1
View File
@@ -9,6 +9,7 @@ public enum WinoPage
IdlePage,
ComposePage,
SettingsPage,
ContactsPage,
MailRenderingPage,
WelcomePage,
AccountDetailsPage,
@@ -27,7 +28,6 @@ public enum WinoPage
AliasManagementPage,
EditAccountDetailsPage,
KeyboardShortcutsPage,
// Calendar
CalendarPage,
CalendarSettingsPage,
EventDetailsPage
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MimeKit;
using Wino.Core.Domain.Entities.Shared;
@@ -11,4 +12,11 @@ public interface IContactService
Task<AccountContact> GetAddressInformationByAddressAsync(string address);
Task SaveAddressInformationAsync(MimeMessage message);
Task<AccountContact> CreateNewContactAsync(string address, string displayName);
// New methods for ContactsPage
Task<List<AccountContact>> GetAllContactsAsync();
Task<List<AccountContact>> SearchContactsAsync(string searchQuery);
Task<AccountContact> UpdateContactAsync(AccountContact contact);
Task DeleteContactAsync(string address);
Task DeleteContactsAsync(IEnumerable<string> addresses);
}
@@ -59,4 +59,11 @@ public interface IMailDialogService : IDialogServiceBase
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
Task<KeyboardShortcutDialogResult> ShowKeyboardShortcutDialogAsync(KeyboardShortcut existingShortcut = null);
#pragma warning restore CS8625
/// <summary>
/// Presents a dialog to the user for contact creation/modification.
/// </summary>
/// <param name="contact">Existing contact to edit, or null for new contact.</param>
/// <returns>Contact information. Null if canceled.</returns>
Task<AccountContact> ShowEditContactDialogAsync(AccountContact contact = null);
}
@@ -0,0 +1,3 @@
namespace Wino.Core.Domain.MenuItems;
public class ContactsMenuItem : MenuItemBase { }
@@ -723,7 +723,39 @@
"WinoUpgradeRemainingAccountsMessage": "{0} out of {1} free accounts used.",
"Yesterday": "Yesterday",
"SettingsAppPreferences_EmailSyncInterval_Title": "Email sync interval",
"SettingsAppPreferences_EmailSyncInterval_Description": "Automatic email synchronization interval (minutes). This setting will be applied only after restarting Wino Mail."
"SettingsAppPreferences_EmailSyncInterval_Description": "Automatic email synchronization interval (minutes). This setting will be applied only after restarting Wino Mail.",
"ContactsPage_Title": "Contacts",
"ContactsPage_AddContact": "Add Contact",
"ContactsPage_EditContact": "Edit Contact",
"ContactsPage_DeleteContact": "Delete Contact",
"ContactsPage_SearchPlaceholder": "Search contacts...",
"ContactsPage_NoContacts": "No contacts found",
"ContactsPage_ContactsCount": "{0} contacts",
"ContactsPage_SelectedContactsCount": "{0} selected",
"ContactsPage_DeleteSelectedContacts": "Delete Selected",
"ContactEditDialog_Title": "Edit Contact",
"ContactEditDialog_PhotoSection": "Photo",
"ContactEditDialog_ChoosePhoto": "Choose Photo",
"ContactEditDialog_RemovePhoto": "Remove Photo",
"ContactEditDialog_NameHeader": "Name",
"ContactEditDialog_NamePlaceholder": "Contact name",
"ContactEditDialog_EmailHeader": "Email Address",
"ContactEditDialog_EmailPlaceholder": "contact@example.com",
"ContactEditDialog_InfoSection": "Contact Information",
"ContactEditDialog_RootContactInfo": "This is a root contact associated with your accounts and cannot be deleted.",
"ContactEditDialog_OverriddenContactInfo": "This contact has been manually modified and will not be updated during synchronization.",
"ContactsPage_Subtitle": "Manage your email contacts and their information",
"ContactStatus_Account": "Account",
"ContactStatus_Modified": "Modified",
"ContactAction_Edit": "Edit contact",
"ContactAction_ChangePhoto": "Change photo",
"ContactAction_Delete": "Delete contact",
"ContactAction_Add": "Add Contact",
"ContactSelection_Selected": "selected",
"ContactSelection_SelectAll": "Select All",
"ContactSelection_Clear": "Clear Selection",
"ContactsPage_EmptyState": "No contacts to display",
"ContactsPage_AddFirstContact": "Add your first contact"
}