Add add board functionality

This commit is contained in:
Michael Weimann
2018-12-16 22:47:58 +01:00
parent 6a3643384c
commit 22744ee39c
3 changed files with 42 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
import { AppNavigation } from 'nextcloud-vue'
import { translate as t } from 'nextcloud-server/dist/l10n'
import { boardToMenuItem } from './../helpers/boardToMenuItem'
import store from './../store/main'
const defaultCategories = [
{
@@ -66,7 +67,13 @@ const addButton = {
text: t('deck', 'Create new board'),
edit: {
text: t('deck', 'new board'),
action: () => {
action: (submitEvent) => {
const title = submitEvent.currentTarget.childNodes[0].value
store.dispatch('createBoard', {
title: title,
color: '#000000'
})
addButton.classes = []
},
reset: () => {
}