Browse Source

close #1, filter selectable accounts to login accounts only

master
Andrew Kaiser 6 years ago
parent
commit
6996c5eb4b
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      package.json
  2. +4
    -1
      src/index.js

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "bitwarden-dmenu",
"version": "1.1.1",
"version": "1.1.2",
"description": "",
"keywords": [
"bitwarden",


+ 4
- 1
src/index.js View File

@ -55,7 +55,10 @@ const getAccounts = ({ session }) => {
// choose one account with dmenu
const chooseAccount = async ({ list }) => {
const accountNames = list.map(a => `${a.name}: ${a.login.username}`)
const LOGIN_TYPE = 1
const accountNames = list
.filter(a => a.type === LOGIN_TYPE)
.map(a => `${a.name}: ${a.login.username}`)
const selected = await dmenuRun(accountNames.join('\n'))
const index = accountNames.indexOf(selected)
const selectedAccount = list[index]


Loading…
Cancel
Save