Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable1.1] Only remove card padding for editable cards #2439

Merged
merged 1 commit into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -106,7 +106,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