state.showArchived,
}),
cardsByStack() {
+ if (this.lane && this.lane.id !== undefined) {
+ return this.$store.getters.cardsByStackAndLane(this.stack.id, this.lane.type, this.lane.id).filter((card) => {
+ if (this.showArchived) {
+ return card.archived
+ }
+ return !card.archived
+ })
+ }
return this.$store.getters.cardsByStack(this.stack.id).filter((card) => {
if (this.showArchived) {
return card.archived
@@ -250,6 +280,8 @@ export default {
},
methods: {
+ ...mapActions(useTrashbinStore, ['stackUndoDelete']),
+ ...mapActions(useStackStore, ['setDoneStack', 'deleteStack', 'updateStack']),
stopCardCreation(e) {
// For some reason the submit event triggers a MouseEvent that is bubbling to the outside
// so we have to ignore it
@@ -284,15 +316,15 @@ export default {
}
},
toggleDoneColumn() {
- this.$store.dispatch('setDoneStack', {
+ this.setDoneStack({
stackId: this.stack.id,
boardId: this.stack.boardId,
isDone: !this.isDoneColumn,
})
},
- deleteStack(stack) {
- this.$store.dispatch('deleteStack', stack)
- showUndo(t('deck', 'List deleted'), () => this.$store.dispatch('stackUndoDelete', stack))
+ deleteStackShowUndo(stack) {
+ this.deleteStack(stack)
+ showUndo(t('deck', 'List deleted'), () => this.stackUndoDelete(stack))
},
setArchivedToAllCardsFromStack(stack, isArchived) {
@@ -313,7 +345,7 @@ export default {
},
finishedEdit(stack) {
if (this.copiedStack.title !== stack.title) {
- this.$store.dispatch('updateStack', this.copiedStack)
+ this.updateStack(this.copiedStack)
}
this.editing = false
},
@@ -475,6 +507,18 @@ export default {
}
}
+ .stack__card-count {
+ flex-shrink: 0;
+ margin-inline-start: 6px;
+ padding: 0 8px;
+ border-radius: var(--border-radius-pill, 16px);
+ background-color: var(--color-background-darker);
+ color: var(--color-text-maxcontrast);
+ font-size: var(--default-font-size);
+ font-weight: normal;
+ line-height: 1.5;
+ }
+
form {
input {
font-weight: bold;
diff --git a/src/components/board/Swimlane.vue b/src/components/board/Swimlane.vue
new file mode 100644
index 0000000000..84e91b5672
--- /dev/null
+++ b/src/components/board/Swimlane.vue
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/board/SwimlaneHeader.vue b/src/components/board/SwimlaneHeader.vue
new file mode 100644
index 0000000000..5859f505a1
--- /dev/null
+++ b/src/components/board/SwimlaneHeader.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/card/AssignmentSelector.vue b/src/components/card/AssignmentSelector.vue
index 6ff2b8ba85..9c53eddfe3 100644
--- a/src/components/card/AssignmentSelector.vue
+++ b/src/components/card/AssignmentSelector.vue
@@ -19,19 +19,9 @@
label="displayname"
track-by="multiselectKey"
@option:selected="onSelect"
- @option:deselected="onRemove">
-
-
-
-
-
-
+ @option:deselected="onRemove" />
-
import { defineComponent } from 'vue'
-import { NcAvatar, NcSelect } from '@nextcloud/vue'
+import { NcSelect, NcUserBubble } from '@nextcloud/vue'
import AccountMultiple from 'vue-material-design-icons/AccountMultipleOutline.vue'
export default defineComponent({
@@ -51,7 +41,7 @@ export default defineComponent({
components: {
AccountMultiple,
NcSelect,
- NcAvatar,
+ NcUserBubble,
},
props: {
card: {
@@ -116,6 +106,7 @@ export default defineComponent({
...item.participant,
isNoUser: item.participant.type !== 0,
multiselectKey: item.participant.type + ':' + item.participant.primaryKey,
+ user: item.participant.uid,
}))
} else {
this.assignedUsers = []
diff --git a/src/components/card/AttachmentList.vue b/src/components/card/AttachmentList.vue
index 9e469fca4b..e10811b4e2 100644
--- a/src/components/card/AttachmentList.vue
+++ b/src/components/card/AttachmentList.vue
@@ -94,10 +94,12 @@ import relativeDate from '../../mixins/relativeDate.js'
import { formatFileSize } from '@nextcloud/files'
import { getCurrentUser } from '@nextcloud/auth'
import { generateUrl, generateOcsUrl, generateRemoteUrl } from '@nextcloud/router'
-import { mapState, mapActions } from 'vuex'
+import { mapState as mapStateVuex } from 'vuex'
+import { mapState, mapActions } from 'pinia'
import { loadState } from '@nextcloud/initial-state'
import attachmentUpload from '../../mixins/attachmentUpload.js'
import { getFilePickerBuilder } from '@nextcloud/dialogs'
+import { useAttachmentStore } from '../../stores/attachment.js'
const maxUploadSizeState = loadState('deck', 'maxUploadSize', -1)
const picker = getFilePickerBuilder(t('deck', 'File to share'))
@@ -147,7 +149,7 @@ export default {
},
attachments() {
// FIXME sort propertly by last modified / deleted at
- return [...this.$store.getters.attachmentsByCard(this.cardId)].filter(attachment => attachment.deletedAt >= 0).sort((a, b) => b.id - a.id)
+ return [...this.attachmentsByCard(this.cardId)].filter(attachment => attachment.deletedAt >= 0).sort((a, b) => b.id - a.id)
},
mimetypeForAttachment() {
return (attachment) => {
@@ -176,9 +178,12 @@ export default {
formattedFileSize() {
return (filesize) => formatFileSize(filesize)
},
- ...mapState({
+ ...mapStateVuex({
currentBoard: state => state.currentBoard,
}),
+ ...mapState(useAttachmentStore, [
+ 'attachmentsByCard',
+ ]),
isReadOnly() {
return !this.$store.getters.canEdit
},
@@ -197,6 +202,9 @@ export default {
return (attachment) => attachment?.extendedData?.info?.extension
?? (attachment?.name ?? attachment.data).split('.').pop()
},
+ cardDetailsInModal() {
+ return this.$store.getters.config('cardDetailsInModal')
+ },
},
watch: {
cardId: {
@@ -207,8 +215,9 @@ export default {
},
},
methods: {
- ...mapActions([
+ ...mapActions(useAttachmentStore, [
'fetchAttachments',
+ 'unshareAttachment',
]),
handleUploadFile(event) {
const files = event.target.files ?? []
@@ -237,15 +246,22 @@ export default {
})
})
},
- unshareAttachment(attachment) {
- this.$store.dispatch('unshareAttachment', attachment)
- },
clickAddNewAttachmment() {
this.$refs.localAttachments.click()
},
showViewer(attachment) {
if (attachment.extendedData.fileid && window.OCA.Viewer.availableHandlers.map(handler => handler.mimes).flat().includes(attachment.extendedData.mimetype)) {
- window.OCA.Viewer.open({ path: attachment.extendedData.path })
+ // Hide the sidebar if opening card in modal to avoid wrong sidebar position calculating in Viewer app
+ const sidebar = document.querySelector('aside.app-sidebar')
+ if (sidebar && this.cardDetailsInModal) {
+ sidebar.style.display = 'none'
+ }
+ const onClose = () => {
+ if (sidebar && sidebar.style.display === 'none') {
+ sidebar.style.display = ''
+ }
+ }
+ window.OCA.Viewer.open({ path: attachment.extendedData.path, onClose })
return
}
diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue
index 346aa6cb97..c162b8d905 100644
--- a/src/components/card/CardSidebar.vue
+++ b/src/components/card/CardSidebar.vue
@@ -84,7 +84,7 @@
import { NcActionButton, NcAppSidebar, NcAppSidebarTab, NcUserBubble } from '@nextcloud/vue'
import { NcReferenceList } from '@nextcloud/vue/dist/Components/NcRichText.js'
import { getCapabilities } from '@nextcloud/capabilities'
-import { mapState, mapGetters } from 'vuex'
+import { mapState as mapStateVuex, mapGetters } from 'vuex'
import CardSidebarTabDetails from './CardSidebarTabDetails.vue'
import CardSidebarTabAttachments from './CardSidebarTabAttachments.vue'
import CardSidebarTabComments from './CardSidebarTabComments.vue'
@@ -151,12 +151,12 @@ export default {
}
},
computed: {
- ...mapState({
+ ...mapStateVuex({
isFullApp: (state) => state.isFullApp,
currentBoard: (state) => state.currentBoard,
hasCardSaveError: (state) => state.hasCardSaveError,
}),
- ...mapGetters(['canEdit', 'assignables', 'stackById']),
+ ...mapGetters(['canEdit', 'assignables']),
currentCard() {
return this.$store.getters.cardById(this.id)
},
@@ -205,7 +205,7 @@ export default {
},
watch: {
currentCard(newCard, oldCard) {
- if (newCard.id === oldCard.id) return
+ if (newCard.id === oldCard?.id) return
this.focusHeader()
},
'currentCard.title': {
diff --git a/src/components/card/CardSidebarTabAttachments.vue b/src/components/card/CardSidebarTabAttachments.vue
index e57e76290e..1bbf6e52be 100644
--- a/src/components/card/CardSidebarTabAttachments.vue
+++ b/src/components/card/CardSidebarTabAttachments.vue
@@ -11,7 +11,9 @@
diff --git a/src/components/card/CardSidebarTabComments.vue b/src/components/card/CardSidebarTabComments.vue
index fd0fc5d6f6..64f8f1649c 100644
--- a/src/components/card/CardSidebarTabComments.vue
+++ b/src/components/card/CardSidebarTabComments.vue
@@ -11,15 +11,15 @@
-
-