|
@@ -1,6 +1,6 @@ |
|
|
<style> |
|
|
<style> |
|
|
#passwords__list { |
|
|
#passwords__list { |
|
|
min-height: 216px; |
|
|
|
|
|
|
|
|
min-height: 11rem; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#passwords__pagination .pagination { |
|
|
#passwords__pagination .pagination { |
|
@@ -10,10 +10,6 @@ |
|
|
#passwords__pagination .page-link { |
|
|
#passwords__pagination .page-link { |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.passwords__profile:last-child .passwordProfile{ |
|
|
|
|
|
border-bottom: none; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
</style> |
|
|
<template> |
|
|
<template> |
|
|
<div id="passwords"> |
|
|
<div id="passwords"> |
|
@@ -45,7 +41,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<password-profile |
|
|
<password-profile |
|
|
class="passwords__profile" |
|
|
|
|
|
v-bind:password="password" |
|
|
v-bind:password="password" |
|
|
v-on:deleted="pagination.currentPage=1" |
|
|
v-on:deleted="pagination.currentPage=1" |
|
|
v-for="password in filteredPasswords" |
|
|
v-for="password in filteredPasswords" |
|
@@ -77,7 +72,7 @@ |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'passwords-view', |
|
|
name: 'passwords-view', |
|
|
data(){ |
|
|
|
|
|
|
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
searchQuery: '', |
|
|
searchQuery: '', |
|
|
pagination: { |
|
|
pagination: { |
|
@@ -93,7 +88,7 @@ |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['passwords']), |
|
|
...mapState(['passwords']), |
|
|
filteredPasswords(){ |
|
|
|
|
|
|
|
|
filteredPasswords() { |
|
|
const passwords = this.passwords.filter(password => { |
|
|
const passwords = this.passwords.filter(password => { |
|
|
var loginMatch = password.login.match(new RegExp(this.searchQuery, 'i')); |
|
|
var loginMatch = password.login.match(new RegExp(this.searchQuery, 'i')); |
|
|
var siteMatch = password.site.match(new RegExp(this.searchQuery, 'i')); |
|
|
var siteMatch = password.site.match(new RegExp(this.searchQuery, 'i')); |
|
@@ -107,7 +102,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
setCurrentPage(page){ |
|
|
|
|
|
|
|
|
setCurrentPage(page) { |
|
|
this.pagination.currentPage = page; |
|
|
this.pagination.currentPage = page; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|