mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
112 lines
5.2 KiB
XML
112 lines
5.2 KiB
XML
<v:ChromelessWindow xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:m="using:SourceGit.Models"
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
xmlns:v="using:SourceGit.Views"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="SourceGit.Views.LFSLocks"
|
|
x:DataType="vm:LFSLocks"
|
|
x:Name="ThisControl"
|
|
Icon="/App.ico"
|
|
Title="{DynamicResource Text.GitLFS.Locks.Title}"
|
|
Width="600" Height="400"
|
|
WindowStartupLocation="CenterOwner">
|
|
<Grid RowDefinitions="Auto,*">
|
|
<!-- TitleBar -->
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">
|
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
|
PointerPressed="BeginMoveWindow"/>
|
|
|
|
<Path Grid.Column="0"
|
|
Width="14" Height="14"
|
|
Margin="10,0,0,0"
|
|
Data="{StaticResource Icons.Lock}"
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
|
|
|
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
|
<Button Classes="caption_button_macos" Click="CloseWindow">
|
|
<Grid>
|
|
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
|
<Path Height="6" Width="6" Stretch="Fill" Fill="#505050" Data="{StaticResource Icons.MacOS.Close}"/>
|
|
</Grid>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<TextBlock Grid.Column="0" Grid.ColumnSpan="3"
|
|
Classes="bold"
|
|
Text="{DynamicResource Text.GitLFS.Locks.Title}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsHitTestVisible="False"/>
|
|
|
|
<Button Grid.Column="2"
|
|
Classes="caption_button"
|
|
Click="CloseWindow"
|
|
IsVisible="{OnPlatform True, macOS=False}">
|
|
<Path Data="{StaticResource Icons.Window.Close}"/>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<!-- Locked Files -->
|
|
<Grid Grid.Row="1">
|
|
<ListBox Margin="8"
|
|
Background="{DynamicResource Brush.Contents}"
|
|
ItemsSource="{Binding Locks}"
|
|
SelectionMode="Single"
|
|
BorderThickness="1"
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
<ListBox.Styles>
|
|
<Style Selector="ListBoxItem">
|
|
<Setter Property="Margin" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Height" Value="26"/>
|
|
</Style>
|
|
</ListBox.Styles>
|
|
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel Orientation="Vertical"/>
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="m:LFSLock">
|
|
<Grid ColumnDefinitions="26,*,100,32,32">
|
|
<Path Grid.Column="0" Width="14" Height="14" Margin="8,0,4,0" Data="{StaticResource Icons.File}"/>
|
|
<Border Grid.Column="1" Margin="4,0" ClipToBounds="True">
|
|
<TextBlock Text="{Binding File}" HorizontalAlignment="Left"/>
|
|
</Border>
|
|
<Border Grid.Column="2" Margin="8,0" ClipToBounds="True">
|
|
<TextBlock Text="{Binding User}" HorizontalAlignment="Left"/>
|
|
</Border>
|
|
<Button Grid.Column="3" Classes="icon_button" Click="OnUnlockButtonClicked" ToolTip.Tip="{DynamicResource Text.GitLFS.Locks.Unlock}">
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Unlock}"/>
|
|
</Button>
|
|
<Button Grid.Column="4" Classes="icon_button" Click="OnForceUnlockButtonClicked" ToolTip.Tip="{DynamicResource Text.GitLFS.Locks.UnlockForce}">
|
|
<Path Width="14" Height="14" Fill="Red" Data="{StaticResource Icons.Unlock}"/>
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<!-- Empty -->
|
|
<StackPanel Orientation="Vertical"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsVisible="{Binding IsEmpty}">
|
|
<Path Width="48" Height="48" Data="{StaticResource Icons.Empty}" Fill="{DynamicResource Brush.FG2}"/>
|
|
<TextBlock Margin="0,16,0,0" Text="{DynamicResource Text.GitLFS.Locks.Empty}" Foreground="{DynamicResource Brush.FG2}"/>
|
|
</StackPanel>
|
|
|
|
<!-- Loading -->
|
|
<v:LoadingIcon Width="48" Height="48"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsVisible="{Binding IsLoading}"/>
|
|
</Grid>
|
|
</Grid>
|
|
</v:ChromelessWindow>
|