mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Semantic Zoom now has grouped zoomed out view
New button to open browser to Entry Url Entries are now sorted alphabetically
This commit is contained in:

committed by
BONNEVILLE Geoffroy

parent
3d033417ad
commit
dfb5ec9683
@@ -38,13 +38,18 @@
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<TextBlock x:Name="userTextBlock" TextWrapping="Wrap" Text="User name or login" FontSize="18"/>
|
||||
<TextBox x:Name="userTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserName, Mode=TwoWay}" Width="350" />
|
||||
<TextBox x:Name="userTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserName, Mode=TwoWay}" Width="350" Height="32" />
|
||||
<TextBlock x:Name="passwordTextBlock" TextWrapping="Wrap" Text="Password" FontSize="18"/>
|
||||
<PasswordBox x:Name="passwordBox" HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" />
|
||||
<TextBox x:Name="passwordTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<PasswordBox x:Name="passwordBox" HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" Height="32" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" />
|
||||
<TextBox x:Name="passwordTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<CheckBox x:Name="checkBox" HorizontalAlignment="Left" Margin="-3,0,0,0" Content="Show password" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}"/>
|
||||
<TextBlock x:Name="urlTextBlock" TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
||||
<TextBox x:Name="urlTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Url, Mode=TwoWay}" Width="350" MaxLength="256" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="350" >
|
||||
<TextBox x:Name="urlTextBox" TextWrapping="Wrap" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="300" MaxLength="256" />
|
||||
<Button Click="UrlButton_Click" Height="32" BorderThickness="0" Background="Transparent" Margin="0">
|
||||
<SymbolIcon Symbol="Forward" VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock x:Name="notesTextBlock" TextWrapping="Wrap" Text="Notes" FontSize="18"/>
|
||||
<TextBox x:Name="notesTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" />
|
||||
</StackPanel>
|
||||
|
@@ -76,5 +76,18 @@ namespace ModernKeePass.Pages
|
||||
entry?.RemoveEntry();
|
||||
if (Frame.CanGoBack) Frame.GoBack();
|
||||
}
|
||||
|
||||
private async void UrlButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var uri = new Uri(urlTextBox.Text);
|
||||
await Windows.System.Launcher.LaunchUriAsync(uri);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// TODO: Show some error
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,10 @@
|
||||
Source="{Binding Groups}"/>
|
||||
<CollectionViewSource
|
||||
x:Name="EntriesViewSource"
|
||||
Source="{Binding Entries}"/>
|
||||
Source="{Binding Entries}" />
|
||||
<CollectionViewSource
|
||||
x:Name="EntriesZoomedOutViewSource"
|
||||
Source="{Binding EntriesZoomedOut}" IsSourceGrouped="True"/>
|
||||
</Grid.Resources>
|
||||
<Grid.ChildrenTransitions>
|
||||
<TransitionCollection>
|
||||
@@ -170,15 +173,33 @@
|
||||
<SemanticZoom.ZoomedOutView>
|
||||
<ListView
|
||||
x:Name="SemanticListView"
|
||||
ItemsSource="{Binding Source={StaticResource EntriesViewSource}}"
|
||||
ItemsSource="{Binding Source={StaticResource EntriesZoomedOutViewSource}}"
|
||||
IsSwipeEnabled="false"
|
||||
SelectionChanged="groups_SelectionChanged"
|
||||
IsSynchronizedWithCurrentItem="False" >
|
||||
IsSynchronizedWithCurrentItem="False">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle HidesIfEmpty="True">
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Background="LightGray" Margin="0">
|
||||
<TextBlock Text="{Binding Key}" Foreground="Black" Margin="30" Style="{StaticResource HeaderTextBlockStyle}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
</ListView>
|
||||
</SemanticZoom.ZoomedOutView>
|
||||
</SemanticZoom>
|
||||
|
@@ -43,6 +43,7 @@ namespace ModernKeePass.Pages
|
||||
var mru = StorageApplicationPermissions.MostRecentlyUsedList;
|
||||
var file = await mru.GetFileAsync(recentVm.SelectedItem.Token);
|
||||
|
||||
// TODO: this closes the current opened database
|
||||
var app = (App)Application.Current;
|
||||
app.Database = new DatabaseHelper(file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user