@@ -24,11 +24,11 @@
|
||||
<div>
|
||||
<Controls :board="board" />
|
||||
<div v-if="board" class="board">
|
||||
<container lock-axix="y" orientation="horizontal" @drop="onDropStack">
|
||||
<draggable v-for="stack in stacksByBoard" :key="stack.id" class="stack">
|
||||
<stack :stack="stack" />
|
||||
</draggable>
|
||||
</container>
|
||||
<Container lock-axix="y" orientation="horizontal" @drop="onDropStack">
|
||||
<Draggable v-for="stack in stacksByBoard" :key="stack.id" class="stack">
|
||||
<Stack :stack="stack" />
|
||||
</Draggable>
|
||||
</Container>
|
||||
</div>
|
||||
<div v-else class="emptycontent">
|
||||
<div class="icon icon-deck" />
|
||||
@@ -51,30 +51,30 @@ export default {
|
||||
Controls,
|
||||
Container,
|
||||
Draggable,
|
||||
Stack
|
||||
Stack,
|
||||
},
|
||||
inject: [
|
||||
'boardApi'
|
||||
'boardApi',
|
||||
],
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
loading: true
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
board: state => state.currentBoard,
|
||||
showArchived: state => state.showArchived
|
||||
showArchived: state => state.showArchived,
|
||||
}),
|
||||
stacksByBoard() {
|
||||
return this.$store.getters.stacksByBoard(this.board.id)
|
||||
}
|
||||
},
|
||||
/* cardsByStack() {
|
||||
return (id) => this.$store.getters.cardsByStack(id)
|
||||
} */
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
id: 'fetchData',
|
||||
showArchived() {
|
||||
this.fetchData()
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
@@ -118,17 +118,17 @@ export default {
|
||||
}
|
||||
}, */
|
||||
createStack() {
|
||||
let newStack = {
|
||||
const newStack = {
|
||||
title: 'FooBar',
|
||||
boardId: this.id,
|
||||
order: this.stacksByBoard().length
|
||||
order: this.stacksByBoard().length,
|
||||
}
|
||||
this.$store.dispatch('createStack', newStack)
|
||||
}
|
||||
},
|
||||
/* deleteStack(stack) {
|
||||
this.$store.dispatch('deleteStack', stack)
|
||||
} */
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,11 +21,10 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<app-sidebar v-if="board != null"
|
||||
<AppSidebar v-if="board != null"
|
||||
:actions="[]"
|
||||
:title="board.title"
|
||||
@close="closeSidebar"
|
||||
>
|
||||
@close="closeSidebar">
|
||||
<AppSidebarTab :order="0" name="Sharing" icon="icon-shared">
|
||||
<SharingTabSidebar :board="board" />
|
||||
</AppSidebarTab>
|
||||
@@ -41,7 +40,7 @@
|
||||
<AppSidebarTab :order="3" name="Timeline" icon="icon-activity">
|
||||
<TimelineTabSidebar :board="board" />
|
||||
</AppSidebarTab>
|
||||
</app-sidebar>
|
||||
</AppSidebar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -61,24 +60,24 @@ export default {
|
||||
SharingTabSidebar,
|
||||
TagsTabSidebar,
|
||||
DeletedTabSidebar,
|
||||
TimelineTabSidebar
|
||||
TimelineTabSidebar,
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
board: state => state.currentBoard,
|
||||
labels: state => state.labels
|
||||
})
|
||||
labels: state => state.labels,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
closeSidebar() {
|
||||
this.$router.push({ name: 'board' })
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
<button
|
||||
:title="t('settings', 'Undo')"
|
||||
class="app-navigation-entry-deleted-button icon-history"
|
||||
@click="stackUndoDelete(deletedStack)"
|
||||
/>
|
||||
@click="stackUndoDelete(deletedStack)" />
|
||||
|
||||
<!-- <span class="live-relative-timestamp" data-timestamp="{{ deletedStack.deletedAt*1000 }}">{{deletedStack.deletedAt | relativeDateFilter }}</span>
|
||||
<a @click="stackUndoDelete(deletedStack)"><span class="icon icon-history"></span></a> -->
|
||||
@@ -24,8 +23,7 @@
|
||||
<button
|
||||
:title="t('settings', 'Undo')"
|
||||
class="app-navigation-entry-deleted-button icon-history"
|
||||
@click="cardUndoDelete(deletedCard)"
|
||||
/>
|
||||
@click="cardUndoDelete(deletedCard)" />
|
||||
</li>
|
||||
|
||||
<!-- <li ng-repeat="deletedCard in cardservice.deleted">
|
||||
@@ -50,21 +48,21 @@ export default {
|
||||
props: {
|
||||
board: {
|
||||
type: Object,
|
||||
default: undefined
|
||||
}
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
copiedDeletedStack: null,
|
||||
copiedDeletedCard: null
|
||||
copiedDeletedCard: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
deletedStacks: state => state.stack.deletedStacks,
|
||||
deletedCards: state => state.stack.deletedCards
|
||||
})
|
||||
deletedCards: state => state.stack.deletedCards,
|
||||
}),
|
||||
|
||||
},
|
||||
created() {
|
||||
@@ -88,8 +86,8 @@ export default {
|
||||
this.copiedDeletedCard.deletedAt = 0
|
||||
this.$store.dispatch('cardUndoDelete', this.copiedDeletedCard)
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<multiselect
|
||||
<Multiselect
|
||||
v-model="addAcl"
|
||||
:options="formatedSharees"
|
||||
:user-select="true"
|
||||
label="displayName"
|
||||
track-by="user"
|
||||
@input="clickAddAcl"
|
||||
@search-change="asyncFind"
|
||||
/>
|
||||
@search-change="asyncFind" />
|
||||
|
||||
<ul
|
||||
id="shareWithList"
|
||||
class="shareWithList"
|
||||
>
|
||||
class="shareWithList">
|
||||
<li>
|
||||
<avatar :user="board.owner.uid" />
|
||||
<Avatar :user="board.owner.uid" />
|
||||
<span class="has-tooltip username">
|
||||
{{ board.owner.displayname }}
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="acl in board.acl" :key="acl.participant.uid">
|
||||
<avatar v-if="acl.type===0" :user="acl.participant.uid" />
|
||||
<Avatar v-if="acl.type===0" :user="acl.participant.uid" />
|
||||
<div v-if="acl.type===1" class="avatardiv icon icon-group" />
|
||||
<div v-if="acl.type===7" class="avatardiv icon icon-circles" />
|
||||
<span class="has-tooltip username">
|
||||
@@ -47,9 +45,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<collection-list v-if="board.id" :id="`${board.id}`" :name="board.title"
|
||||
type="deck"
|
||||
/>
|
||||
<CollectionList v-if="board.id"
|
||||
:id="`${board.id}`"
|
||||
:name="board.title"
|
||||
type="deck" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -70,32 +69,32 @@ export default {
|
||||
ActionButton,
|
||||
ActionCheckbox,
|
||||
Multiselect,
|
||||
CollectionList
|
||||
CollectionList,
|
||||
},
|
||||
props: {
|
||||
board: {
|
||||
type: Object,
|
||||
default: undefined
|
||||
}
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
addAcl: null,
|
||||
addAclForAPI: null
|
||||
addAclForAPI: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
sharees: 'sharees'
|
||||
sharees: 'sharees',
|
||||
}),
|
||||
formatedSharees() {
|
||||
return this.unallocatedSharees.map(item => {
|
||||
|
||||
let sharee = {
|
||||
const sharee = {
|
||||
user: item.label,
|
||||
displayName: item.label,
|
||||
icon: 'icon-user'
|
||||
icon: 'icon-user',
|
||||
}
|
||||
|
||||
if (item.value.shareType === 1) {
|
||||
@@ -113,7 +112,7 @@ export default {
|
||||
},
|
||||
unallocatedSharees() {
|
||||
return this.sharees.filter((sharee) => {
|
||||
let foundIndex = this.board.acl.findIndex((acl) => {
|
||||
const foundIndex = this.board.acl.findIndex((acl) => {
|
||||
return acl.participant.uid === sharee.value.shareWith
|
||||
})
|
||||
if (foundIndex === -1) {
|
||||
@@ -121,7 +120,7 @@ export default {
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
asyncFind(query) {
|
||||
@@ -136,7 +135,7 @@ export default {
|
||||
participant: this.addAcl.value.shareWith,
|
||||
permissionEdit: false,
|
||||
permissionShare: false,
|
||||
permissionManage: false
|
||||
permissionManage: false,
|
||||
}
|
||||
this.$store.dispatch('addAclToCurrentBoard', this.addAclForAPI)
|
||||
},
|
||||
@@ -157,8 +156,8 @@ export default {
|
||||
},
|
||||
clickDeleteAcl(acl) {
|
||||
this.$store.dispatch('deleteAclFromCurrentBoard', acl)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -30,9 +30,10 @@
|
||||
</h3>
|
||||
<form v-else @submit.prevent="finishedEdit(stack)">
|
||||
<input v-model="copiedStack.title" type="text" autofocus>
|
||||
<input v-tooltip="t('deck', 'Add a new stack')" class="icon-confirm" type="submit"
|
||||
value=""
|
||||
>
|
||||
<input v-tooltip="t('deck', 'Add a new stack')"
|
||||
class="icon-confirm"
|
||||
type="submit"
|
||||
value="">
|
||||
</form>
|
||||
</transition>
|
||||
<Actions>
|
||||
@@ -42,23 +43,24 @@
|
||||
</Actions>
|
||||
</div>
|
||||
|
||||
<container :get-child-payload="payloadForCard(stack.id)" group-name="stack" @drop="($event) => onDropCard(stack.id, $event)">
|
||||
<draggable v-for="card in cardsByStack(stack.id)" :key="card.id">
|
||||
<card-item v-if="card" :id="card.id" />
|
||||
</draggable>
|
||||
</container>
|
||||
<Container :get-child-payload="payloadForCard(stack.id)" group-name="stack" @drop="($event) => onDropCard(stack.id, $event)">
|
||||
<Draggable v-for="card in cardsByStack(stack.id)" :key="card.id">
|
||||
<CardItem v-if="card" :id="card.id" />
|
||||
</Draggable>
|
||||
</Container>
|
||||
|
||||
<form class="stack--card-add" @submit.prevent="clickAddCard()">
|
||||
<label for="new-stack-input-main" class="hidden-visually">Add a new card</label>
|
||||
<input id="new-stack-input-main" v-model="newCardTitle" type="text"
|
||||
<input id="new-stack-input-main"
|
||||
v-model="newCardTitle"
|
||||
type="text"
|
||||
class="no-close"
|
||||
placeholder="Add a new card" required
|
||||
>
|
||||
placeholder="Add a new card"
|
||||
required>
|
||||
|
||||
<input class="icon-confirm"
|
||||
type="submit"
|
||||
value=""
|
||||
>
|
||||
value="">
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
@@ -77,26 +79,26 @@ export default {
|
||||
ActionButton,
|
||||
CardItem,
|
||||
Container,
|
||||
Draggable
|
||||
Draggable,
|
||||
},
|
||||
|
||||
props: {
|
||||
stack: {
|
||||
type: Object,
|
||||
default: undefined
|
||||
}
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editing: false,
|
||||
copiedStack: '',
|
||||
newCardTitle: ''
|
||||
newCardTitle: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cardsByStack() {
|
||||
return (id) => this.$store.getters.cardsByStack(id)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -138,15 +140,15 @@ export default {
|
||||
this.editing = false
|
||||
},
|
||||
clickAddCard() {
|
||||
let newCard = {
|
||||
const newCard = {
|
||||
title: this.newCardTitle,
|
||||
stackId: this.stack.id,
|
||||
boardId: this.stack.boardId
|
||||
boardId: this.stack.boardId,
|
||||
}
|
||||
this.$store.dispatch('addCard', newCard)
|
||||
this.newCardTitle = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
<template v-if="editingLabelId === label.id">
|
||||
<form class="label-form" @submit.prevent="updateLabel(label)">
|
||||
<input v-model="editingLabel.title" type="text">
|
||||
<input v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }" :disabled="!editLabelObjValidated" type="submit"
|
||||
value="" class="icon-confirm"
|
||||
>
|
||||
<input v-tooltip="t('deck', 'Cancel')" value=""
|
||||
class="icon-close" @click="editingLabelId = null"
|
||||
>
|
||||
<input v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
|
||||
:disabled="!editLabelObjValidated"
|
||||
type="submit"
|
||||
value=""
|
||||
class="icon-confirm">
|
||||
<input v-tooltip="t('deck', 'Cancel')"
|
||||
value=""
|
||||
class="icon-close"
|
||||
@click="editingLabelId = null">
|
||||
</form>
|
||||
<ColorPicker :value="'#' + editingLabel.color" @input="updateColor" />
|
||||
</template>
|
||||
@@ -27,13 +30,15 @@
|
||||
<template>
|
||||
<form class="label-form" @submit.prevent="clickAddLabel">
|
||||
<input v-model="addLabelObj.title" type="text">
|
||||
<input v-tooltip="{content: missingDataLabel, show: !addLabelObjValidated, trigger: 'manual' }" :disabled="!addLabelObjValidated"
|
||||
<input v-tooltip="{content: missingDataLabel, show: !addLabelObjValidated, trigger: 'manual' }"
|
||||
:disabled="!addLabelObjValidated"
|
||||
type="submit"
|
||||
value="" class="icon-confirm"
|
||||
>
|
||||
<input v-tooltip="t('deck', 'Cancel')" value=""
|
||||
class="icon-close" @click="addLabel=false"
|
||||
>
|
||||
value=""
|
||||
class="icon-confirm">
|
||||
<input v-tooltip="t('deck', 'Cancel')"
|
||||
value=""
|
||||
class="icon-close"
|
||||
@click="addLabel=false">
|
||||
</form>
|
||||
<ColorPicker :value="'#' + addLabelObj.color" @input="updateColor" />
|
||||
</template>
|
||||
@@ -54,7 +59,7 @@ import ColorPicker from '../ColorPicker'
|
||||
export default {
|
||||
name: 'TagsTabSidebar',
|
||||
components: {
|
||||
ColorPicker
|
||||
ColorPicker,
|
||||
},
|
||||
mixins: [Color],
|
||||
data() {
|
||||
@@ -64,12 +69,12 @@ export default {
|
||||
addLabelObj: null,
|
||||
addLabel: false,
|
||||
missingDataLabel: t('deck', 'title and color value must be provided'),
|
||||
defaultColors: ['#31CC7C', '#317CCC', '#FF7A66', '#F1DB50', '#7C31CC', '#CC317C', '#3A3B3D', '#CACBCD']
|
||||
defaultColors: ['#31CC7C', '#317CCC', '#FF7A66', '#F1DB50', '#7C31CC', '#CC317C', '#3A3B3D', '#CACBCD'],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
labels: 'currentBoardLabels'
|
||||
labels: 'currentBoardLabels',
|
||||
}),
|
||||
addLabelObjValidated() {
|
||||
if (this.addLabelObj.title === '') {
|
||||
@@ -92,7 +97,7 @@ export default {
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -122,8 +127,8 @@ export default {
|
||||
this.$store.dispatch('addLabelToCurrentBoard', this.addLabelObj)
|
||||
this.addLabel = false
|
||||
this.addLabelObj = null
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<div>
|
||||
<div v-if="isLoading" class="icon icon-loading" />
|
||||
|
||||
<ActivityEntry v-for="entry in boardActivity" v-else :key="entry.activity_id"
|
||||
:activity="entry"
|
||||
/>
|
||||
<ActivityEntry v-for="entry in boardActivity"
|
||||
v-else
|
||||
:key="entry.activity_id"
|
||||
:activity="entry" />
|
||||
<button v-if="activityLoadMore" @click="loadMore">
|
||||
Load More
|
||||
</button>
|
||||
@@ -18,13 +19,13 @@ import ActivityEntry from '../ActivityEntry'
|
||||
export default {
|
||||
name: 'TimelineTabSidebar',
|
||||
components: {
|
||||
ActivityEntry
|
||||
ActivityEntry,
|
||||
},
|
||||
props: {
|
||||
board: {
|
||||
type: Object,
|
||||
default: undefined
|
||||
}
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -32,15 +33,15 @@ export default {
|
||||
params: {
|
||||
type: 'deck',
|
||||
since: 0,
|
||||
object_id: this.board.id
|
||||
}
|
||||
object_id: this.board.id,
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
boardActivity: 'activity',
|
||||
activityLoadMore: 'activityLoadMore'
|
||||
})
|
||||
activityLoadMore: 'activityLoadMore',
|
||||
}),
|
||||
},
|
||||
created() {
|
||||
this.loadBoardActivity()
|
||||
@@ -53,12 +54,12 @@ export default {
|
||||
})
|
||||
},
|
||||
loadMore() {
|
||||
let array = Object.values(this.boardActivity)
|
||||
let aId = (array[array.length - 1].activity_id)
|
||||
const array = Object.values(this.boardActivity)
|
||||
const aId = (array[array.length - 1].activity_id)
|
||||
|
||||
this.params.since = aId
|
||||
this.loadBoardActivity()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user