Przeglądaj źródła

Use rem instead of px to control password profile height

pull/342/head
Guillaume Vincent 7 lat temu
rodzic
commit
2f3e6d385a
3 zmienionych plików z 10 dodań i 15 usunięć
  1. +3
    -3
      src/components/Avatar.vue
  2. +3
    -3
      src/components/PasswordProfile.vue
  3. +4
    -9
      src/views/Passwords.vue

+ 3
- 3
src/components/Avatar.vue Wyświetl plik

@@ -1,10 +1,10 @@
<style>
.passwordProfile__avatar {
display: inline-block;
width: 38px;
height: 38px;
width: 2rem;
height: 2rem;
text-align: center;
line-height: 38px;
line-height: 2rem;
margin-right: 1em;
text-transform: uppercase;
color: white;


+ 3
- 3
src/components/PasswordProfile.vue Wyświetl plik

@@ -2,7 +2,7 @@
.passwordProfile {
display: flex;
cursor: pointer;
margin-bottom: 1em;
margin-bottom: 1rem;
justify-content: space-between;
align-items: center;
}
@@ -14,8 +14,8 @@
}

.passwordProfile__meta {
font-size: 0.8em;
line-height: 1.2em;
font-size: 0.8rem;
line-height: 1rem;
flex-grow: 1;
}



+ 4
- 9
src/views/Passwords.vue Wyświetl plik

@@ -1,6 +1,6 @@
<style>
#passwords__list {
min-height: 216px;
min-height: 11rem;
}

#passwords__pagination .pagination {
@@ -10,10 +10,6 @@
#passwords__pagination .page-link {
cursor: pointer;
}

.passwords__profile:last-child .passwordProfile{
border-bottom: none;
}
</style>
<template>
<div id="passwords">
@@ -45,7 +41,6 @@
</div>
</div>
<password-profile
class="passwords__profile"
v-bind:password="password"
v-on:deleted="pagination.currentPage=1"
v-for="password in filteredPasswords"
@@ -77,7 +72,7 @@

export default {
name: 'passwords-view',
data(){
data() {
return {
searchQuery: '',
pagination: {
@@ -93,7 +88,7 @@
},
computed: {
...mapState(['passwords']),
filteredPasswords(){
filteredPasswords() {
const passwords = this.passwords.filter(password => {
var loginMatch = password.login.match(new RegExp(this.searchQuery, 'i'));
var siteMatch = password.site.match(new RegExp(this.searchQuery, 'i'));
@@ -107,7 +102,7 @@
}
},
methods: {
setCurrentPage(page){
setCurrentPage(page) {
this.pagination.currentPage = page;
}
}


Ładowanie…
Anuluj
Zapisz