mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
Bigger database password textbox
Wrong password sets the password box border to red Typing text removes the error Implemented real command bar at the bottom in Groups Search box is always present
This commit is contained in:
@@ -15,13 +15,20 @@
|
||||
<SolidColorBrush x:Key="Transparent" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SystemColor" Color="{StaticResource SystemColorButtonFaceColor}" />
|
||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
|
||||
<converters:PluralizationConverter x:Key="PluralizationConverter"/>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<converters:TextToWidthConverter x:Key="TextToWidthConverter"/>
|
||||
<converters:TextToFontStyleConverter x:Key="TextToFontStyleConverter"/>
|
||||
</Page.Resources>
|
||||
<Page.DataContext>
|
||||
<viewModels:GroupVm />
|
||||
</Page.DataContext>
|
||||
<Page.BottomAppBar>
|
||||
<CommandBar VerticalAlignment="Center" >
|
||||
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}" Click="EditButton_Click" />
|
||||
<AppBarButton Icon="Delete" Label="Delete" IsEnabled="{Binding IsNotRoot}" Click="DeleteButton_Click" />
|
||||
<CommandBar.SecondaryCommands>
|
||||
<AppBarButton Icon="Setting" Label="Settings" />
|
||||
</CommandBar.SecondaryCommands>
|
||||
</CommandBar>
|
||||
</Page.BottomAppBar>
|
||||
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.Resources>
|
||||
<CollectionViewSource
|
||||
@@ -140,7 +147,7 @@
|
||||
<DataTemplate x:Name="Expanded">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<SymbolIcon Symbol="{Binding IconSymbol}" />
|
||||
<TextBlock Text="{Binding Name}" FontWeight="{Binding FontWeight}" TextWrapping="NoWrap" VerticalAlignment="Center" Margin="30,0,20,0" />
|
||||
<TextBlock Text="{Binding Name}" FontWeight="{Binding FontWeight}" TextWrapping="NoWrap" VerticalAlignment="Center" Margin="30,0,20,0" FontStyle="{Binding Name, Converter={StaticResource TextToFontStyleConverter}, ConverterParameter=Recycle\ Bin}" />
|
||||
<!--<TextBlock Text="{Binding EntryCount}" HorizontalAlignment="Right" VerticalAlignment="Center" />-->
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@@ -212,7 +219,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="300"/>
|
||||
<ColumnDefinition Width="400"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Margin="39,0,39,0"
|
||||
Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
||||
@@ -232,17 +239,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,30,0"
|
||||
PlaceholderText="New group name..."/>
|
||||
<CommandBar Grid.Column="2" Background="Transparent" IsOpen="True" VerticalAlignment="Center" Margin="0,20,0,0">
|
||||
<AppBarButton Icon="Find" Label="Search">
|
||||
<AppBarButton.Flyout>
|
||||
<Flyout>
|
||||
<SearchBox PlaceholderText="Search..." Width="350" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" />
|
||||
</Flyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}" />
|
||||
<AppBarButton Icon="Delete" Label="Delete" IsEnabled="{Binding IsNotRoot}" Click="DeleteButton_Click" />
|
||||
</CommandBar>
|
||||
<SearchBox Grid.Column="2" PlaceholderText="Search..." Width="350" Height="40" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
@@ -165,5 +165,21 @@ namespace ModernKeePass.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
private void EditButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BottomAppBar.IsOpen = false;
|
||||
if (Model.IsEditMode)
|
||||
{
|
||||
Task.Factory.StartNew(
|
||||
() => Dispatcher.RunAsync(CoreDispatcherPriority.Low,
|
||||
() => TitleTextBox.Focus(FocusState.Programmatic)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Task.Factory.StartNew(
|
||||
() => Dispatcher.RunAsync(CoreDispatcherPriority.Low,
|
||||
() => PageRoot.Focus(FocusState.Programmatic)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30">Open an existing password database from your PC.</TextBlock>
|
||||
<HyperlinkButton Content="From Url..." IsEnabled="False" />
|
||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30">Open an existing password database from an Internet location (not yet implemented).</TextBlock>
|
||||
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="350" Visibility="{Binding ShowPasswordBox, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding ShowPasswordBox, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<StackPanel>
|
||||
<TextBlock Margin="25,10,0,10" Text="{Binding Name}" />
|
||||
<local:OpenDatabaseUserControl ValidationChecked="PasswordUserControl_PasswordChecked" />
|
||||
|
@@ -19,19 +19,20 @@
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="0,-20,0,20">Recent</TextBlock>
|
||||
<ListView
|
||||
ItemsSource="{Binding Source={StaticResource RecentItemsSource}}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
Width="600" >
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="10,0,10,0">
|
||||
<TextBlock Text="{Binding Name}" Width="350" Padding="5,0,0,0" />
|
||||
<TextBlock Text="{Binding Path}" Width="350" Padding="5,0,0,0" FontSize="10" />
|
||||
<TextBlock Text="{Binding Name}" Padding="5,0,0,0" />
|
||||
<TextBlock Text="{Binding Path}" Padding="5,0,0,0" FontSize="10" />
|
||||
<local:OpenDatabaseUserControl Margin="0,10,0,0" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecking="OpenDatabaseUserControl_OnValidationChecking" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
Reference in New Issue
Block a user