fix: Template EMAIL #1986

This commit is contained in:
J-Jamet
2025-07-24 18:22:11 +02:00
parent 4b20e035b2
commit b743d004e2
4 changed files with 105 additions and 39 deletions

View File

@@ -2,6 +2,7 @@ KeePassDX(4.1.3)
* Fix Autofill Registration #2089 * Fix Autofill Registration #2089
* Fix Biometric errors #2081 * Fix Biometric errors #2081
* Fixed timestamp in copy file #1981 #1983 * Fixed timestamp in copy file #1981 #1983
* Fix Template Email #1986
KeePassDX(4.1.2) KeePassDX(4.1.2)
* Fix URL search #1940 #1946 #2003 #2040 #2044 * Fix URL search #1940 #1946 #2003 #2040 #2044

View File

@@ -24,52 +24,115 @@ import java.util.*
class TemplateBuilder { class TemplateBuilder {
private val urlAttribute = TemplateAttribute(TemplateField.LABEL_URL, TemplateAttributeType.TEXT) private val urlAttribute = TemplateAttribute(
private val usernameAttribute = TemplateAttribute(TemplateField.LABEL_USERNAME, TemplateAttributeType.TEXT) label = TemplateField.LABEL_URL,
type = TemplateAttributeType.TEXT
)
private val usernameAttribute = TemplateAttribute(
label = TemplateField.LABEL_USERNAME,
type = TemplateAttributeType.TEXT
)
private val notesAttribute = TemplateAttribute( private val notesAttribute = TemplateAttribute(
TemplateField.LABEL_NOTES, label = TemplateField.LABEL_NOTES,
TemplateAttributeType.TEXT, type = TemplateAttributeType.TEXT,
false, protected = false,
TemplateAttributeOption().apply { options = TemplateAttributeOption().apply {
setNumberLinesToMany() setNumberLinesToMany()
}) }
private val holderAttribute = TemplateAttribute(TemplateField.LABEL_HOLDER, TemplateAttributeType.TEXT) )
private val numberAttribute = TemplateAttribute(TemplateField.LABEL_NUMBER, TemplateAttributeType.TEXT) private val holderAttribute = TemplateAttribute(
private val cvvAttribute = TemplateAttribute(TemplateField.LABEL_CVV, TemplateAttributeType.TEXT, true) label = TemplateField.LABEL_HOLDER,
private val pinAttribute = TemplateAttribute(TemplateField.LABEL_PIN, TemplateAttributeType.TEXT, true) type = TemplateAttributeType.TEXT
private val nameAttribute = TemplateAttribute(TemplateField.LABEL_NAME, TemplateAttributeType.TEXT) )
private val placeOfIssueAttribute = TemplateAttribute(TemplateField.LABEL_PLACE_OF_ISSUE, TemplateAttributeType.TEXT) private val numberAttribute = TemplateAttribute(
label = TemplateField.LABEL_NUMBER,
type = TemplateAttributeType.TEXT
)
private val cvvAttribute = TemplateAttribute(
label = TemplateField.LABEL_CVV,
type = TemplateAttributeType.TEXT,
protected = true
)
private val pinAttribute = TemplateAttribute(
label = TemplateField.LABEL_PIN,
type = TemplateAttributeType.TEXT,
protected = true
)
private val nameAttribute = TemplateAttribute(
label = TemplateField.LABEL_NAME,
type = TemplateAttributeType.TEXT
)
private val placeOfIssueAttribute = TemplateAttribute(
label = TemplateField.LABEL_PLACE_OF_ISSUE,
type = TemplateAttributeType.TEXT
)
private val dateOfIssueAttribute = TemplateAttribute( private val dateOfIssueAttribute = TemplateAttribute(
TemplateField.LABEL_DATE_OF_ISSUE, label = TemplateField.LABEL_DATE_OF_ISSUE,
TemplateAttributeType.DATETIME, type = TemplateAttributeType.DATETIME,
false, protected = false,
TemplateAttributeOption().apply { options = TemplateAttributeOption().apply {
setDateFormatToDate() setDateFormatToDate()
}) }
)
private val expirationDateAttribute = TemplateAttribute( private val expirationDateAttribute = TemplateAttribute(
TemplateField.LABEL_EXPIRATION, label = TemplateField.LABEL_EXPIRATION,
TemplateAttributeType.DATETIME, type = TemplateAttributeType.DATETIME,
false, protected = false,
TemplateAttributeOption().apply { options = TemplateAttributeOption().apply {
setDateFormatToDate() setDateFormatToDate()
}) }
private val emailAddressAttribute = TemplateAttribute(TemplateField.LABEL_EMAIL_ADDRESS, TemplateAttributeType.TEXT) )
private val passwordAttribute = TemplateAttribute(TemplateField.LABEL_PASSWORD, TemplateAttributeType.TEXT, true) private val emailAddressAttribute = TemplateAttribute(
private val ssidAttribute = TemplateAttribute(TemplateField.LABEL_SSID, TemplateAttributeType.TEXT) label = TemplateField.LABEL_USERNAME,
type = TemplateAttributeType.TEXT,
options = TemplateAttributeOption().apply {
alias = TemplateField.LABEL_EMAIL_ADDRESS
}
)
private val passwordAttribute = TemplateAttribute(
label = TemplateField.LABEL_PASSWORD,
type = TemplateAttributeType.TEXT,
protected = true
)
private val ssidAttribute = TemplateAttribute(
label = TemplateField.LABEL_SSID,
type = TemplateAttributeType.TEXT
)
private val wirelessTypeAttribute = TemplateAttribute( private val wirelessTypeAttribute = TemplateAttribute(
TemplateField.LABEL_TYPE, label = TemplateField.LABEL_TYPE,
TemplateAttributeType.LIST, type = TemplateAttributeType.LIST,
false, protected = false,
TemplateAttributeOption().apply{ options = TemplateAttributeOption().apply{
setListItems("WPA3", "WPA2", "WPA", "WEP") setListItems("WPA3", "WPA2", "WPA", "WEP")
default = "WPA2" default = "WPA2"
}) }
private val tokenAttribute = TemplateAttribute(TemplateField.LABEL_TOKEN, TemplateAttributeType.TEXT) )
private val publicKeyAttribute = TemplateAttribute(TemplateField.LABEL_PUBLIC_KEY, TemplateAttributeType.TEXT) private val tokenAttribute = TemplateAttribute(
private val privateKeyAttribute = TemplateAttribute(TemplateField.LABEL_PRIVATE_KEY, TemplateAttributeType.TEXT, true) label = TemplateField.LABEL_TOKEN,
private val seedAttribute = TemplateAttribute(TemplateField.LABEL_SEED, TemplateAttributeType.TEXT, true) type = TemplateAttributeType.TEXT
private val bicAttribute = TemplateAttribute(TemplateField.LABEL_BIC, TemplateAttributeType.TEXT) )
private val ibanAttribute = TemplateAttribute(TemplateField.LABEL_IBAN, TemplateAttributeType.TEXT) private val publicKeyAttribute = TemplateAttribute(
label = TemplateField.LABEL_PUBLIC_KEY,
type = TemplateAttributeType.TEXT
)
private val privateKeyAttribute = TemplateAttribute(
label = TemplateField.LABEL_PRIVATE_KEY,
type = TemplateAttributeType.TEXT,
protected = true
)
private val seedAttribute = TemplateAttribute(
label = TemplateField.LABEL_SEED,
type = TemplateAttributeType.TEXT,
protected = true
)
private val bicAttribute = TemplateAttribute(
label = TemplateField.LABEL_BIC,
type = TemplateAttributeType.TEXT
)
private val ibanAttribute = TemplateAttribute(
label = TemplateField.LABEL_IBAN,
type = TemplateAttributeType.TEXT
)
val email: Template val email: Template
get() { get() {

View File

@@ -1,3 +1,4 @@
* Fix Autofill Registration #2089 * Fix Autofill Registration #2089
* Fix Biometric errors #2081 * Fix Biometric errors #2081
* Fixed timestamp in copy file #1981 #1983 * Fixed timestamp in copy file #1981 #1983
* Fix Template Email #1986

View File

@@ -1,3 +1,4 @@
* Correction de l'enregistrement pour le remplissage automatique #2089 * Correction de l'enregistrement pour le remplissage automatique #2089
* Correction des erreurs biométriques #2081 * Correction des erreurs biométriques #2081
* Correction du timestamp dans le fichier de copie #1981 #1983 * Correction du timestamp dans le fichier de copie #1981 #1983
* Correction des gabaris Email #1986