226226
227227 <NcActions :aria-label =" t('deck', 'View Modes')"
228228 :name =" t('deck', 'Toggle View Modes')" >
229+ <NcActionButton :model-value =" viewMode === 'kanban'"
230+ @click =" setViewMode('kanban')" >
231+ <template #icon >
232+ <ViewColumnIcon :size =" 20" decorative />
233+ </template >
234+ {{ t('deck', 'Kanban view') }}
235+ </NcActionButton >
236+ <NcActionButton :model-value =" viewMode === 'gantt'"
237+ @click =" setViewMode('gantt')" >
238+ <template #icon >
239+ <ChartGanttIcon :size =" 20" decorative />
240+ </template >
241+ {{ t('deck', 'Gantt view') }}
242+ </NcActionButton >
243+ <NcActionSeparator />
229244 <NcActionButton @click =" toggleShowArchived" >
230245 <template #icon >
231246 <ArchiveIcon :size =" 20" decorative />
264279<script >
265280import { mapState , mapGetters } from ' vuex'
266281import { subscribe , unsubscribe } from ' @nextcloud/event-bus'
267- import { NcActions , NcActionButton , NcAvatar , NcButton , NcPopover , NcModal } from ' @nextcloud/vue'
282+ import { NcActions , NcActionButton , NcActionSeparator , NcAvatar , NcButton , NcPopover , NcModal } from ' @nextcloud/vue'
268283import labelStyle from ' ../mixins/labelStyle.js'
269284import ArchiveIcon from ' vue-material-design-icons/ArchiveOutline.vue'
270285import ImageIcon from ' vue-material-design-icons/ImageMultipleOutline.vue'
@@ -273,6 +288,8 @@ import FilterOffIcon from 'vue-material-design-icons/FilterOffOutline.vue'
273288import TableColumnPlusAfter from ' vue-material-design-icons/TableColumnPlusAfter.vue'
274289import ArrowCollapseVerticalIcon from ' vue-material-design-icons/ArrowCollapseVertical.vue'
275290import ArrowExpandVerticalIcon from ' vue-material-design-icons/ArrowExpandVertical.vue'
291+ import ViewColumnIcon from ' vue-material-design-icons/ViewColumn.vue'
292+ import ChartGanttIcon from ' vue-material-design-icons/ChartGantt.vue'
276293import SessionList from ' ./SessionList.vue'
277294import { isNotifyPushEnabled } from ' ../sessions.js'
278295import CreateNewCardCustomPicker from ' ../views/CreateNewCardCustomPicker.vue'
@@ -294,6 +311,9 @@ export default {
294311 FilterOffIcon,
295312 ArrowCollapseVerticalIcon,
296313 ArrowExpandVerticalIcon,
314+ ViewColumnIcon,
315+ ChartGanttIcon,
316+ NcActionSeparator,
297317 TableColumnPlusAfter,
298318 SessionList,
299319 },
@@ -327,6 +347,7 @@ export default {
327347 ... mapGetters ([
328348 ' canEdit' ,
329349 ' canManage' ,
350+ ' viewMode' ,
330351 ]),
331352 ... mapState ({
332353 isFullApp : state => state .isFullApp ,
@@ -406,6 +427,9 @@ export default {
406427 toggleShowCardCover () {
407428 this .$store .dispatch (' toggleShowCardCover' )
408429 },
430+ setViewMode (mode ) {
431+ this .$store .dispatch (' setViewMode' , mode)
432+ },
409433 toggleShowArchived () {
410434 this .$store .dispatch (' toggleShowArchived' )
411435 },
0 commit comments