Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enh(editor): add separator to visually separate "create attachment" e…
…ntries

Signed-off-by: Peter Birrer <[email protected]>
  • Loading branch information
pbirrer committed Apr 16, 2025
commit 7f07a73be2b5203981b649f35ad897f6818fa6c9
30 changes: 17 additions & 13 deletions src/components/Menu/ActionAttachmentUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,26 @@
</template>
{{ t('text', 'Insert from Files') }}
</NcActionButton>
<NcActionButton v-for="(template, index) in templates"
:key="`${template.app}-${index}`"
close-after-click
:disabled="isUploadingAttachments"
:data-text-action-entry="`${actionEntry.key}-add-${template.app}-${index}`"
@click="createAttachment(template)">
<template #icon>
<NcIconSvgWrapper v-if="template.iconSvgInline" :svg="template.iconSvgInline" />
<Plus v-else />
</template>
{{ template.actionLabel }}
</NcActionButton>
<template v-if="templates.length">
<NcActionSeparator />
<NcActionButton v-for="(template, index) in templates"
:key="`${template.app}-${index}`"
close-after-click
:disabled="isUploadingAttachments"
:data-text-action-entry="`${actionEntry.key}-add-${template.app}-${index}`"
@click="createAttachment(template)">
<template #icon>
<NcIconSvgWrapper v-if="template.iconSvgInline" :svg="template.iconSvgInline" />
<Plus v-else />
</template>
{{ template.actionLabel }}
</NcActionButton>
</template>
</NcActions>
</template>

<script>
import { NcActions, NcActionButton, NcIconSvgWrapper } from '@nextcloud/vue'
import { NcActions, NcActionSeparator, NcActionButton, NcIconSvgWrapper } from '@nextcloud/vue'
import { loadState } from '@nextcloud/initial-state'
import { Loading, Folder, Upload, Plus } from '../icons.js'
import { useIsPublicMixin, useEditorUpload } from '../Editor.provider.js'
Expand All @@ -67,6 +70,7 @@ export default {
name: 'ActionAttachmentUpload',
components: {
NcActions,
NcActionSeparator,
NcActionButton,
NcIconSvgWrapper,
Loading,
Expand Down