UserRecovererView.axaml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <UserControl
  2. xmlns="https://github.com/avaloniaui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d"
  7. d:DesignWidth="550"
  8. d:DesignHeight="450"
  9. Width="500"
  10. Height="400"
  11. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  12. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  13. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  14. x:Class="Ryujinx.Ava.UI.Views.User.UserRecovererView"
  15. x:CompileBindings="True"
  16. x:DataType="viewModels:UserProfileViewModel"
  17. Focusable="True">
  18. <Design.DataContext>
  19. <viewModels:UserProfileViewModel />
  20. </Design.DataContext>
  21. <Grid HorizontalAlignment="Stretch"
  22. VerticalAlignment="Stretch">
  23. <Grid.RowDefinitions>
  24. <RowDefinition/>
  25. <RowDefinition Height="Auto"/>
  26. </Grid.RowDefinitions>
  27. <Border
  28. CornerRadius="5"
  29. BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
  30. BorderThickness="1"
  31. Grid.Row="0">
  32. <Panel>
  33. <ListBox
  34. HorizontalAlignment="Stretch"
  35. VerticalAlignment="Stretch"
  36. Items="{Binding LostProfiles}">
  37. <ListBox.ItemTemplate>
  38. <DataTemplate>
  39. <Border
  40. Margin="2"
  41. HorizontalAlignment="Stretch"
  42. VerticalAlignment="Stretch"
  43. ClipToBounds="True"
  44. CornerRadius="5">
  45. <Grid Margin="0">
  46. <Grid.ColumnDefinitions>
  47. <ColumnDefinition/>
  48. <ColumnDefinition Width="Auto"/>
  49. </Grid.ColumnDefinitions>
  50. <TextBlock
  51. HorizontalAlignment="Stretch"
  52. Text="{Binding UserId}"
  53. TextAlignment="Left"
  54. TextWrapping="Wrap" />
  55. <Button Grid.Column="1"
  56. HorizontalAlignment="Right"
  57. Click="Recover"
  58. CommandParameter="{Binding}"
  59. Content="{locale:Locale Recover}"/>
  60. </Grid>
  61. </Border>
  62. </DataTemplate>
  63. </ListBox.ItemTemplate>
  64. </ListBox>
  65. <TextBlock
  66. IsVisible="{Binding IsEmpty}"
  67. TextAlignment="Center"
  68. Text="{locale:Locale UserProfilesRecoverEmptyList}"/>
  69. </Panel>
  70. </Border>
  71. <StackPanel
  72. Grid.Row="1"
  73. Margin="0 24 0 0"
  74. Orientation="Horizontal">
  75. <Button
  76. Width="50"
  77. MinWidth="50"
  78. Click="GoBack">
  79. <ui:SymbolIcon Symbol="Back"/>
  80. </Button>
  81. </StackPanel>
  82. </Grid>
  83. </UserControl>