Implement initial entry editing support (no notes editing or gen update)

This commit is contained in:
2024-03-07 18:34:12 -05:00
parent e729953cab
commit b208ea415a
3 changed files with 45 additions and 14 deletions
+2 -10
View File
@@ -40,16 +40,8 @@ func AddEntry(targetLocation string, hidePassword bool, entryType uint8) {
unencryptedEntry = append([]string{"", "", ""}, note...)
}
// ensure entry data is not empty
var entryDataPresent bool
for _, line := range unencryptedEntry {
if line != "" {
entryDataPresent = true
break
}
}
if entryDataPresent {
// write and preview the new entry
if offline.EntryIsNotEmpty(unencryptedEntry) {
offline.WriteEntry(targetLocation, unencryptedEntry)
fmt.Println(ansiBold + "\nEntry Preview:" + offline.AnsiReset)
EntryReader(unencryptedEntry, hidePassword)