diff --git a/lib/Dashboard/DeckWidgetToday.php b/lib/Dashboard/DeckWidgetToday.php index 2006fec40..38a21ed11 100644 --- a/lib/Dashboard/DeckWidgetToday.php +++ b/lib/Dashboard/DeckWidgetToday.php @@ -80,6 +80,6 @@ class DeckWidgetToday implements IWidget { * @inheritDoc */ public function load(): void { - \OCP\Util::addScript('deck', 'dashboard'); + \OCP\Util::addScript('deck', 'deck-dashboard'); } } diff --git a/lib/Dashboard/DeckWidgetTomorrow.php b/lib/Dashboard/DeckWidgetTomorrow.php index 946a62802..6c9b09da1 100644 --- a/lib/Dashboard/DeckWidgetTomorrow.php +++ b/lib/Dashboard/DeckWidgetTomorrow.php @@ -80,6 +80,6 @@ class DeckWidgetTomorrow implements IWidget { * @inheritDoc */ public function load(): void { - \OCP\Util::addScript('deck', 'dashboard'); + \OCP\Util::addScript('deck', 'deck-dashboard'); } } diff --git a/src/App.vue b/src/App.vue index cfeb3309e..920bf4a3f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -194,4 +194,10 @@ export default { width: 100%; } + .modal__card { + height: 100vh; + max-height: calc(100vh - 120px); + overflow: auto; + } + diff --git a/src/components/ActivityEntry.vue b/src/components/ActivityEntry.vue index 211ffb208..3c6ee6902 100644 --- a/src/components/ActivityEntry.vue +++ b/src/components/ActivityEntry.vue @@ -25,7 +25,7 @@
-
+
{{ relativeDate(activity.datetime) }}
@@ -39,6 +39,7 @@ import { NcRichText, NcUserBubble } from '@nextcloud/vue' import moment from '@nextcloud/moment' import DOMPurify from 'dompurify' import relativeDate from '../mixins/relativeDate.js' +import formatReadableDate from '../mixins/readableDate.js' const InternalLink = { name: 'InternalLink', @@ -62,7 +63,7 @@ export default { components: { NcRichText, }, - mixins: [relativeDate], + mixins: [relativeDate, formatReadableDate], props: { activity: { type: Object, diff --git a/src/components/ActivityList.vue b/src/components/ActivityList.vue index fa1eb7df2..e16519fe1 100644 --- a/src/components/ActivityList.vue +++ b/src/components/ActivityList.vue @@ -84,7 +84,20 @@ export default { params.append('object_id', '' + this.objectId) params.append('limit', ACTIVITY_FETCH_LIMIT) - const response = await axios.get(generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params) + const response = await axios.get( + generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params, + { + validateStatus: (status) => { + return (status >= 200 && status < 300) || status === 304 + }, + }, + ) + + if (response.status === 304) { + this.endReached = true + return [] + } + let activities = response.data.ocs.data if (this.filter === 'deck') { // We need to manually filter activities here, since currently we use two different types and there is no way @@ -95,7 +108,7 @@ export default { }) } this.activities.push(...activities) - if (response.data.ocs.meta.statuscode === 304 || activities.length === 0) { + if (activities.length === 0) { this.endReached = true return [] } diff --git a/src/components/board/Stack.vue b/src/components/board/Stack.vue index 6fc557774..9f01c6a46 100644 --- a/src/components/board/Stack.vue +++ b/src/components/board/Stack.vue @@ -217,7 +217,7 @@ export default { }) }, dragHandleSelector() { - return this.canEdit ? null : '.no-drag' + return this.canEdit && !this.showArchived ? null : '.no-drag' }, cardDetailsInModal: { get() { diff --git a/src/components/board/TagsTabSidebar.vue b/src/components/board/TagsTabSidebar.vue index 22b3348cc..5bf81071b 100644 --- a/src/components/board/TagsTabSidebar.vue +++ b/src/components/board/TagsTabSidebar.vue @@ -130,7 +130,7 @@ export default { return true }, labelsSorted() { - return [...this.labels].sort((a, b) => (a.title < b.title) ? -1 : 1) + return [...this.labels].sort((a, b) => a.title.localeCompare(b.title)) }, }, diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 6692e3de8..6b4988cca 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -39,13 +39,7 @@ {{ t('deck', 'Open in bigger view') }} - - {{ action.label }} - + { + this.descriptionLastEdit = 0 + }, onUpdate: ({ markdown }) => { + if (this.description === markdown) { + this.descriptionLastEdit = 0 + return + } this.description = markdown this.updateDescription() }, @@ -207,6 +216,10 @@ export default { }) }, + async destroyEditor() { + await this.saveDescription() + this?.editor?.destroy() + }, addKeyListeners() { this.$refs.markdownEditor.easymde.codemirror.on('keydown', (a, b) => { if (this.keyExitState === 0 && (b.key === 'Meta' || b.key === 'Alt')) { @@ -287,6 +300,7 @@ export default { return } this.descriptionSaving = true + await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description }) this.$emit('change', this.description) this.descriptionLastEdit = 0 this.descriptionSaving = false diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index 3b9e588af..44e604b32 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -44,9 +44,8 @@ tabindex="0" class="editable" :aria-label="t('deck', 'Edit card title')" - @click.stop="startEditing(card)" @keydown.enter.stop.prevent="startEditing(card)"> - {{ card.title }} + {{ card.title }}
- - diff --git a/src/components/cards/CardMenuEntries.vue b/src/components/cards/CardMenuEntries.vue new file mode 100644 index 000000000..687dd8e99 --- /dev/null +++ b/src/components/cards/CardMenuEntries.vue @@ -0,0 +1,243 @@ + + + + + +