From 0249f2a30ea66045c72f87eab37b9819d15d520b Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Thu, 28 Jul 2022 09:56:09 +0200 Subject: [PATCH] CSS fixes for step attachments [SCI-7001] (#4294) --- app/assets/stylesheets/shared/assets.scss | 10 ++++++++++ app/assets/stylesheets/steps/step.scss | 11 ++++++++++- app/assets/stylesheets/steps/step_attachments.scss | 3 ++- app/javascript/vue/protocol/attachments.vue | 2 +- .../vue/protocol/step_attachments/context_menu.vue | 4 ++-- .../vue/protocol/step_attachments/file_modal.vue | 12 ++++++------ .../vue/protocol/step_attachments/uploading.vue | 4 ++-- app/javascript/vue/protocol/storage_usage.vue | 4 ++-- config/locales/en.yml | 2 +- 9 files changed, 36 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/shared/assets.scss b/app/assets/stylesheets/shared/assets.scss index 86cd72208..ab7676a12 100644 --- a/app/assets/stylesheets/shared/assets.scss +++ b/app/assets/stylesheets/shared/assets.scss @@ -194,6 +194,10 @@ width: 100%; } + .file-info { + line-height: 1.5em; + } + .image-container, .general-file-container { align-items: center; @@ -285,6 +289,7 @@ display: grid; grid-column-gap: 1em; grid-template-columns: max-content max-content; + margin-left: auto; } .asset-context-menu { @@ -358,6 +363,10 @@ .file-name { text-align: center; + + div { + margin-bottom: .5em; + } } .remove-button { @@ -445,6 +454,7 @@ border-radius: 2px; color: $color-concrete; font-size: 12px; + margin-left: .25em; margin-right: 1em; padding: 4px 8px; white-space: nowrap; diff --git a/app/assets/stylesheets/steps/step.scss b/app/assets/stylesheets/steps/step.scss index 086358649..2c2130a11 100644 --- a/app/assets/stylesheets/steps/step.scss +++ b/app/assets/stylesheets/steps/step.scss @@ -226,13 +226,18 @@ .storage-usage { @include font-small; + align-self: center; color: $color-black; + display: flex; + margin-top: 1em; + width: 400px; .progress-container { background-color: $color-white; border-radius: 2px; + flex-grow: 1; height: 4px; - margin: 1em 0; + margin: 1em 1em 1em 0; overflow: hidden; position: relative; @@ -243,6 +248,10 @@ transition: 1s $timing-function-sharp; } } + + .progress-message { + line-height: 2em; + } } } diff --git a/app/assets/stylesheets/steps/step_attachments.scss b/app/assets/stylesheets/steps/step_attachments.scss index 3a6517bbe..612b850b8 100644 --- a/app/assets/stylesheets/steps/step_attachments.scss +++ b/app/assets/stylesheets/steps/step_attachments.scss @@ -152,7 +152,8 @@ } .divider { - @include font-h3; + @include font-small; + font-weight: bold; padding: 1em 0; text-align: center; } diff --git a/app/javascript/vue/protocol/attachments.vue b/app/javascript/vue/protocol/attachments.vue index 22c481fbf..e46b60cef 100644 --- a/app/javascript/vue/protocol/attachments.vue +++ b/app/javascript/vue/protocol/attachments.vue @@ -16,7 +16,7 @@ >
  • {{ i18n.t("protocols.steps.attachments.add") }}
  • - + {{ i18n.t('protocols.steps.insert.attachment') }} diff --git a/app/javascript/vue/protocol/step_attachments/context_menu.vue b/app/javascript/vue/protocol/step_attachments/context_menu.vue index f91ff61bd..cd06b7b7b 100644 --- a/app/javascript/vue/protocol/step_attachments/context_menu.vue +++ b/app/javascript/vue/protocol/step_attachments/context_menu.vue @@ -21,7 +21,7 @@
  • -
  • -
    + -
    - {{ i18n.t("protocols.steps.attachments.new.uploading") }} - {{ attachment.attributes.file_name }} +
    {{ i18n.t("protocols.steps.attachments.new.uploading") }}
    +
    {{ attachment.attributes.file_name }}
    diff --git a/app/javascript/vue/protocol/storage_usage.vue b/app/javascript/vue/protocol/storage_usage.vue index 0eb03cdbe..34247a0fc 100644 --- a/app/javascript/vue/protocol/storage_usage.vue +++ b/app/javascript/vue/protocol/storage_usage.vue @@ -3,13 +3,13 @@
    - + {{ i18n.t('protocols.steps.space_used_label', { used: this.step.attributes.storage_limit.used_human, limit: this.step.attributes.storage_limit.total_human }) }} - + {{ i18n.t('protocols.steps.space_used_label_unlimited', {used: this.step.attributes.storage_limit.used_human}) }}
    diff --git a/config/locales/en.yml b/config/locales/en.yml index e541053e1..d84d46843 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2792,7 +2792,7 @@ en: modal_title: 'Create new MS Office document' text_field_label: 'Document name' type_select_label: 'Document type' - text_field_placeholder: 'New Document' + text_field_placeholder: 'Enter document name...' ms_word: 'Word
    Online' ms_excel: 'Excel
    Online' ms_powerpoint: 'PowerPoint
    Online'