3434 orientation =" horizontal"
3535 :drag-handle-selector =" dragHandleSelector"
3636 @drop =" onDropStack" >
37+ <EmptyContent v-if =" stacksByBoard.length === 0" icon =" icon-comment" >
38+ No comments
39+ <template #desc >
40+ <form @submit.prevent =" addNewStack()" >
41+ <h4 for =" new-stack-input-main" >
42+ {{ t('deck', 'Add new list') }}
43+ </h4 >
44+ <input id =" new-stack-input-main"
45+ v-model =" newStackTitle"
46+ v-focus
47+ type =" text"
48+ class =" no-close"
49+ :placeholder =" t('deck', 'List name')"
50+ required >
51+ <input v-tooltip =" t('deck', 'Add new list')"
52+ class =" icon-confirm"
53+ type =" submit"
54+ value =" " >
55+ </form >
56+ </template >
57+ </EmptyContent >
3758 <Draggable v-for =" stack in stacksByBoard" :key =" stack.id" >
3859 <Stack :stack =" stack" />
3960 </Draggable >
@@ -54,6 +75,7 @@ import { Container, Draggable } from 'vue-smooth-dnd'
5475import { mapState , mapGetters } from ' vuex'
5576import Controls from ' ../Controls'
5677import Stack from ' ./Stack'
78+ import { EmptyContent } from ' @nextcloud/vue'
5779
5880export default {
5981 name: ' Board' ,
@@ -62,6 +84,7 @@ export default {
6284 Container,
6385 Draggable,
6486 Stack,
87+ EmptyContent,
6588 },
6689 inject: [
6790 ' boardApi' ,
@@ -75,6 +98,7 @@ export default {
7598 data : function () {
7699 return {
77100 loading: true ,
101+ newStackTitle: ' ' ,
78102 }
79103 },
80104 computed: {
@@ -117,11 +141,10 @@ export default {
117141 this .$store .dispatch (' orderStack' , { stack: this .stacksByBoard [removedIndex], removedIndex, addedIndex })
118142 },
119143
120- createStack () {
144+ addNewStack () {
121145 const newStack = {
122- title: ' FooBar ' ,
146+ title: this . newStackTitle ,
123147 boardId: this .id ,
124- order: this .stacksByBoard ().length ,
125148 }
126149 this .$store .dispatch (' createStack' , newStack)
127150 },
0 commit comments