Quellcode durchsuchen

simplify password profile list

pull/342/head
Guillaume Vincent vor 7 Jahren
Ursprung
Commit
8adb23fb3f
2 geänderte Dateien mit 4 neuen und 31 gelöschten Zeilen
  1. +0
    -9
      src/components/Avatar.vue
  2. +4
    -22
      src/components/PasswordProfile.vue

+ 0
- 9
src/components/Avatar.vue Datei anzeigen

@@ -13,12 +13,7 @@
</style>
<template>
<div v-bind:style="avatarStyle" class="passwordProfile__avatar">
<span v-if="selected">
<i class="fa fa-check"></i>
</span>
<span v-else>
{{firstLetter}}
</span>
</div>
</template>
<script type="text/ecmascript-6">
@@ -28,10 +23,6 @@
name: {
type: String,
required: true
},
selected: {
type: Boolean,
default: false
}
},
data(){


+ 4
- 22
src/components/PasswordProfile.vue Datei anzeigen

@@ -17,7 +17,7 @@
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: auto;
flex-grow: 2;
}

.passwordProfile__actions {
@@ -25,11 +25,9 @@
}
</style>
<template>
<div class="passwordProfile" v-on:click="selectPassword">
<avatar v-bind:name="password.site"
v-bind:selected="selected"
class="passwordProfile__avatar"></avatar>
<div class="passwordProfile__meta">
<div class="passwordProfile">
<avatar v-bind:name="password.site"></avatar>
<div class="passwordProfile__meta" v-on:click="setPassword">
<div class="passwordProfile__site">
{{password.site}}
</div>
@@ -38,18 +36,10 @@
</div>
</div>
<div class="passwordProfile__actions">
<span class="passwordProfile__version text-muted" v-if="password.version === 1 && !selected">
v{{password.version}}
</span>
<button type="button" class="btn btn-outline-danger btn-sm"
v-if="selected"
v-on:click="deletePassword()">
<i class="fa fa-trash fa-fw"></i>
</button>
<button type="button" class="btn btn-outline-primary btn-sm"
v-on:click="setPassword()">
<i class="fa fa-eye fa-fw"></i>
</button>
</div>
</div>
</template>
@@ -68,15 +58,7 @@
components: {
Avatar
},
data(){
return {
selected: false
}
},
methods: {
selectPassword(){
this.selected = !this.selected;
},
deletePassword(){
var r = confirm(this.$t('DeleteProfileConfirm', 'Are you sure you want to delete this password profile?'));
if (r === true) {


Laden…
Abbrechen
Speichern