Browse Source

feat: preview support for .webp extension, webhooks doc reference quick link

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1329/head
Raju Udava 3 years ago
parent
commit
c4175bd567
  1. 22
      packages/nc-gui/components/project/spreadsheet/helpers/imageExt.js
  2. 2
      packages/nc-gui/components/project/tableTabs/webhooks.vue
  3. 3
      packages/nocodb/src/lib/noco/common/BaseModel.ts

22
packages/nc-gui/components/project/spreadsheet/helpers/imageExt.js

@ -1,14 +1,22 @@
const imageExt = ['jpeg', 'gif', 'png', 'png', 'svg', 'bmp', 'ico', 'jpg']
const imageExt = [
"jpeg",
"gif",
"png",
"png",
"svg",
"bmp",
"ico",
"jpg",
"webp",
];
export default imageExt
export default imageExt;
const isImage = (name) => {
return imageExt.some(e => name.toLowerCase().endsWith(`.${e}`))
}
return imageExt.some((e) => name.toLowerCase().endsWith(`.${e}`));
};
export {
isImage
}
export { isImage };
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*

2
packages/nc-gui/components/project/tableTabs/webhooks.vue

@ -341,6 +341,8 @@
</span>
</v-tooltip>
<br>
<a href="https://docs.nocodb.com/developer-resources/webhooks/">Document Reference</a>
</span>
</v-card-text>
</v-card>

3
packages/nocodb/src/lib/noco/common/BaseModel.ts

@ -235,7 +235,8 @@ class BaseModel<T extends BaseApiBuilder<any>> extends BaseModelSql {
'svg',
'bmp',
'ico',
'jpg'
'jpg',
'webp'
].includes(attachment.title.split('.').pop())
) {
return `<a href="${attachment.url}" target="_blank"><img height="50px" src="${attachment.url}"/></a>`;

Loading…
Cancel
Save