From 741ea0eafd211224fca32b851bf1e42ba3530079 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 23 Nov 2021 21:46:06 +0300 Subject: [PATCH 1/4] Fix Activity layout (#351) Signed-off-by: Alexander Platov --- packages/theme/styles/_layouts.scss | 8 +++ .../src/components/Activity.svelte | 12 +--- .../src/components/TxView.svelte | 56 +++++++++++-------- .../activity/TxApplicantUpdate.svelte | 35 +++++------- .../src/components/StatePresenter.svelte | 6 +- 5 files changed, 59 insertions(+), 58 deletions(-) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 1de1aad7e0..e61e0142cc 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -159,6 +159,14 @@ table { &:hover .icon { color: var(--theme-caption-color); } } +/* Tables */ +// .activity-table > tr:last-child > .no-icon-cell { +// min-height: auto; +// height: auto; +// &::after { content: none; } +// } + +/* Margins & Paddings */ .step-lr75 + .step-lr75 { margin-left: .75rem; } .step-tb75 + .step-tb75 { margin-top: .75rem; } diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index 2bc7f1c635..5499d2e5c1 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. --> + -{#if tx.operations.state} - updated State to - {#if statePresenter?.presenter} - {#await client.findOne(core.class.State, { _id: tx.operations.state }) then st} - {#if st} - - {/if} - {/await} - {/if} +{#if tx.operations.state} +
+ updated State to + {#if statePresenter?.presenter} + {#await client.findOne(core.class.State, { _id: tx.operations.state }) then st} + {#if st} + + {/if} + {/await} + {/if} +
{/if} - \ No newline at end of file + diff --git a/plugins/view-resources/src/components/StatePresenter.svelte b/plugins/view-resources/src/components/StatePresenter.svelte index aefd8201f1..9a076bbbba 100644 --- a/plugins/view-resources/src/components/StatePresenter.svelte +++ b/plugins/view-resources/src/components/StatePresenter.svelte @@ -30,14 +30,14 @@ display: flex; justify-content: center; align-items: center; - padding: .375rem 1rem; - width: min-content; + padding: .25rem .75rem; + width: fit-content; text-transform: uppercase; font-weight: 500; letter-spacing: .5px; font-size: .625rem; color: #fff; border: 1px solid rgba(0, 0, 0, .1); - border-radius: .5rem; + border-radius: .25rem; } From 15e365ec6efd8fe19dd5ca692215cc79cccc4cc2 Mon Sep 17 00:00:00 2001 From: Andrey Platov <87076238+aplatoff@users.noreply.github.com> Date: Tue, 23 Nov 2021 20:43:37 +0100 Subject: [PATCH 2/4] fixes #346 (#353) Signed-off-by: Andrey Platov --- .../chunter-resources/src/components/AttachmentPresenter.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chunter-resources/src/components/AttachmentPresenter.svelte b/plugins/chunter-resources/src/components/AttachmentPresenter.svelte index c4b3974aba..e47495f80b 100644 --- a/plugins/chunter-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/chunter-resources/src/components/AttachmentPresenter.svelte @@ -41,7 +41,7 @@
{iconLabel(value.name)}
{/if}
- {#if value.type.includes('application/pdf')} + {#if value.type.includes('application/pdf') || value.type.startsWith('image/')}
{ closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}
{:else} From 62edf2c29d45694d6f177c2f439d59941217e6b3 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Tue, 23 Nov 2021 21:30:17 +0100 Subject: [PATCH 3/4] Open images in internal viewer Signed-off-by: Andrey Platov --- .../src/components/AttachmentPresenter.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/chunter-resources/src/components/AttachmentPresenter.svelte b/plugins/chunter-resources/src/components/AttachmentPresenter.svelte index e47495f80b..eb89dfb30b 100644 --- a/plugins/chunter-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/chunter-resources/src/components/AttachmentPresenter.svelte @@ -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/') + }
- {#if value.type.includes('application/pdf')} + {#if openEmbedded(value.type)}
{ closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{iconLabel(value.name)}
{:else}
{iconLabel(value.name)}
{/if}
- {#if value.type.includes('application/pdf') || value.type.startsWith('image/')} + {#if openEmbedded(value.type)}
{ closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}
{:else} From 33ce6a73f7e9db2f5a358d2178ce95ac9a0a2e0c Mon Sep 17 00:00:00 2001 From: Andrey Platov <87076238+aplatoff@users.noreply.github.com> Date: Wed, 24 Nov 2021 10:45:09 +0100 Subject: [PATCH 4/4] Fix Webpack build (#354) Signed-off-by: Andrey Platov Co-authored-by: Andrey Sobolev --- dev/prod/package.json | 2 +- dev/prod/public/index.html | 1 - dev/prod/webpack.config.js | 16 ---------------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dev/prod/package.json b/dev/prod/package.json index 0ecf7b9157..57d715cfac 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -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", diff --git a/dev/prod/public/index.html b/dev/prod/public/index.html index c7bf9124d2..1474b2b6f8 100644 --- a/dev/prod/public/index.html +++ b/dev/prod/public/index.html @@ -12,7 +12,6 @@ - diff --git a/dev/prod/webpack.config.js b/dev/prod/webpack.config.js index b9e225351e..6635ace3fe 100644 --- a/dev/prod/webpack.config.js +++ b/dev/prod/webpack.config.js @@ -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: [ {