Hide UI elements that are not used when archived
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="board" class="board-actions">
|
||||
<div v-if="canManage && !showArchived"
|
||||
<div v-if="canManage && !showArchived && !board.archived"
|
||||
id="stack-add"
|
||||
v-click-outside="hideAddStack">
|
||||
<Actions v-if="!isAddStackVisible" :title="t('deck', 'Add new list')">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="stack">
|
||||
<div v-click-outside="stopCardCreation" class="stack--header">
|
||||
<transition name="fade" mode="out-in">
|
||||
<h3 v-if="!canManage">
|
||||
<h3 v-if="!canManage || isArchived">
|
||||
{{ stack.title }}
|
||||
</h3>
|
||||
<h3 v-else-if="!editing"
|
||||
@@ -42,12 +42,12 @@
|
||||
value="">
|
||||
</form>
|
||||
</transition>
|
||||
<Actions v-if="canManage" :force-menu="true">
|
||||
<Actions v-if="canManage && !isArchived" :force-menu="true">
|
||||
<ActionButton icon="icon-delete" @click="deleteStack(stack)">
|
||||
{{ t('deck', 'Delete list') }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
<Actions v-if="canEdit && !showArchived">
|
||||
<Actions v-if="canEdit && !showArchived && !isArchived">
|
||||
<ActionButton icon="icon-add" @click.stop="showAddCard=true">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</ActionButton>
|
||||
@@ -133,6 +133,7 @@ export default {
|
||||
...mapGetters([
|
||||
'canManage',
|
||||
'canEdit',
|
||||
'isArchived',
|
||||
]),
|
||||
...mapState({
|
||||
showArchived: state => state.showArchived,
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
<div :style="{ backgroundColor: `#${label.color}`, color:textColor(label.color) }" class="label-title">
|
||||
<span>{{ label.title }}</span>
|
||||
</div>
|
||||
<button v-if="canManage"
|
||||
<button v-if="canManage && !isArchived"
|
||||
v-tooltip="t('deck', 'Edit')"
|
||||
class="icon-rename"
|
||||
@click="clickEdit(label)" />
|
||||
<button v-if="canManage"
|
||||
<button v-if="canManage && !isArchived"
|
||||
v-tooltip="t('deck', 'Delete')"
|
||||
class="icon-delete"
|
||||
@click="deleteLabel(label.id)" />
|
||||
@@ -55,7 +55,7 @@
|
||||
</form>
|
||||
</template>
|
||||
</li>
|
||||
<button v-if="canManage" @click="clickShowAddLabel()">
|
||||
<button v-if="canManage && !isArchived" @click="clickShowAddLabel()">
|
||||
<span class="icon-add" />{{ t('deck', 'Add a new tag') }}
|
||||
</button>
|
||||
</ul>
|
||||
@@ -88,6 +88,7 @@ export default {
|
||||
...mapGetters({
|
||||
labels: 'currentBoardLabels',
|
||||
canManage: 'canManage',
|
||||
isArchived: 'isArchived',
|
||||
}),
|
||||
addLabelObjValidated() {
|
||||
if (this.addLabelObj.title === '') {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
class="card"
|
||||
@click="openCard">
|
||||
<div class="card-upper">
|
||||
<h3 v-if="showArchived || !canEdit">
|
||||
<h3 v-if="isArchived || showArchived || !canEdit">
|
||||
{{ card.title }}
|
||||
</h3>
|
||||
<h3 v-else-if="!editing">
|
||||
@@ -109,6 +109,7 @@ export default {
|
||||
}),
|
||||
...mapGetters([
|
||||
'canEdit',
|
||||
'isArchived',
|
||||
]),
|
||||
card() {
|
||||
return this.$store.getters.cardById(this.id)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div @click.stop.prevent>
|
||||
<Actions v-if="canEdit">
|
||||
<Actions v-if="canEdit && !isArchived">
|
||||
<ActionButton v-if="showArchived === false" icon="icon-user" @click="assignCardToMe()">
|
||||
{{ t('deck', 'Assign to me') }}
|
||||
</ActionButton>
|
||||
@@ -93,6 +93,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'canEdit',
|
||||
'isArchived',
|
||||
]),
|
||||
...mapState({
|
||||
showArchived: state => state.showArchived,
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
style="opacity: 0.5" />
|
||||
|
||||
<template v-if="!deleted" slot="actions">
|
||||
<ActionButton v-if="canManage"
|
||||
<ActionButton v-if="canManage && !board.archived"
|
||||
icon="icon-rename"
|
||||
:close-after-click="true"
|
||||
@click="actionEdit">
|
||||
{{ t('deck', 'Edit board') }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canManage"
|
||||
<ActionButton v-if="canManage && !board.archived"
|
||||
icon="icon-clone"
|
||||
:close-after-click="true"
|
||||
@click="actionClone">
|
||||
|
||||
@@ -122,6 +122,9 @@ export default new Vuex.Store({
|
||||
canShare: state => {
|
||||
return state.currentBoard ? state.currentBoard.permissions.PERMISSION_SHARE : false
|
||||
},
|
||||
isArchived: state => {
|
||||
return state.currentBoard && state.currentBoard.archived
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
setSearchQuery(state, searchQuery) {
|
||||
|
||||
Reference in New Issue
Block a user