Files
OwnCord/Client/OwnCord.Client/Controls/MessageActionsBar.xaml
T
jevb b7d63dd443 chore: update .gitignore to exclude local tooling, build artifacts, and internal docs
Remove Claude Code configs, skills, publish artifacts, HTML mockups,
and internal planning docs from git tracking. Files remain local.
2026-03-15 16:54:55 +01:00

84 lines
4.0 KiB
XML

<UserControl x:Class="OwnCord.Client.Controls.MessageActionsBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="Root">
<UserControl.Resources>
<!-- BgFloating not in global theme; define locally -->
<SolidColorBrush x:Key="BgFloating" Color="#232428"/>
<Style x:Key="ActionButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource TextMuted}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Width" Value="32"/>
<Setter Property="Height" Value="28"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontFamily" Value="{StaticResource FontBody}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource BgHover}"/>
<Setter Property="Foreground" Value="{StaticResource TextNormal}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Visibility converter for IsOwnMessage -->
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
</UserControl.Resources>
<Border Background="{StaticResource BgFloating}"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="1"
CornerRadius="4"
Padding="2">
<StackPanel Orientation="Horizontal">
<!-- React button (always visible, placeholder) -->
<Button Style="{StaticResource ActionButton}" ToolTip="Add Reaction">
<TextBlock Text="&#x1F600;" FontSize="14"/>
</Button>
<!-- Reply button (always visible) -->
<Button Command="{Binding ReplyCommand, ElementName=Root}"
CommandParameter="{Binding CommandParameter, ElementName=Root}"
Style="{StaticResource ActionButton}"
ToolTip="Reply">
<TextBlock Text="&#x21A9;" FontSize="14"/>
</Button>
<!-- Edit button (own messages only) -->
<Button Command="{Binding EditCommand, ElementName=Root}"
CommandParameter="{Binding CommandParameter, ElementName=Root}"
Style="{StaticResource ActionButton}"
Visibility="{Binding IsOwnMessage, ElementName=Root, Converter={StaticResource BoolToVis}}"
ToolTip="Edit">
<TextBlock Text="&#x270E;" FontSize="14"/>
</Button>
<!-- Delete button (own messages only) -->
<Button Command="{Binding DeleteCommand, ElementName=Root}"
CommandParameter="{Binding CommandParameter, ElementName=Root}"
Style="{StaticResource ActionButton}"
Visibility="{Binding IsOwnMessage, ElementName=Root, Converter={StaticResource BoolToVis}}"
ToolTip="Delete">
<TextBlock Text="&#x1F5D1;" FontSize="13"/>
</Button>
<!-- More button (always visible, placeholder) -->
<Button Style="{StaticResource ActionButton}" ToolTip="More">
<TextBlock Text="&#x22EF;" FontSize="16" FontWeight="Bold"/>
</Button>
</StackPanel>
</Border>
</UserControl>