about summary refs log tree commit diff
path: root/ModerationClient/Views/UserManagementWindow.axaml
diff options
context:
space:
mode:
Diffstat (limited to 'ModerationClient/Views/UserManagementWindow.axaml')
-rw-r--r--ModerationClient/Views/UserManagementWindow.axaml59
1 files changed, 59 insertions, 0 deletions
diff --git a/ModerationClient/Views/UserManagementWindow.axaml b/ModerationClient/Views/UserManagementWindow.axaml
new file mode 100644
index 0000000..ef93517
--- /dev/null
+++ b/ModerationClient/Views/UserManagementWindow.axaml
@@ -0,0 +1,59 @@
+<Window xmlns="https://github.com/avaloniaui"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:vm="using:ModerationClient.ViewModels"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:views="clr-namespace:ModerationClient.Views"
+        xmlns:responses="clr-namespace:LibMatrix.Homeservers.ImplementationDetails.Synapse.Models.Responses;assembly=LibMatrix"
+        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+        x:Class="ModerationClient.Views.UserManagementWindow"
+        x:DataType="vm:MainWindowViewModel"
+        Icon="/Assets/avalonia-logo.ico"
+        Title="ModerationClient"
+        Width="640" Height="480">
+    <!-- <Design.DataContext> -->
+    <!-- This only sets the DataContext for the previewer in an IDE,
+             to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
+    <!-- <vm:MainWindowViewModel /> -->
+    <!-- </Design.DataContext> -->
+
+    <Grid RowDefinitions="Auto, *">
+        <Grid Grid.Row="0" ColumnDefinitions="Auto, *, Auto" x:Name="TopPanel">
+            <StackPanel Orientation="Horizontal" Grid.Column="0">
+                <Label Content="{CompiledBinding Scale}" />
+                <Label>x</Label>
+                <Rectangle Width="32" />
+                <Label Content="{CompiledBinding ChildTargetWidth}" />
+                <Label>x</Label>
+                <Label Content="{CompiledBinding ChildTargetHeight}" />
+            </StackPanel>
+            <Label Grid.Column="2">Press '?' for keybinds</Label>
+        </Grid>
+        <Viewbox Grid.Row="1">
+            <ScrollViewer
+                Width="{CompiledBinding ChildTargetWidth}"
+                Background="#222222"
+                Height="{CompiledBinding ChildTargetHeight}">
+                <ContentControl DataContext="{CompiledBinding Path=CurrentViewModel}">
+                    <ItemsControl ItemsSource="{ReflectionBinding Users}">
+                        <ItemsControl.ItemTemplate>
+                            <DataTemplate DataType="vm:User">
+                                <StackPanel Orientation="Vertical">
+                                    <StackPanel Orientation="Horizontal">
+                                        <TextBlock Text="{CompiledBinding Name}" />
+                                        <TextBlock Text="{CompiledBinding DisplayName}" />
+                                    </StackPanel>
+                                    <StackPanel Orientation="Horizontal">
+                                        <Button Tag="{CompiledBinding .}" Click="PuppetButtonClicked">Puppet</Button>
+                                        <!-- <Button>Terminate</Button> -->
+                                    </StackPanel>
+                                </StackPanel>
+                            </DataTemplate>
+                        </ItemsControl.ItemTemplate>
+                    </ItemsControl>
+                </ContentControl>
+            </ScrollViewer>
+        </Viewbox>
+    </Grid>
+
+</Window>
\ No newline at end of file