Skip to content

Commit

Permalink
Merge pull request #2437 from nextcloud/bugfix/2356
Browse files Browse the repository at this point in the history
Only remove card padding for editable cards
  • Loading branch information
juliushaertl authored Oct 13, 2020
2 parents 919f7d8 + 9731b43 commit d559482
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/components/cards/AvatarList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,19 @@ export default {
}
}
$avatar-offset: 12px;
.avatar-list {
float: right;
display: inline-flex;
padding-right: 8px;
padding-right: $avatar-offset;
flex-direction: row-reverse;
.avatardiv,
/deep/ .avatardiv {
width: 36px;
height: 36px;
box-sizing: content-box !important;
margin-right: -12px;
margin-right: -$avatar-offset;
transition: margin-right 0.2s ease-in-out;
&.icon-more {
Expand Down
4 changes: 0 additions & 4 deletions src/components/cards/CardBadges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default {
}
}
.card:not(.card__editable) .avatars {
margin-right: 10px;
}
.fade-enter-active, .fade-leave-active {
transition: opacity .125s;
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default {
]),
canEdit() {
if (this.currentBoard) {
return this.$store.getters.canEdit
return !this.currentBoard.archived && this.$store.getters.canEdit
}
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
return board ? board.permissions.PERMISSION_EDIT : false
return board ? !board.archived && board.permissions.PERMISSION_EDIT : false
},
card() {
return this.item ? this.item : this.$store.getters.cardById(this.id)
Expand Down Expand Up @@ -212,11 +212,16 @@ export default {
.card-controls {
display: flex;
margin-left: $card-padding;
margin-right: $card-padding;
& > div {
display: flex;
max-height: 44px;
}
}
&.card__editable .card-controls {
margin-right: 0;
}
}
.duedate {
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards/CardMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
return this.$store.getters.canEdit
}
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
return board.permissions.PERMISSION_EDIT
return !!board?.permissions?.PERMISSION_EDIT
},
isBoardAndStackChoosen() {
if (this.selectedBoard === '' || this.selectedStack === '') {
Expand Down

0 comments on commit d559482

Please sign in to comment.