| | 4 | 1 | | <UserControl xmlns="https://github.com/avaloniaui" |
| | | 2 | | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| | | 3 | | xmlns:vm="using:LOCKnet.App.ViewModels" |
| | | 4 | | xmlns:data="using:LOCKnet.Core.DataAbstractions" |
| | | 5 | | xmlns:mi="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" |
| | | 6 | | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| | | 7 | | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| | | 8 | | mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="600" |
| | | 9 | | x:Class="LOCKnet.App.Views.CredentialListView" |
| | | 10 | | x:DataType="vm:CredentialListViewModel" |
| | 2 | 11 | | Background="{StaticResource BrushBg}"> |
| | | 12 | | |
| | | 13 | | <Design.DataContext> |
| | | 14 | | <x:Static Member="vm:DesignData.CredentialList"/> |
| | | 15 | | </Design.DataContext> |
| | | 16 | | |
| | 6 | 17 | | <Grid RowDefinitions="Auto,*,Auto"> |
| | | 18 | | |
| | | 19 | | <!-- ── Top bar ── --> |
| | 6 | 20 | | <Border Grid.Row="0" |
| | 2 | 21 | | Background="{StaticResource BrushSurface}" |
| | | 22 | | Padding="16,12"> |
| | 6 | 23 | | <Grid ColumnDefinitions="Auto,Auto,*,Auto,Auto,Auto,Auto"> |
| | | 24 | | |
| | | 25 | | <!-- Logo --> |
| | 10 | 26 | | <Image Grid.Column="0" |
| | 2 | 27 | | Source="/Assets/favicon-32x32.png" |
| | 2 | 28 | | Width="30" Height="30" |
| | | 29 | | VerticalAlignment="Center" |
| | 2 | 30 | | Margin="0,0,8,0"/> |
| | | 31 | | |
| | 8 | 32 | | <TextBlock Grid.Column="1" |
| | 2 | 33 | | Text="LOCKnet" |
| | | 34 | | FontSize="17" |
| | 2 | 35 | | FontWeight="Bold" |
| | 2 | 36 | | Foreground="{StaticResource BrushTextPrimary}" |
| | | 37 | | VerticalAlignment="Center" |
| | 2 | 38 | | Margin="0,0,20,0"/> |
| | | 39 | | |
| | 6 | 40 | | <TextBox Grid.Column="2" |
| | 2 | 41 | | Text="{Binding SearchText, Mode=TwoWay}" |
| | 2 | 42 | | Watermark="Suchen…" |
| | | 43 | | VerticalAlignment="Center"/> |
| | | 44 | | |
| | 10 | 45 | | <Button Grid.Column="3" |
| | 2 | 46 | | Content="Neu" |
| | | 47 | | Classes="primary" |
| | 2 | 48 | | Command="{Binding AddCommand}" |
| | | 49 | | Margin="12,0,0,0" |
| | 2 | 50 | | Padding="14,8" |
| | | 51 | | VerticalAlignment="Center"/> |
| | | 52 | | |
| | 10 | 53 | | <Button Grid.Column="4" |
| | 2 | 54 | | Content="Bearbeiten" |
| | | 55 | | Classes="ghost" |
| | 2 | 56 | | Command="{Binding EditCommand}" |
| | | 57 | | Margin="8,0,0,0" |
| | 2 | 58 | | Padding="14,8" |
| | | 59 | | VerticalAlignment="Center"/> |
| | 10 | 60 | | <Button Grid.Column="5" |
| | 2 | 61 | | Content="Hilfe" |
| | | 62 | | Classes="ghost" |
| | 2 | 63 | | Command="{Binding ShowTutorialCommand}" |
| | | 64 | | Margin="8,0,0,0" |
| | 2 | 65 | | Padding="14,8" |
| | | 66 | | VerticalAlignment="Center"/> |
| | 10 | 67 | | <Button Grid.Column="6" |
| | 2 | 68 | | Content="Sperren" |
| | | 69 | | Classes="ghost" |
| | 2 | 70 | | Command="{Binding LockCommand}" |
| | | 71 | | Margin="8,0,0,0" |
| | 2 | 72 | | Padding="14,8" |
| | | 73 | | VerticalAlignment="Center"/> |
| | | 74 | | </Grid> |
| | | 75 | | </Border> |
| | | 76 | | |
| | | 77 | | <!-- ── List ── --> |
| | 12 | 78 | | <ListBox Grid.Row="1" |
| | | 79 | | Padding="20,16" |
| | 2 | 80 | | ItemsSource="{Binding Credentials}" |
| | 2 | 81 | | SelectedItem="{Binding SelectedCredential, Mode=TwoWay}" |
| | | 82 | | Background="Transparent" |
| | 2 | 83 | | BorderThickness="0"> |
| | | 84 | | <ListBox.Styles> |
| | | 85 | | <!-- Base style: provides defaults so Style setters can override (Local Values would block this) --> |
| | 2 | 86 | | <Style Selector="Border.credential-card"> |
| | 6 | 87 | | <Setter Property="Background" Value="{StaticResource BrushSurface}"/> |
| | 6 | 88 | | <Setter Property="BorderBrush" Value="Transparent"/> |
| | 6 | 89 | | <Setter Property="BorderThickness" Value="3,0,0,0"/> |
| | | 90 | | </Style> |
| | | 91 | | |
| | | 92 | | <!-- Suppress Fluent's built-in ListBoxItem highlight --> |
| | 2 | 93 | | <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter"> |
| | 6 | 94 | | <Setter Property="Background" Value="Transparent"/> |
| | | 95 | | </Style> |
| | 2 | 96 | | <Style Selector="ListBoxItem:selected /template/ ContentPresenter"> |
| | 6 | 97 | | <Setter Property="Background" Value="Transparent"/> |
| | | 98 | | </Style> |
| | 2 | 99 | | <Style Selector="ListBoxItem:selected:focus /template/ ContentPresenter"> |
| | 6 | 100 | | <Setter Property="Background" Value="Transparent"/> |
| | | 101 | | </Style> |
| | 2 | 102 | | <Style Selector="ListBoxItem:selected:pointerover /template/ ContentPresenter"> |
| | 6 | 103 | | <Setter Property="Background" Value="Transparent"/> |
| | | 104 | | </Style> |
| | | 105 | | |
| | | 106 | | <!-- Hover --> |
| | 2 | 107 | | <Style Selector="ListBoxItem:pointerover Border.credential-card"> |
| | 6 | 108 | | <Setter Property="Background" Value="#252B4A"/> |
| | | 109 | | </Style> |
| | | 110 | | |
| | | 111 | | <!-- Selected: accent left border + brighter background --> |
| | 2 | 112 | | <Style Selector="ListBoxItem:selected Border.credential-card"> |
| | 6 | 113 | | <Setter Property="Background" Value="#2D3575"/> |
| | 6 | 114 | | <Setter Property="BorderBrush" Value="#6C63FF"/> |
| | | 115 | | </Style> |
| | 2 | 116 | | <Style Selector="ListBoxItem:selected:pointerover Border.credential-card"> |
| | 6 | 117 | | <Setter Property="Background" Value="#2D3575"/> |
| | 6 | 118 | | <Setter Property="BorderBrush" Value="#6C63FF"/> |
| | | 119 | | </Style> |
| | 2 | 120 | | <Style Selector="ListBoxItem:selected:focus Border.credential-card"> |
| | 6 | 121 | | <Setter Property="Background" Value="#2D3575"/> |
| | 6 | 122 | | <Setter Property="BorderBrush" Value="#6C63FF"/> |
| | | 123 | | </Style> |
| | | 124 | | </ListBox.Styles> |
| | | 125 | | <ListBox.ItemTemplate> |
| | 4 | 126 | | <DataTemplate x:DataType="data:CredentialRecord"> |
| | 4 | 127 | | <Border Classes="credential-card" |
| | 1 | 128 | | CornerRadius="{StaticResource RadiusMd}" |
| | | 129 | | Padding="16,12" |
| | 1 | 130 | | Cursor="Hand"> |
| | 3 | 131 | | <Grid ColumnDefinitions="Auto,*,Auto"> |
| | | 132 | | |
| | | 133 | | <!-- Avatar --> |
| | 6 | 134 | | <Border Grid.Column="0" |
| | 1 | 135 | | Width="40" Height="40" |
| | | 136 | | CornerRadius="20" |
| | 1 | 137 | | Background="{StaticResource BrushAccent}" |
| | | 138 | | Opacity="0.35" |
| | 1 | 139 | | Margin="0,0,16,0" |
| | | 140 | | ClipToBounds="True"> |
| | 1 | 141 | | <Grid> |
| | 5 | 142 | | <mi:MaterialIcon Kind="{Binding IconKey, Converter={StaticResource StringToMaterialI |
| | | 143 | | Width="20" |
| | 1 | 144 | | Height="20" |
| | | 145 | | Foreground="White" |
| | 1 | 146 | | HorizontalAlignment="Center" |
| | | 147 | | VerticalAlignment="Center" |
| | 1 | 148 | | IsVisible="{Binding IconKey, Converter={x:Static StringConverters.I |
| | 5 | 149 | | <TextBlock Text="{Binding Title}" |
| | | 150 | | FontSize="15" |
| | 1 | 151 | | FontWeight="SemiBold" |
| | | 152 | | Foreground="White" |
| | 1 | 153 | | HorizontalAlignment="Center" |
| | | 154 | | VerticalAlignment="Center" |
| | 1 | 155 | | IsVisible="{Binding IconKey, Converter={x:Static StringConverters.IsNullO |
| | | 156 | | </Grid> |
| | | 157 | | </Border> |
| | | 158 | | |
| | 5 | 159 | | <StackPanel Grid.Column="1" Spacing="2" VerticalAlignment="Center"> |
| | 3 | 160 | | <TextBlock Text="{Binding Title}" |
| | | 161 | | FontSize="15" |
| | 1 | 162 | | FontWeight="SemiBold" |
| | 1 | 163 | | Foreground="{StaticResource BrushTextPrimary}"/> |
| | 3 | 164 | | <TextBlock Text="{Binding Username}" |
| | | 165 | | FontSize="12" |
| | 1 | 166 | | Foreground="{StaticResource BrushTextSecondary}" |
| | 1 | 167 | | IsVisible="{Binding Username, Converter={x:Static StringConverters.IsNotNullO |
| | 4 | 168 | | <Border CornerRadius="4" Padding="5,2" Background="#1A2A5E" |
| | 1 | 169 | | IsVisible="{Binding CredentialType, Converter={StaticResource CredentialTypeIsA |
| | 5 | 170 | | <TextBlock Text="API-Schlüssel" FontSize="9" Foreground="#6C8FFF" FontWeight="SemiB |
| | | 171 | | </Border> |
| | 4 | 172 | | <Border CornerRadius="4" Padding="5,2" Background="#2D3A1A" |
| | 1 | 173 | | IsVisible="{Binding CredentialType, Converter={StaticResource CredentialTypeIsB |
| | 5 | 174 | | <TextBlock Text="Backup Codes" FontSize="9" Foreground="#A6D96A" FontWeight="SemiBo |
| | | 175 | | </Border> |
| | 3 | 176 | | <TextBlock Text="{Binding Url}" |
| | | 177 | | FontSize="11" |
| | 1 | 178 | | Foreground="{StaticResource BrushAccent}" |
| | 1 | 179 | | IsVisible="{Binding Url, Converter={x:Static StringConverters.IsNotNullOrEmp |
| | | 180 | | </StackPanel> |
| | | 181 | | |
| | 4 | 182 | | <TextBlock Grid.Column="2" |
| | 1 | 183 | | Text="›" |
| | | 184 | | FontSize="18" |
| | 1 | 185 | | Foreground="{StaticResource BrushTextMuted}" |
| | | 186 | | VerticalAlignment="Center" |
| | 1 | 187 | | Margin="8,0,0,0"/> |
| | | 188 | | </Grid> |
| | | 189 | | </Border> |
| | | 190 | | </DataTemplate> |
| | | 191 | | </ListBox.ItemTemplate> |
| | | 192 | | </ListBox> |
| | | 193 | | |
| | | 194 | | <!-- ── Bottom action bar ── --> |
| | 6 | 195 | | <Border Grid.Row="2" |
| | 2 | 196 | | Background="{StaticResource BrushSurface}" |
| | | 197 | | Padding="20,10"> |
| | 6 | 198 | | <Grid ColumnDefinitions="Auto,Auto,*,Auto"> |
| | | 199 | | |
| | 6 | 200 | | <Button Grid.Column="0" |
| | 2 | 201 | | Content="Löschen" |
| | | 202 | | Classes="danger" |
| | 2 | 203 | | Command="{Binding DeleteCommand}"/> |
| | | 204 | | |
| | 8 | 205 | | <Button Grid.Column="1" |
| | 2 | 206 | | Content="Kopieren" |
| | | 207 | | Classes="ghost" |
| | 2 | 208 | | Command="{Binding CopyPasswordCommand}" |
| | | 209 | | Margin="8,0,0,0"/> |
| | | 210 | | |
| | 10 | 211 | | <StackPanel Grid.Column="3" |
| | | 212 | | Orientation="Horizontal" |
| | 2 | 213 | | HorizontalAlignment="Right" |
| | | 214 | | VerticalAlignment="Center" |
| | 2 | 215 | | Spacing="16"> |
| | 8 | 216 | | <StackPanel Orientation="Horizontal" |
| | | 217 | | Spacing="8" |
| | 2 | 218 | | VerticalAlignment="Center" |
| | 2 | 219 | | IsVisible="{Binding IsStorageCleanupPending}"> |
| | 10 | 220 | | <TextBlock Text="{Binding StorageCleanupMessage}" |
| | | 221 | | Foreground="#F4B266" |
| | 2 | 222 | | FontSize="12" |
| | | 223 | | TextWrapping="Wrap" |
| | 2 | 224 | | MaxWidth="340" |
| | | 225 | | VerticalAlignment="Center"/> |
| | 8 | 226 | | <Button Content="Bereinigung erneut versuchen" |
| | | 227 | | Classes="ghost" |
| | 2 | 228 | | Command="{Binding RetryStorageCleanupCommand}" |
| | 2 | 229 | | IsEnabled="{Binding !IsRetryingStorageCleanup}" |
| | | 230 | | VerticalAlignment="Center"/> |
| | | 231 | | </StackPanel> |
| | 6 | 232 | | <TextBlock Text="{Binding LockTimerText}" |
| | 2 | 233 | | Foreground="{StaticResource BrushTextMuted}" |
| | | 234 | | FontSize="12" |
| | 2 | 235 | | VerticalAlignment="Center" |
| | 2 | 236 | | IsVisible="{Binding LockTimerText, Converter={x:Static StringConverters.IsNotNullOrEmpty} |
| | 6 | 237 | | <TextBlock Text="{Binding StatusMessage}" |
| | 2 | 238 | | Foreground="{StaticResource BrushSuccess}" |
| | | 239 | | FontSize="12" |
| | 2 | 240 | | VerticalAlignment="Center" |
| | 2 | 241 | | IsVisible="{Binding StatusMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty} |
| | | 242 | | </StackPanel> |
| | | 243 | | |
| | | 244 | | </Grid> |
| | | 245 | | </Border> |
| | | 246 | | |
| | | 247 | | </Grid> |
| | | 248 | | |
| | | 249 | | </UserControl> |