mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-24 06:43:16 +03:00
Merge pull request #358 from hcengineering/merge-003
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com> Co-authored-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
commit
853de9362e
@ -3,7 +3,7 @@
|
||||
"version": "1.0.1",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=development webpack --stats-error-details && echo 'done'",
|
||||
"build": "cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'",
|
||||
"analyze": "cross-env NODE_ENV=production webpack --json > stats.json",
|
||||
"show": "webpack-bundle-analyzer stats.json dist",
|
||||
"dev": "cross-env CLIENT_TYPE=dev webpack serve --content-base public",
|
||||
|
@ -12,7 +12,6 @@
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; overflow: hidden;">
|
||||
<script src='/vendors.js'></script>
|
||||
<script src='/bundle.js'></script>
|
||||
</body>
|
||||
|
||||
|
@ -45,22 +45,6 @@ module.exports = {
|
||||
chunkFilename: '[name].[id].js',
|
||||
publicPath: '/'
|
||||
},
|
||||
optimization: {
|
||||
minimize: prod,
|
||||
usedExports: prod,
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
maxAsyncRequests: 5,
|
||||
maxInitialRequests: 3,
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
name: 'vendors',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { TxViewlet } from '@anticrm/activity'
|
||||
import activity from '@anticrm/activity'
|
||||
|
@ -32,16 +32,20 @@
|
||||
const ext = parts[parts.length - 1]
|
||||
return ext.substring(0, 4).toUpperCase()
|
||||
}
|
||||
|
||||
function openEmbedded(contentType: string) {
|
||||
return contentType.includes('application/pdf') || contentType.startsWith('image/')
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex-row-center">
|
||||
{#if value.type.includes('application/pdf')}
|
||||
{#if openEmbedded(value.type)}
|
||||
<div class="flex-center icon" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{iconLabel(value.name)}</div>
|
||||
{:else}
|
||||
<a class="no-line" href={getFileUrl(value.file)} download={value.name}><div class="flex-center icon">{iconLabel(value.name)}</div></a>
|
||||
{/if}
|
||||
<div class="flex-col info">
|
||||
{#if value.type.includes('application/pdf')}
|
||||
{#if openEmbedded(value.type)}
|
||||
<div class="name" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}</div>
|
||||
{:else}
|
||||
<div class="name"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div>
|
||||
|
Loading…
Reference in New Issue
Block a user