Browse Source

feat(nc-gui): add rename file button in attachment carousel

pull/4931/head
Wing-Kam Wong 2 years ago
parent
commit
55d532f01a
  1. 11
      packages/nc-gui/components/cell/attachment/Modal.vue

11
packages/nc-gui/components/cell/attachment/Modal.vue

@ -20,6 +20,7 @@ const {
downloadFile, downloadFile,
updateModelValue, updateModelValue,
selectedImage, selectedImage,
renameFile,
} = useAttachmentCell()! } = useAttachmentCell()!
// todo: replace placeholder var // todo: replace placeholder var
@ -125,13 +126,21 @@ function onRemoveFileClick(title: any, i: number) {
</a-tooltip> </a-tooltip>
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template #title> Download file </template> <template #title> Download File </template>
<div class="nc-attachment-download group-hover:(opacity-100)"> <div class="nc-attachment-download group-hover:(opacity-100)">
<MdiDownload @click.stop="downloadFile(item)" /> <MdiDownload @click.stop="downloadFile(item)" />
</div> </div>
</a-tooltip> </a-tooltip>
<a-tooltip placement="bottom">
<template #title> Rename File </template>
<div class="nc-attachment-download group-hover:(opacity-100) mr-[35px]">
<MdiEditOutline @click.stop="renameFile(item)" />
</div>
</a-tooltip>
<div <div
:class="[dragging ? 'cursor-move' : 'cursor-pointer']" :class="[dragging ? 'cursor-move' : 'cursor-pointer']"
class="nc-attachment h-full w-full flex items-center justify-center" class="nc-attachment h-full w-full flex items-center justify-center"

Loading…
Cancel
Save