Browse Source

fix: Added download button to qrcode cell

pull/6905/head
Muhammed Mustafa 1 year ago
parent
commit
97fed6fe29
  1. 14
      packages/nc-gui/components/virtual-cell/QrCode.vue

14
packages/nc-gui/components/virtual-cell/QrCode.vue

@ -59,9 +59,21 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
@ok="handleModalOkClick" @ok="handleModalOkClick"
> >
<template #footer> <template #footer>
<div class="mr-4 overflow-scroll p-2" data-testid="nc-qr-code-large-value-label"> <div class="flex flex-row">
<div class="flex flex-row flex-grow mr-2 !overflow-y-auto py-2" data-testid="nc-qr-code-large-value-label">
{{ qrValue }} {{ qrValue }}
</div> </div>
<a v-if="showQrCode" :href="qrCodeLarge" :download="`${qrValue}.png`">
<NcTooltip>
<template #title>
{{ $t('labels.clickToDownload') }}
</template>
<NcButton size="small" type="secondary">
<GeneralIcon icon="download" class="w-4 h-4" />
</NcButton>
</NcTooltip>
</a>
</div>
</template> </template>
<img v-if="showQrCode" :src="qrCodeLarge" :alt="$t('title.qrCode')" /> <img v-if="showQrCode" :src="qrCodeLarge" :alt="$t('title.qrCode')" />
</a-modal> </a-modal>

Loading…
Cancel
Save