nice dashboard add card button
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<DashboardWidget :items="cards"
|
||||
empty-content-icon="icon-deck"
|
||||
:empty-content-message="t('deck', 'No upcoming cards')"
|
||||
@@ -47,6 +48,13 @@
|
||||
</a>
|
||||
</template>
|
||||
</DashboardWidget>
|
||||
<div class="center-button">
|
||||
<button @click="toggleAddCardModel" @close="toggleAddCardModel">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</button>
|
||||
<CardCreateDialog v-if="showAddCardModal" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -55,17 +63,20 @@ import { mapGetters } from 'vuex'
|
||||
import labelStyle from './../mixins/labelStyle'
|
||||
import DueDate from '../components/cards/badges/DueDate'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import CardCreateDialog from '../CardCreateDialog'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
DueDate,
|
||||
DashboardWidget,
|
||||
CardCreateDialog,
|
||||
},
|
||||
mixins: [labelStyle],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showAddCardModal: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -98,6 +109,11 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toggleAddCardModel() {
|
||||
this.showAddCardModal = !this.showAddCardModal
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -145,4 +161,8 @@ export default {
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.center-button {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user