diff --git a/Translations/KeePassOTP.de.language.xml b/Translations/KeePassOTP.de.language.xml index 2457053..3fb03de 100644 --- a/Translations/KeePassOTP.de.language.xml +++ b/Translations/KeePassOTP.de.language.xml @@ -1,6 +1,6 @@ - 11 + 12 OTPCopyTrayNoEntries KPOTP - Keine Einträge vorhanden @@ -101,6 +101,10 @@ TimeCorrectionFixed Feste URL + + TFADefined + 2FA konfiguriert + OTP_OpenDB OTP Datenbank öffnen - {0} diff --git a/Translations/KeePassOTP.fr.language.xml b/Translations/KeePassOTP.fr.language.xml index b32be00..843f575 100644 --- a/Translations/KeePassOTP.fr.language.xml +++ b/Translations/KeePassOTP.fr.language.xml @@ -1,6 +1,6 @@  -3 +4 OTPCopyTrayNoEntries KPOTP - Aucune entrée disponible @@ -106,6 +106,10 @@ Paramétrer l'authenfication à 2 facteurs (2FA) +TFADefined +2FA configuré + + OTP_OpenDB Ouvrir la base OTP - {0} diff --git a/Translations/KeePassOTP.pt.language.xml b/Translations/KeePassOTP.pt.language.xml index 4e5d1d7..82fb352 100644 --- a/Translations/KeePassOTP.pt.language.xml +++ b/Translations/KeePassOTP.pt.language.xml @@ -1,6 +1,6 @@ - 1 + 2 OTPCopyTrayNoEntries KPOTP - Sem entradas disponíveis @@ -105,6 +105,10 @@ SetupTFA Configuração 2FA + + TFADefined + 2FA configurado + OTP_OpenDB Abra o banco de dados OTP - {0} diff --git a/Translations/KeePassOTP.template.language.xml b/Translations/KeePassOTP.template.language.xml index f4aa251..735ddd1 100644 --- a/Translations/KeePassOTP.template.language.xml +++ b/Translations/KeePassOTP.template.language.xml @@ -105,6 +105,10 @@ SetupTFA Setup 2FA + + TFADefined + 2FA defined + OTP_OpenDB Open OTP database - {0} diff --git a/src/KeePassOTPColumnProvider.cs b/src/KeePassOTPColumnProvider.cs index 0a58d63..d567064 100644 --- a/src/KeePassOTPColumnProvider.cs +++ b/src/KeePassOTPColumnProvider.cs @@ -10,11 +10,12 @@ namespace KeePassOTP { internal class KeePassOTPColumnProvider : ColumnProvider { - public const string KPOTPColumnName = "KPOTP"; + public const string OTPColumn_Verbose = "KPOTP"; + public const string OTPColumn_Reduced = "KPOTP_Reduced"; private static Dictionary m_dTFAPossible = new Dictionary(); private System.Timers.Timer m_columnRefreshTimer = new System.Timers.Timer(); - private readonly string[] ColumnName = new[] { KPOTPColumnName }; + private readonly string[] ColumnName = new[] { OTPColumn_Verbose, OTPColumn_Reduced }; public override string[] ColumnNames { get { return ColumnName; } } @@ -25,12 +26,16 @@ public override string GetCellData(string strColumnName, PwEntry pe) Random r = new Random(); string otp = string.Empty; - System.Diagnostics.StackFrame sf = new System.Diagnostics.StackTrace().GetFrames().FirstOrDefault(x => x.GetMethod().Name == "OnPwListItemDrag"); - if (sf != null) + bool bForUsage = new System.Diagnostics.StackTrace().GetFrames().FirstOrDefault(x => x.GetMethod().Name == "OnPwListItemDrag") != null; + if (bForUsage) otp = OTPDAO.GetOTP(pe).GetOTP(); else otp = OTPDAO.GetReadableOTP(pe); - if (!string.IsNullOrEmpty(otp)) return otp; + if (!string.IsNullOrEmpty(otp)) + { + if (bForUsage || strColumnName == OTPColumn_Verbose) return otp; + return PluginTranslation.PluginTranslate.TFADefined; + } if (!Config.CheckTFA) return string.Empty; string url = pe.Strings.ReadSafe(PwDefs.UrlField); @@ -97,7 +102,7 @@ private void OnTimerTick(object sender, EventArgs e) if (KeePass.Program.MainForm.UIIsInteractionBlocked()) return; if (!KeePass.Program.MainForm.Visible) return; if (!KeePass.Program.MainForm.ActiveDatabase.IsOpen) return; - if (KeePass.Program.Config.MainWindow.EntryListColumns.Find(x => x.CustomName == KPOTPColumnName) == null) return; + if (KeePass.Program.Config.MainWindow.EntryListColumns.Find(x => x.CustomName == OTPColumn_Verbose) == null) return; PwGroup pg = KeePass.Program.MainForm.GetSelectedGroup(); if (pg == null) return; bool bRefresh = pg.GetEntries(KeePass.Program.Config.MainWindow.ShowEntriesOfSubGroups).FirstOrDefault(x => OTPDAO.OTPDefined(x) == OTPDAO.OTPDefinition.Complete) != null; @@ -115,7 +120,7 @@ private bool LV_DirectUpdate() { if (m_cpr == null) m_cpr = new ColumnProviderUpdate(this); if (!m_cpr.Initialized) return false; - return m_cpr.UpdateEntryListColumn(KPOTPColumnName) != ColumnProviderUpdate.UpdateResult.Failed; + return m_cpr.UpdateEntryListColumn(OTPColumn_Verbose) != ColumnProviderUpdate.UpdateResult.Failed; } } diff --git a/src/PluginTranslation.cs b/src/PluginTranslation.cs index cfb348e..2433fcc 100644 --- a/src/PluginTranslation.cs +++ b/src/PluginTranslation.cs @@ -59,6 +59,7 @@ public static class PluginTranslate public static readonly string TimeCorrectionEntry = @"Use entry's URL"; public static readonly string TimeCorrectionFixed = @"Use fixed URL"; public static readonly string SetupTFA = @"Setup 2FA"; + public static readonly string TFADefined = @"2FA defined"; public static readonly string OTP_OpenDB = @"Open OTP database - {0}"; public static readonly string OTP_CreateDB_PWHint = @"All secrets will be stored in a separate database which will be included within the main database containing the entries as such. diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index aa9b9a3..1bc53d0 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -11,7 +11,7 @@ [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("rookiestyle")] [assembly: AssemblyProduct ("KeePass Plugin")] -[assembly: AssemblyCopyright("Copyright 2020")] +[assembly: AssemblyCopyright("Copyright 2021")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // Setting ComVisible to false makes the types in this assembly not visible @@ -30,5 +30,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.24")] -[assembly: AssemblyFileVersion("0.24")] \ No newline at end of file +[assembly: AssemblyVersion("0.25")] +[assembly: AssemblyFileVersion("0.25")] \ No newline at end of file diff --git a/version.info b/version.info index ae719e1..b422660 100644 --- a/version.info +++ b/version.info @@ -1,6 +1,6 @@ : -KeePassOTP:0.24 -KeePassOTP!de:11 -KeePassOTP!fr:3 -KeePassOTP!pt:1 +KeePassOTP:0.25 +KeePassOTP!de:12 +KeePassOTP!fr:4 +KeePassOTP!pt:2 :