mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
Client UI: - Design system: Colors, Typography, Controls resource dictionaries - Message actions: reply compose bar, hover edit/delete/reply buttons - Rich content: code blocks, attachments, system messages, content parser - Server strip: 72px sidebar with server icons, home button, add server - Status picker: popup for changing online/idle/dnd/invisible status - ConnectPage: server health check dots with auto-refresh - User popup: profile card with banner, avatar, roles, member since - Emoji picker: 6 categories, search, grid of Unicode emojis - Settings overlay: full-screen with sidebar navigation - Friends/DM view: sidebar + friends list with tabs (online/all/pending) - Toast notifications: auto-dismiss after 3s with fade animation Models & services: - Attachment model added to Message, ApiMessage, ChatMessagePayload - EditMessageAsync, DeleteMessageAsync, SendStatusChangeAsync APIs - MessageContentParser (code blocks, inline code, bold, italic) - EmojiData, ToastService, HealthStatusToBrushConverter Server (from prior session): - Voice room management, SFU, speaker detection - ACME/TLS support, config improvements - Protocol and schema updates Tests: 331 passing (61 converter + 24 voice service + 34 voice VM + 41 parser + 9 edit/delete + existing)
94 lines
3.1 KiB
C#
94 lines
3.1 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace OwnCord.Client.Controls;
|
|
|
|
public partial class UserPopupControl : UserControl
|
|
{
|
|
public static readonly DependencyProperty UsernameProperty =
|
|
DependencyProperty.Register(nameof(Username), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata(string.Empty));
|
|
|
|
public static readonly DependencyProperty AvatarColorProperty =
|
|
DependencyProperty.Register(nameof(AvatarColor), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata("#5865f2"));
|
|
|
|
public static readonly DependencyProperty RoleNameProperty =
|
|
DependencyProperty.Register(nameof(RoleName), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata("Member"));
|
|
|
|
public static readonly DependencyProperty RoleColorProperty =
|
|
DependencyProperty.Register(nameof(RoleColor), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata("#949ba4"));
|
|
|
|
public static readonly DependencyProperty JoinedDateProperty =
|
|
DependencyProperty.Register(nameof(JoinedDate), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata(string.Empty));
|
|
|
|
public static readonly DependencyProperty StatusTextProperty =
|
|
DependencyProperty.Register(nameof(StatusText), typeof(string), typeof(UserPopupControl),
|
|
new PropertyMetadata("Offline"));
|
|
|
|
public static readonly DependencyProperty MessageCommandProperty =
|
|
DependencyProperty.Register(nameof(MessageCommand), typeof(ICommand), typeof(UserPopupControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public static readonly DependencyProperty CloseCommandProperty =
|
|
DependencyProperty.Register(nameof(CloseCommand), typeof(ICommand), typeof(UserPopupControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public UserPopupControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string Username
|
|
{
|
|
get => (string)GetValue(UsernameProperty);
|
|
set => SetValue(UsernameProperty, value);
|
|
}
|
|
|
|
public string AvatarColor
|
|
{
|
|
get => (string)GetValue(AvatarColorProperty);
|
|
set => SetValue(AvatarColorProperty, value);
|
|
}
|
|
|
|
public string RoleName
|
|
{
|
|
get => (string)GetValue(RoleNameProperty);
|
|
set => SetValue(RoleNameProperty, value);
|
|
}
|
|
|
|
public string RoleColor
|
|
{
|
|
get => (string)GetValue(RoleColorProperty);
|
|
set => SetValue(RoleColorProperty, value);
|
|
}
|
|
|
|
public string JoinedDate
|
|
{
|
|
get => (string)GetValue(JoinedDateProperty);
|
|
set => SetValue(JoinedDateProperty, value);
|
|
}
|
|
|
|
public string StatusText
|
|
{
|
|
get => (string)GetValue(StatusTextProperty);
|
|
set => SetValue(StatusTextProperty, value);
|
|
}
|
|
|
|
public ICommand MessageCommand
|
|
{
|
|
get => (ICommand)GetValue(MessageCommandProperty);
|
|
set => SetValue(MessageCommandProperty, value);
|
|
}
|
|
|
|
public ICommand CloseCommand
|
|
{
|
|
get => (ICommand)GetValue(CloseCommandProperty);
|
|
set => SetValue(CloseCommandProperty, value);
|
|
}
|
|
}
|