Compare commits
1 Commits
techdept/m
...
enh/attach
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d57f7a8d |
@@ -21,10 +21,16 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<AttachmentDragAndDrop :card-id="cardId" class="drop-upload--sidebar">
|
<div>
|
||||||
<button class="icon-upload" @click="clickAddNewAttachmment()">
|
<h5>
|
||||||
|
{{ t('deck', 'Attachments') }}
|
||||||
|
<Actions>
|
||||||
|
<ActionButton icon="icon-upload" @click="clickAddNewAttachmment()">
|
||||||
{{ t('deck', 'Upload attachment') }}
|
{{ t('deck', 'Upload attachment') }}
|
||||||
</button>
|
</ActionButton>
|
||||||
|
</Actions>
|
||||||
|
</h5>
|
||||||
|
<AttachmentDragAndDrop :card-id="cardId" class="drop-upload--sidebar">
|
||||||
<input ref="localAttachments"
|
<input ref="localAttachments"
|
||||||
type="file"
|
type="file"
|
||||||
style="display: none;"
|
style="display: none;"
|
||||||
@@ -73,6 +79,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</AttachmentDragAndDrop>
|
</AttachmentDragAndDrop>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -171,6 +178,21 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
color: var(--color-text-maxcontrast);
|
||||||
|
|
||||||
|
.icon-upload {
|
||||||
|
background-size: 16px;
|
||||||
|
float: right;
|
||||||
|
margin-top: -14px;
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.icon-upload {
|
.icon-upload {
|
||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
background-position: 10px center;
|
background-position: 10px center;
|
||||||
|
|||||||
@@ -46,13 +46,6 @@
|
|||||||
<CardSidebarTabDetails :card="currentCard" />
|
<CardSidebarTabDetails :card="currentCard" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab id="attachments"
|
|
||||||
:order="1"
|
|
||||||
:name="t('deck', 'Attachments')"
|
|
||||||
icon="icon-attach">
|
|
||||||
<CardSidebarTabAttachments :card="currentCard" />
|
|
||||||
</AppSidebarTab>
|
|
||||||
|
|
||||||
<AppSidebarTab
|
<AppSidebarTab
|
||||||
id="comments"
|
id="comments"
|
||||||
:order="2"
|
:order="2"
|
||||||
@@ -75,7 +68,6 @@
|
|||||||
import { ActionButton, AppSidebar, AppSidebarTab } from '@nextcloud/vue'
|
import { ActionButton, AppSidebar, AppSidebarTab } from '@nextcloud/vue'
|
||||||
import { mapState, mapGetters } from 'vuex'
|
import { mapState, mapGetters } from 'vuex'
|
||||||
import CardSidebarTabDetails from './CardSidebarTabDetails'
|
import CardSidebarTabDetails from './CardSidebarTabDetails'
|
||||||
import CardSidebarTabAttachments from './CardSidebarTabAttachments'
|
|
||||||
import CardSidebarTabComments from './CardSidebarTabComments'
|
import CardSidebarTabComments from './CardSidebarTabComments'
|
||||||
import CardSidebarTabActivity from './CardSidebarTabActivity'
|
import CardSidebarTabActivity from './CardSidebarTabActivity'
|
||||||
import relativeDate from '../../mixins/relativeDate'
|
import relativeDate from '../../mixins/relativeDate'
|
||||||
@@ -90,7 +82,6 @@ export default {
|
|||||||
AppSidebar,
|
AppSidebar,
|
||||||
AppSidebarTab,
|
AppSidebarTab,
|
||||||
ActionButton,
|
ActionButton,
|
||||||
CardSidebarTabAttachments,
|
|
||||||
CardSidebarTabComments,
|
CardSidebarTabComments,
|
||||||
CardSidebarTabActivity,
|
CardSidebarTabActivity,
|
||||||
CardSidebarTabDetails,
|
CardSidebarTabDetails,
|
||||||
|
|||||||
@@ -117,6 +117,12 @@
|
|||||||
type="deck-card" />
|
type="deck-card" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<AttachmentList
|
||||||
|
:card-id="card.id"
|
||||||
|
:removable="true"
|
||||||
|
@deleteAttachment="deleteAttachment"
|
||||||
|
@restoreAttachment="restoreAttachment" />
|
||||||
|
|
||||||
<Description :key="card.id" :card="card" />
|
<Description :key="card.id" :card="card" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -125,7 +131,7 @@
|
|||||||
import { mapState, mapGetters } from 'vuex'
|
import { mapState, mapGetters } from 'vuex'
|
||||||
import moment from '@nextcloud/moment'
|
import moment from '@nextcloud/moment'
|
||||||
import { Avatar, Actions, ActionButton, Multiselect, DatetimePicker } from '@nextcloud/vue'
|
import { Avatar, Actions, ActionButton, Multiselect, DatetimePicker } from '@nextcloud/vue'
|
||||||
|
import AttachmentList from './AttachmentList'
|
||||||
import { CollectionList } from 'nextcloud-vue-collections'
|
import { CollectionList } from 'nextcloud-vue-collections'
|
||||||
import Color from '../../mixins/color'
|
import Color from '../../mixins/color'
|
||||||
import {
|
import {
|
||||||
@@ -146,6 +152,7 @@ export default {
|
|||||||
ActionButton,
|
ActionButton,
|
||||||
Avatar,
|
Avatar,
|
||||||
CollectionList,
|
CollectionList,
|
||||||
|
AttachmentList,
|
||||||
},
|
},
|
||||||
mixins: [Color],
|
mixins: [Color],
|
||||||
props: {
|
props: {
|
||||||
@@ -234,6 +241,12 @@ export default {
|
|||||||
this.initialize()
|
this.initialize()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deleteAttachment(attachment) {
|
||||||
|
this.$store.dispatch('deleteAttachment', attachment)
|
||||||
|
},
|
||||||
|
restoreAttachment(attachment) {
|
||||||
|
this.$store.dispatch('restoreAttachment', attachment)
|
||||||
|
},
|
||||||
async initialize() {
|
async initialize() {
|
||||||
if (!this.card) {
|
if (!this.card) {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user