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)
80 lines
2.3 KiB
C#
80 lines
2.3 KiB
C#
using System.Collections;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace OwnCord.Client.Controls;
|
|
|
|
public partial class FriendsViewControl : UserControl
|
|
{
|
|
public static readonly DependencyProperty SelectedTabProperty =
|
|
DependencyProperty.Register(
|
|
nameof(SelectedTab),
|
|
typeof(string),
|
|
typeof(FriendsViewControl),
|
|
new PropertyMetadata("online"));
|
|
|
|
public static readonly DependencyProperty FriendsProperty =
|
|
DependencyProperty.Register(
|
|
nameof(Friends),
|
|
typeof(IEnumerable),
|
|
typeof(FriendsViewControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public static readonly DependencyProperty FriendSearchTextProperty =
|
|
DependencyProperty.Register(
|
|
nameof(FriendSearchText),
|
|
typeof(string),
|
|
typeof(FriendsViewControl),
|
|
new PropertyMetadata(string.Empty));
|
|
|
|
public static readonly DependencyProperty SelectTabCommandProperty =
|
|
DependencyProperty.Register(
|
|
nameof(SelectTabCommand),
|
|
typeof(ICommand),
|
|
typeof(FriendsViewControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public static readonly DependencyProperty MessageFriendCommandProperty =
|
|
DependencyProperty.Register(
|
|
nameof(MessageFriendCommand),
|
|
typeof(ICommand),
|
|
typeof(FriendsViewControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public FriendsViewControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string SelectedTab
|
|
{
|
|
get => (string)GetValue(SelectedTabProperty);
|
|
set => SetValue(SelectedTabProperty, value);
|
|
}
|
|
|
|
public IEnumerable? Friends
|
|
{
|
|
get => (IEnumerable?)GetValue(FriendsProperty);
|
|
set => SetValue(FriendsProperty, value);
|
|
}
|
|
|
|
public string FriendSearchText
|
|
{
|
|
get => (string)GetValue(FriendSearchTextProperty);
|
|
set => SetValue(FriendSearchTextProperty, value);
|
|
}
|
|
|
|
public ICommand? SelectTabCommand
|
|
{
|
|
get => (ICommand?)GetValue(SelectTabCommandProperty);
|
|
set => SetValue(SelectTabCommandProperty, value);
|
|
}
|
|
|
|
public ICommand? MessageFriendCommand
|
|
{
|
|
get => (ICommand?)GetValue(MessageFriendCommandProperty);
|
|
set => SetValue(MessageFriendCommandProperty, value);
|
|
}
|
|
}
|