Merge pull request #1651 from nextcloud/enh/showIfControlIsActive
show if filter or archiv view is set
This commit is contained in:
@@ -49,13 +49,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="board-action-buttons">
|
<div class="board-action-buttons">
|
||||||
<Popover>
|
<Popover>
|
||||||
<Actions slot="trigger">
|
<Actions slot="trigger" :style="filterOpacity">
|
||||||
<ActionButton icon="icon-filter" :title="t('deck', 'Apply filter')" />
|
<ActionButton icon="icon-filter" :title="t('deck', 'Apply filter')" />
|
||||||
</Actions>
|
</Actions>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<h3>{{ t('deck', 'Filter by tag') }}</h3>
|
<h3>{{ t('deck', 'Filter by tag') }}</h3>
|
||||||
|
{{ filter }}
|
||||||
<div v-for="label in board.labels" :key="label.id" class="filter--item">
|
<div v-for="label in board.labels" :key="label.id" class="filter--item">
|
||||||
<input
|
<input
|
||||||
:id="label.id"
|
:id="label.id"
|
||||||
@@ -144,7 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
<Actions style="opacity: .5;">
|
<Actions :style="archivedOpacity">
|
||||||
<ActionButton v-if="showArchived"
|
<ActionButton v-if="showArchived"
|
||||||
icon="icon-archive"
|
icon="icon-archive"
|
||||||
:title="t('deck', 'Show archived cards')"
|
:title="t('deck', 'Show archived cards')"
|
||||||
@@ -214,6 +215,18 @@ export default {
|
|||||||
name: 'board.details',
|
name: 'board.details',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
archivedOpacity() {
|
||||||
|
if (this.showArchived) {
|
||||||
|
return 'opacity: 1;'
|
||||||
|
}
|
||||||
|
return 'opacity: .5;'
|
||||||
|
},
|
||||||
|
filterOpacity() {
|
||||||
|
if (this.filter.tags.length !== 0 || this.filter.users.length !== 0 || this.filter.due !== '') {
|
||||||
|
return 'opacity: 1;'
|
||||||
|
}
|
||||||
|
return 'opacity: .5;'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeSetFilter(e) {
|
beforeSetFilter(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user