Skip to content

Commit 2aa15da

Browse files
committed
update and search fix
1 parent ac2538f commit 2aa15da

File tree

16 files changed

+52
-13
lines changed

16 files changed

+52
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "passwall",
3-
"version": "1.0.0",
3+
"version": "v1.0.0",
44
"author": "PassWall <hello@passwall.io>",
55
"description": "PassWall Desktop",
66
"license": "MIT",

src/renderer/components/ListItem.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ export default {
4444
else return this.data.title
4545
},
4646
getUsername: function() {
47-
return
47+
if (this.type === 'Login') return this.data.username
48+
else if (this.type === 'Email') return this.data.email
49+
else if (this.type === 'BankAccount') return this.data.iban
50+
else if (this.type === 'CreditCard') return this.data.number
51+
else if (this.type === 'Server') return this.data.ip
52+
else return ''
4853
}
4954
}
5055
}

src/renderer/mixins/list.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ export default {
3232
}
3333
},
3434

35+
3536
computed: {
3637
filteredList() {
37-
return this.ItemList.filter(i =>
38-
i.title.toLowerCase().includes(this.searchQuery.toLowerCase())
38+
// return this.ItemList.filter(i =>
39+
// i.title.toLowerCase().includes(this.searchQuery.toLowerCase())
40+
// )
41+
return this.ItemList.filter(item =>
42+
Object.values(item).some(value => (value ? value.toString() : '').includes(this.searchQuery.toLowerCase()))
3943
)
4044
}
4145
}

src/renderer/utils/crypto.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export default class CryptoUtils {
3939
}
4040

4141
static decrypt(transitMessage, password = this.encryptKey) {
42-
const salt = CryptoJS.enc.Hex.parse(transitMessage.substr(0, 32))
4342
const iv = CryptoJS.enc.Hex.parse(transitMessage.substr(32, 32))
4443
const encrypted = transitMessage.substring(64)
4544

src/renderer/views/BankAccounts/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:active="$route.params.id == item.id"
2222
:data="item"
2323
@click="onClickItem(item.id)"
24+
type="BankAccount"
2425
/>
2526
</template>
2627
<!-- Empty State -->

src/renderer/views/BankAccounts/store.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export default {
1818
const { data } = await BankAccountsService.FetchAll(query)
1919

2020
const itemList = JSON.parse(CryptoUtils.aesDecrypt(data.data))
21-
console.log(itemList)
21+
22+
itemList.forEach(element => {
23+
CryptoUtils.decryptFields(element, EncryptedFields)
24+
});
25+
2226
state.ItemList = itemList
2327
},
2428

src/renderer/views/CreditCards/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:active="$route.params.id == item.id"
2222
:data="item"
2323
@click="onClickItem(item.id)"
24+
type="CreditCard"
2425
/>
2526
</template>
2627
<!-- Empty State -->

src/renderer/views/CreditCards/store.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ export default {
1818
const { data } = await CreditCardsService.FetchAll(query)
1919

2020
const itemList = JSON.parse(CryptoUtils.aesDecrypt(data.data))
21+
22+
itemList.forEach(element => {
23+
CryptoUtils.decryptFields(element, EncryptedFields)
24+
});
25+
2126
state.ItemList = itemList
2227
},
2328

src/renderer/views/Emails/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:active="$route.params.id == item.id"
2222
:data="item"
2323
@click="onClickItem(item.id)"
24+
type="Email"
2425
/>
2526
</template>
2627
<!-- Empty State -->

src/renderer/views/Emails/store.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ export default {
1818
const { data } = await EmailsService.FetchAll(query)
1919

2020
const itemList = JSON.parse(CryptoUtils.aesDecrypt(data.data))
21+
22+
itemList.forEach(element => {
23+
CryptoUtils.decryptFields(element, EncryptedFields)
24+
});
25+
2126
state.ItemList = itemList
2227
},
2328

0 commit comments

Comments
 (0)