1pass.lua
branchgtkui
changeset 49 2c57a0ad7c8f
parent 46 fe4f59680246
child 56 a573346e6f7b
--- a/1pass.lua	Wed Mar 23 16:47:24 2016 -0400
+++ b/1pass.lua	Sat Dec 17 00:46:44 2016 -0500
@@ -26,6 +26,8 @@
     ["wallet.government.DriversLicense"] = "Drivers licenses",
     ["system.Tombstone"] = "Dead items",
     ["securenotes.SecureNote"] = "Secure notes",
+    ["wallet.government.SsnUS"] = "Social Security Numbers",
+    ["wallet.computer.Router"] = "Router passwords",
     -- !!! FIXME: more!
 }
 
@@ -36,7 +38,9 @@
     "wallet.financial.BankAccountUS",
     "wallet.membership.Membership",
     "wallet.government.DriversLicense",
+    "wallet.government.SsnUS",
     "securenotes.SecureNote",
+    "wallet.computer.Router",
     -- never show "system.Tombstone",
     -- !!! FIXME: more!
 }
@@ -295,11 +299,27 @@
 end
 secret_menuitem_builders["wallet.financial.CreditCard"] = build_secret_menuitem_creditcard
 
+
 local function build_secret_menuitem_securenote(menu, info, secure)
     build_secret_menuitem(menu, "Notes", secure.notesPlain, true)
 end
 secret_menuitem_builders["securenotes.SecureNote"] = build_secret_menuitem_securenote
 
+
+local function build_secret_menuitem_ssnus(menu, info, secure)
+    build_secret_menuitem(menu, "Name", secure.name, false)
+    build_secret_menuitem(menu, "SSN", secure.number, true)
+end
+secret_menuitem_builders["wallet.government.SsnUS"] = build_secret_menuitem_ssnus
+
+
+local function build_secret_menuitem_router(menu, info, secure)
+    build_secret_menuitem(menu, "Name", secure.name, false)
+    build_secret_menuitem(menu, "Password", secure.password, true)
+end
+secret_menuitem_builders["wallet.computer.Router"] = build_secret_menuitem_router
+
+
 local function build_secret_menuitems(info, menu)
     local metadata = load_json(basedir .. "/" .. info.uuid .. ".1password")
     if (metadata == nil) or (next(metadata) == nil) then  -- the "next" trick tests if table is empty.