feat: update light theme.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<TextBlock Text="{Binding #page.CurrentPage}" />
|
<TextBlock Text="{Binding #page.CurrentPage}" />
|
||||||
<u:Pagination
|
<u:Pagination
|
||||||
Name="page"
|
Name="page"
|
||||||
PageSizeOptions="{Binding PageSizes}"
|
PageSizeOptions="10, 20, 50, 100"
|
||||||
TotalCount="600" />
|
TotalCount="600" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Avalonia.Collections;
|
using Avalonia.Collections;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|||||||
@@ -16,17 +16,20 @@
|
|||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource PaginationBackwardGlyph}" />
|
Data="{DynamicResource PaginationBackwardGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
</u:PaginationButton>
|
</u:PaginationButton>
|
||||||
<StackPanel Name="{x:Static u:Pagination.PART_ButtonPanel}" Orientation="Horizontal" />
|
<StackPanel Name="{x:Static u:Pagination.PART_ButtonPanel}" Orientation="Horizontal" />
|
||||||
<u:PaginationButton Name="{x:Static u:Pagination.PART_NextButton}">
|
<u:PaginationButton Name="{x:Static u:Pagination.PART_NextButton}">
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource PaginationForwardGlyph}" />
|
Data="{DynamicResource PaginationForwardGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
</u:PaginationButton>
|
</u:PaginationButton>
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Name="{x:Static u:Pagination.PART_SizeChangerComboBox}"
|
Name="{x:Static u:Pagination.PART_SizeChangerComboBox}"
|
||||||
|
IsVisible="{TemplateBinding ShowPageSizeSelector}"
|
||||||
ItemsSource="{TemplateBinding PageSizeOptions}"
|
ItemsSource="{TemplateBinding PageSizeOptions}"
|
||||||
SelectedItem="{TemplateBinding PageSize,
|
SelectedItem="{TemplateBinding PageSize,
|
||||||
Mode=TwoWay}" />
|
Mode=TwoWay}" />
|
||||||
@@ -38,12 +41,15 @@
|
|||||||
<ControlTheme x:Key="{x:Type u:PaginationButton}" TargetType="u:PaginationButton">
|
<ControlTheme x:Key="{x:Type u:PaginationButton}" TargetType="u:PaginationButton">
|
||||||
<Setter Property="Content" Value="{Binding $self.Page}" />
|
<Setter Property="Content" Value="{Binding $self.Page}" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="MinWidth" Value="40" />
|
<Setter Property="MinWidth" Value="32" />
|
||||||
|
<Setter Property="MinHeight" Value="32" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PaginationButtonDefaultBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PaginationButtonDefaultForeground}" />
|
||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="u:PaginationButton">
|
<ControlTemplate TargetType="u:PaginationButton">
|
||||||
<Border
|
<Border
|
||||||
Padding="8,0"
|
Padding="4"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
@@ -51,41 +57,66 @@
|
|||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Content}" />
|
Content="{TemplateBinding Content}"
|
||||||
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
|
Foreground="{TemplateBinding Foreground}" />
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="u:PaginationButton.Background" Value="LightGray" />
|
<Setter Property="u:PaginationButton.Background" Value="{DynamicResource PaginationButtonPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="u:PaginationButton.Background" Value="{DynamicResource PaginationButtonPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:left">
|
<Style Selector="^:left">
|
||||||
<Setter Property="u:PaginationButton.Content" Value="..." />
|
<Setter Property="u:PaginationButton.Content">
|
||||||
|
<Template>
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource PaginationMoreGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="u:PaginationButton.Content">
|
<Setter Property="u:PaginationButton.Content">
|
||||||
<Template>
|
<Template>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource PaginationFastBackwardGlyph}" />
|
Data="{DynamicResource PaginationFastBackwardGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
</Template>
|
</Template>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:right">
|
<Style Selector="^:right">
|
||||||
<Setter Property="u:PaginationButton.Content" Value="..." />
|
<Setter Property="u:PaginationButton.Content">
|
||||||
|
<Template>
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource PaginationMoreGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="u:PaginationButton.Content">
|
<Setter Property="u:PaginationButton.Content">
|
||||||
<Template>
|
<Template>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource PaginationFastForwardGlyph}" />
|
Data="{DynamicResource PaginationFastForwardGlyph}"
|
||||||
|
Foreground="{DynamicResource PaginationButtonIconForeground}" />
|
||||||
</Template>
|
</Template>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="u:PaginationButton.Background" Value="LightBlue" />
|
<Setter Property="u:PaginationButton.Background" Value="{DynamicResource PaginationButtonSelectedBackground}" />
|
||||||
|
<Setter Property="u:PaginationButton.Foreground" Value="{DynamicResource PaginationButtonSelectedForeground}" />
|
||||||
|
<Setter Property="u:PaginationButton.FontWeight" Value="600" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonDefaultForeground" Color="#FF1C1F23" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonSelectedForeground" Color="#FF0077FA" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonIconForeground" Opacity="0.62" Color="#FF1C1F23" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonDefaultBackground" Color="Transparent" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonPointeroverBackground" Opacity="0.05" Color="#FF2E3238" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonPressedBackground" Opacity="0.09" Color="#FF2E3238" />
|
||||||
|
<SolidColorBrush x:Key="PaginationButtonSelectedBackground" Color="#FFEAF5FF" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -4,4 +4,5 @@
|
|||||||
<PathGeometry x:Key="PaginationFastForwardGlyph">M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z</PathGeometry>
|
<PathGeometry x:Key="PaginationFastForwardGlyph">M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z</PathGeometry>
|
||||||
<PathGeometry x:Key="PaginationForwardGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
<PathGeometry x:Key="PaginationForwardGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
||||||
<PathGeometry x:Key="PaginationBackwardGlyph">M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z</PathGeometry>
|
<PathGeometry x:Key="PaginationBackwardGlyph">M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z</PathGeometry>
|
||||||
|
<PathGeometry x:Key="PaginationMoreGlyph">M7 12C7 13.3807 5.88071 14.5 4.5 14.5C3.11929 14.5 2 13.3807 2 12C2 10.6193 3.11929 9.5 4.5 9.5C5.88071 9.5 7 10.6193 7 12Z M14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12Z M19.5 14.5C20.8807 14.5 22 13.3807 22 12C22 10.6193 20.8807 9.5 19.5 9.5C18.1193 9.5 17 10.6193 17 12C17 13.3807 18.1193 14.5 19.5 14.5Z</PathGeometry>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ namespace Ursa.Controls;
|
|||||||
/// CurrentPage starts from 1.
|
/// CurrentPage starts from 1.
|
||||||
/// Pagination only stores an approximate index internally.
|
/// Pagination only stores an approximate index internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TemplatePart(PART_PreviousButton, typeof(Button))]
|
[TemplatePart(PART_PreviousButton, typeof(PaginationButton))]
|
||||||
[TemplatePart(PART_NextButton, typeof(Button))]
|
[TemplatePart(PART_NextButton, typeof(PaginationButton))]
|
||||||
[TemplatePart(PART_ButtonPanel, typeof(StackPanel))]
|
[TemplatePart(PART_ButtonPanel, typeof(StackPanel))]
|
||||||
[TemplatePart(PART_SizeChangerComboBox, typeof(ComboBox))]
|
[TemplatePart(PART_SizeChangerComboBox, typeof(ComboBox))]
|
||||||
public class Pagination: TemplatedControl
|
public class Pagination: TemplatedControl
|
||||||
@@ -23,8 +23,8 @@ public class Pagination: TemplatedControl
|
|||||||
public const string PART_NextButton = "PART_NextButton";
|
public const string PART_NextButton = "PART_NextButton";
|
||||||
public const string PART_ButtonPanel = "PART_ButtonPanel";
|
public const string PART_ButtonPanel = "PART_ButtonPanel";
|
||||||
public const string PART_SizeChangerComboBox = "PART_SizeChangerComboBox";
|
public const string PART_SizeChangerComboBox = "PART_SizeChangerComboBox";
|
||||||
private Button? _previousButton;
|
private PaginationButton? _previousButton;
|
||||||
private Button? _nextButton;
|
private PaginationButton? _nextButton;
|
||||||
private StackPanel? _buttonPanel;
|
private StackPanel? _buttonPanel;
|
||||||
private readonly PaginationButton[] _buttons = new PaginationButton[7];
|
private readonly PaginationButton[] _buttons = new PaginationButton[7];
|
||||||
private ComboBox? _sizeChangerComboBox;
|
private ComboBox? _sizeChangerComboBox;
|
||||||
@@ -34,8 +34,8 @@ public class Pagination: TemplatedControl
|
|||||||
base.OnApplyTemplate(e);
|
base.OnApplyTemplate(e);
|
||||||
if (_previousButton != null) _previousButton.Click -= OnButtonClick;
|
if (_previousButton != null) _previousButton.Click -= OnButtonClick;
|
||||||
if (_nextButton != null) _nextButton.Click -= OnButtonClick;
|
if (_nextButton != null) _nextButton.Click -= OnButtonClick;
|
||||||
_previousButton = e.NameScope.Find<Button>(PART_PreviousButton);
|
_previousButton = e.NameScope.Find<PaginationButton>(PART_PreviousButton);
|
||||||
_nextButton = e.NameScope.Find<Button>(PART_NextButton);
|
_nextButton = e.NameScope.Find<PaginationButton>(PART_NextButton);
|
||||||
_buttonPanel = e.NameScope.Find<StackPanel>(PART_ButtonPanel);
|
_buttonPanel = e.NameScope.Find<StackPanel>(PART_ButtonPanel);
|
||||||
_sizeChangerComboBox = e.NameScope.Find<ComboBox>(PART_SizeChangerComboBox);
|
_sizeChangerComboBox = e.NameScope.Find<ComboBox>(PART_SizeChangerComboBox);
|
||||||
if (_previousButton != null) _previousButton.Click += OnButtonClick;
|
if (_previousButton != null) _previousButton.Click += OnButtonClick;
|
||||||
@@ -110,6 +110,24 @@ public class Pagination: TemplatedControl
|
|||||||
set => SetValue(PageButtonThemeProperty, value);
|
set => SetValue(PageButtonThemeProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<bool> ShowPageSizeSelectorProperty = AvaloniaProperty.Register<Pagination, bool>(
|
||||||
|
nameof(ShowPageSizeSelector));
|
||||||
|
|
||||||
|
public bool ShowPageSizeSelector
|
||||||
|
{
|
||||||
|
get => GetValue(ShowPageSizeSelectorProperty);
|
||||||
|
set => SetValue(ShowPageSizeSelectorProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<bool> ShowQuickJumpProperty = AvaloniaProperty.Register<Pagination, bool>(
|
||||||
|
nameof(ShowQuickJump));
|
||||||
|
|
||||||
|
public bool ShowQuickJump
|
||||||
|
{
|
||||||
|
get => GetValue(ShowQuickJumpProperty);
|
||||||
|
set => SetValue(ShowQuickJumpProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||||
{
|
{
|
||||||
base.OnPropertyChanged(change);
|
base.OnPropertyChanged(change);
|
||||||
@@ -156,11 +174,11 @@ public class Pagination: TemplatedControl
|
|||||||
{
|
{
|
||||||
if (sender is PaginationButton pageButton)
|
if (sender is PaginationButton pageButton)
|
||||||
{
|
{
|
||||||
if (pageButton.IsLeftForward)
|
if (pageButton.IsFastForward)
|
||||||
{
|
{
|
||||||
AddCurrentPage(-5);
|
AddCurrentPage(-5);
|
||||||
}
|
}
|
||||||
else if (pageButton.IsRightForward)
|
else if (pageButton.IsFastBackward)
|
||||||
{
|
{
|
||||||
AddCurrentPage(5);
|
AddCurrentPage(5);
|
||||||
}
|
}
|
||||||
@@ -258,5 +276,7 @@ public class Pagination: TemplatedControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
CurrentPage = currentPage;
|
CurrentPage = currentPage;
|
||||||
|
if (_previousButton != null) _previousButton.IsEnabled = CurrentPage > 1;
|
||||||
|
if( _nextButton!=null) _nextButton.IsEnabled = CurrentPage < PageCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ using Avalonia.Styling;
|
|||||||
namespace Ursa.Controls;
|
namespace Ursa.Controls;
|
||||||
|
|
||||||
[PseudoClasses(PC_Left, PC_Right, PC_Selected)]
|
[PseudoClasses(PC_Left, PC_Right, PC_Selected)]
|
||||||
public class PaginationButton: Button, IStyleable
|
public class PaginationButton: Button
|
||||||
{
|
{
|
||||||
public const string PC_Left = ":left";
|
public const string PC_Left = ":left";
|
||||||
public const string PC_Right = ":right";
|
public const string PC_Right = ":right";
|
||||||
@@ -21,16 +21,16 @@ public class PaginationButton: Button, IStyleable
|
|||||||
get => GetValue(PageProperty);
|
get => GetValue(PageProperty);
|
||||||
set => SetValue(PageProperty, value);
|
set => SetValue(PageProperty, value);
|
||||||
}
|
}
|
||||||
public bool IsLeftForward { get; private set; }
|
internal bool IsFastForward { get; private set; }
|
||||||
public bool IsRightForward { get; private set; }
|
internal bool IsFastBackward { get; private set; }
|
||||||
|
|
||||||
internal void SetStatus(int page, bool isSelected, bool isLeft, bool isRight)
|
internal void SetStatus(int page, bool isSelected, bool isLeft, bool isRight)
|
||||||
{
|
{
|
||||||
PseudoClasses.Set(PC_Selected, isSelected);
|
PseudoClasses.Set(PC_Selected, isSelected);
|
||||||
PseudoClasses.Set(PC_Left, isLeft);
|
PseudoClasses.Set(PC_Left, isLeft);
|
||||||
PseudoClasses.Set(PC_Right, isRight);
|
PseudoClasses.Set(PC_Right, isRight);
|
||||||
IsLeftForward = isLeft;
|
IsFastForward = isLeft;
|
||||||
IsRightForward = isRight;
|
IsFastBackward = isRight;
|
||||||
Page = page;
|
Page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user