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