mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Open databases errors are cleaner
WIP SemanticView ListView Width issue
This commit is contained in:
@@ -121,19 +121,13 @@
|
||||
<value>Select key file from disk...</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorOpen" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
<value>Error: </value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserKeyFile" xml:space="preserve">
|
||||
<value>key file</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserOr" xml:space="preserve">
|
||||
<value> or </value>
|
||||
<value>- wrong key file</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserPassword" xml:space="preserve">
|
||||
<value>password</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserStart" xml:space="preserve">
|
||||
<value>Error: wrong </value>
|
||||
<value>- password incorrect</value>
|
||||
</data>
|
||||
<data name="CompositeKeyOpening" xml:space="preserve">
|
||||
<value>Opening...</value>
|
||||
@@ -265,7 +259,7 @@
|
||||
<value>Security</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
||||
<value>user account</value>
|
||||
<value>- user account</value>
|
||||
</data>
|
||||
<data name="SettingsMenuItemSave" xml:space="preserve">
|
||||
<value>Saving</value>
|
||||
@@ -273,4 +267,7 @@
|
||||
<data name="RecycleBinTitle" xml:space="preserve">
|
||||
<value>Recycle Bin</value>
|
||||
</data>
|
||||
<data name="String" xml:space="preserve">
|
||||
<value>##</value>
|
||||
</data>
|
||||
</root>
|
@@ -121,19 +121,13 @@
|
||||
<value>Choisissez un fichier...</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorOpen" xml:space="preserve">
|
||||
<value>Erreur</value>
|
||||
<value>Erreur: </value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserKeyFile" xml:space="preserve">
|
||||
<value>fichier de clé</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserOr" xml:space="preserve">
|
||||
<value> ou </value>
|
||||
<value>- mauvais fichier de clé</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserPassword" xml:space="preserve">
|
||||
<value>mot de passe</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserStart" xml:space="preserve">
|
||||
<value>Erreur: mauvais </value>
|
||||
<value>- mot de passe incorrect</value>
|
||||
</data>
|
||||
<data name="CompositeKeyOpening" xml:space="preserve">
|
||||
<value>Ouverture...</value>
|
||||
@@ -265,7 +259,7 @@
|
||||
<value>Sécurité</value>
|
||||
</data>
|
||||
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
||||
<value>compte utilisateur</value>
|
||||
<value>- compte utilisateur</value>
|
||||
</data>
|
||||
<data name="SettingsMenuItemSave" xml:space="preserve">
|
||||
<value>Sauvegardes</value>
|
||||
|
@@ -132,16 +132,15 @@ namespace ModernKeePass.ViewModels
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
var errorMessage = new StringBuilder(_resource.GetResourceValue("CompositeKeyErrorUserStart"));
|
||||
if (HasPassword) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserPassword"));
|
||||
if (HasPassword && HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserOr"));
|
||||
if (HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserKeyFile"));
|
||||
if (HasUserAccount) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserAccount"));
|
||||
var errorMessage = new StringBuilder($"{_resource.GetResourceValue("CompositeKeyErrorOpen")}\n");
|
||||
if (HasPassword) errorMessage.AppendLine(_resource.GetResourceValue("CompositeKeyErrorUserPassword"));
|
||||
if (HasKeyFile) errorMessage.AppendLine(_resource.GetResourceValue("CompositeKeyErrorUserKeyFile"));
|
||||
if (HasUserAccount) errorMessage.AppendLine(_resource.GetResourceValue("CompositeKeyErrorUserAccount"));
|
||||
UpdateStatus(errorMessage.ToString(), StatusTypes.Error);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var error = $"{_resource.GetResourceValue("CompositeKeyErrorOpen")}: {e.Message}";
|
||||
var error = $"{_resource.GetResourceValue("CompositeKeyErrorOpen")}{e.Message}";
|
||||
UpdateStatus(error, StatusTypes.Error);
|
||||
}
|
||||
finally
|
||||
|
@@ -316,6 +316,7 @@
|
||||
</SemanticZoom.ZoomedInView>
|
||||
<SemanticZoom.ZoomedOutView>
|
||||
<ListView
|
||||
Height="Auto" Width="Auto"
|
||||
ItemsSource="{Binding Source={StaticResource EntriesZoomedOutViewSource}}"
|
||||
SelectionChanged="groups_SelectionChanged"
|
||||
SelectionMode="None"
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<RowDefinition Height="45" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding HasPassword, Mode=TwoWay}" />
|
||||
<PasswordBox Grid.Row="0" Grid.Column="1" x:Uid="CompositeKeyPassword" Password="{Binding Password, Mode=TwoWay}" Height="30" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" BorderBrush="{Binding StatusType, Converter={StaticResource DiscreteIntToSolidColorBrushConverter}}" >
|
||||
@@ -54,6 +54,6 @@
|
||||
</SymbolIcon>
|
||||
</HyperlinkButton>
|
||||
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" Content="{Binding ButtonLabel, ElementName=UserControl}" Click="OpenButton_OnClick" Background="{ThemeResource ListViewItemSelectedPointerOverBorderThemeBrush}" Foreground="{ThemeResource TextBoxBackgroundThemeBrush}" IsEnabled="{Binding IsValid}" />
|
||||
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Height="28" FontSize="14" FontWeight="Light" Text="{Binding Status}" Foreground="{Binding StatusType, Converter={StaticResource DiscreteIntToSolidColorBrushConverter}}" Visibility="{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}}" />
|
||||
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Height="Auto" FontSize="14" FontWeight="Light" Text="{Binding Status}" Foreground="{Binding StatusType, Converter={StaticResource DiscreteIntToSolidColorBrushConverter}}" Visibility="{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
Reference in New Issue
Block a user