first step

Signed-off-by: Jakob <jakob.roehrl@web.de>

1. try

Signed-off-by: Jakob <jakob.roehrl@web.de>

remote calls are working

Signed-off-by: Jakob <jakob.roehrl@web.de>

litte changes

Signed-off-by: Jakob <jakob.roehrl@web.de>

small fixes

Signed-off-by: Jakob <jakob.roehrl@web.de>

incremental fetching

Signed-off-by: Jakob <jakob.roehrl@web.de>

integrated tiptap suggestions for test

Signed-off-by: Jakob <jakob.roehrl@web.de>

Update package-lock after rebase

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Fix various errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Cleanup mention plugin use

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Downgrade tippy

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Jakob
2019-09-10 12:31:25 +02:00
committed by Julius Härtl
parent 3adadc23d0
commit 739a92e9a3
9 changed files with 1094 additions and 71 deletions

View File

@@ -0,0 +1,81 @@
<template>
<li>
<form v-if="edit" @submit.prevent="updateComment">
<input v-model="commentMsg" type="text" autofocus
required>
<input v-tooltip="t('deck', 'Save')" class="icon-confirm" type="submit"
value="">
<input type="submit" value="" class="icon-close"
@click.stop.prevent="hideUpdateForm">
</form>
<template v-else>
{{ comment.uId }}: {{ comment.message }}
<Actions @click.stop.prevent>
<ActionButton icon="icon-rename" @click="showUpdateForm()">{{ t('deck', 'Update') }}</ActionButton>
<ActionButton icon="icon-delete" @click="deleteComment(comment.id)">{{ t('deck', 'Delete') }}</ActionButton>
</Actions>
</template>
</li>
</template>
<script>
import { Avatar } from 'nextcloud-vue'
import { Actions } from 'nextcloud-vue/dist/Components/Actions'
import { ActionButton } from 'nextcloud-vue/dist/Components/ActionButton'
export default {
name: 'CommentItem',
components: {
Avatar,
Actions,
ActionButton
},
props: {
comment: {
type: Object,
default: undefined
}
},
data() {
return {
edit: false,
commentMsg: ''
}
},
methods: {
showUpdateForm() {
this.commentMsg = this.comment.message
this.edit = true
},
hideUpdateForm() {
this.commentMsg = ''
this.edit = false
},
updateComment() {
let data = {
comment: this.commentMsg,
cardId: this.comment.cardId,
commentId: this.comment.id
}
this.$store.dispatch('updateComment', data)
this.hideUpdateForm()
},
deleteComment(commentId) {
let data = {
commentId: commentId,
cardId: this.comment.cardId
}
this.$store.dispatch('deleteComment', data)
}
}
}
</script>
<style lang="scss">
form {
display: flex
}
</style>