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