Fix modals after revamp [SCI-9330]

This commit is contained in:
Anton 2023-09-21 12:51:32 +02:00
parent 2ab4d2b8dc
commit 97999028ef
11 changed files with 29 additions and 24 deletions

View file

@ -19,16 +19,17 @@
} }
.modal-content { .modal-content {
background: transparent;
border: 0; border: 0;
box-shadow: none; box-shadow: none;
height: 100%; height: 100%;
padding: 0;
width: auto; width: auto;
} }
.modal-header { .modal-header {
background: $color-white; background: $color-white;
display: flex; display: flex;
flex-direction: row;
height: 60px; height: 60px;
line-height: 40px; line-height: 40px;
padding: 10px 15px; padding: 10px 15px;

View file

@ -172,6 +172,7 @@
grid-template-columns: minmax(50%, 100%) 0; grid-template-columns: minmax(50%, 100%) 0;
grid-template-rows: 55px calc(100% - 55px); grid-template-rows: 55px calc(100% - 55px);
height: inherit; height: inherit;
padding: 0;
transition: all $timing-function-sharp; transition: all $timing-function-sharp;
&.show-sidebar { &.show-sidebar {

View file

@ -10,6 +10,7 @@
.modal-header { .modal-header {
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: row;
padding: .5em; padding: .5em;
.title { .title {

View file

@ -19,7 +19,9 @@
background: inherit; background: inherit;
border: 0; border: 0;
border-radius: 0; border-radius: 0;
height: auto; display: flex;
flex-direction: column;
height: 100vh;
min-height: 100%; min-height: 100%;
padding: 0; padding: 0;
} }
@ -72,6 +74,8 @@
align-items: center; align-items: center;
background: $color-white; background: $color-white;
display: flex; display: flex;
flex-direction: row;
flex-shrink: 0;
height: 4em; height: 4em;
padding: 0 1em; padding: 0 1em;
@ -89,7 +93,7 @@
align-items: center; align-items: center;
background: transparent; background: transparent;
display: flex; display: flex;
height: calc(100vh - 8em); flex-grow: 1;
justify-content: center; justify-content: center;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
@ -99,6 +103,7 @@
.modal-footer { .modal-footer {
background: $color-white; background: $color-white;
height: 4em; height: 4em;
flex-shrink: 0;
padding: 0 1em; padding: 0 1em;
.gallery { .gallery {

View file

@ -13,12 +13,14 @@
.modal-content { .modal-content {
border: 0; border: 0;
height: 100%; height: 100%;
padding: 0;
} }
.modal-header { .modal-header {
align-items: center; align-items: center;
background: $color-white; background: $color-white;
display: flex; display: flex;
flex-direction: row;
height: 4em; height: 4em;
padding: 0 1em; padding: 0 1em;

View file

@ -1,9 +1,10 @@
.pdf-viewer { .pdf-viewer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: calc(100% + 4rem);
margin: -2rem;
position: relative; position: relative;
width: 100%; width: calc(100% + 4rem);
.page-container { .page-container {
display: flex; display: flex;

View file

@ -13,7 +13,7 @@
} }
.btn.btn-lg { .btn.btn-lg {
@apply py-2.5 px-[1.125rem] text-base leading-5 max-h-[44px]; @apply py-2.5 px-[1.125rem] text-base leading-5 h-[44px];
} }
.btn.btn-lg.icon-btn { .btn.btn-lg.icon-btn {
@ -21,7 +21,7 @@
} }
.btn.btn-sm { .btn.btn-sm {
@apply py-1.5 px-2.5 text-xs leading-5 max-h-[36px]; @apply py-1.5 px-2.5 text-xs leading-5 h-[36px];
} }
.btn.btn-sm.icon-btn { .btn.btn-sm.icon-btn {
@ -29,7 +29,7 @@
} }
.btn.btn-xs { .btn.btn-xs {
@apply py-0.5 px-2.5 text-xs leading-5 max-h-[30px]; @apply py-0.5 px-2.5 text-xs leading-5 h-[30px];
} }
.btn.btn-xs.icon-btn { .btn.btn-xs.icon-btn {

View file

@ -20,10 +20,6 @@
@apply text-sn-sleepy-grey; @apply text-sn-sleepy-grey;
} }
.sci-input-container-v2 .sci-input-field-v2 {
@apply h-[2.25rem];
}
.sci-input-container-v2 .error { .sci-input-container-v2 .error {
@apply !border-sn-coral; @apply !border-sn-coral;
} }
@ -38,7 +34,7 @@
.sci-input-container-v2 input:disabled { .sci-input-container-v2 input:disabled {
background-color: var(--sn-super-light-grey); background-color: var(--sn-super-light-grey);
color: var(--sn-light-grey); color: var(--sn-grey);
border: 1px solid var(--sn-light-grey); border: 1px solid var(--sn-light-grey);
} }

View file

@ -11,9 +11,6 @@
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header flex"> <div class="modal-header flex">
<h4 class="modal-title">
{{ i18n.t("shareable_links.modal.title") }}
</h4>
<button <button
type="button" type="button"
class="close float-right !ml-auto" class="close float-right !ml-auto"
@ -23,6 +20,9 @@
> >
<i class="sn-icon sn-icon-close"></i> <i class="sn-icon sn-icon-close"></i>
</button> </button>
<h4 class="modal-title">
{{ i18n.t("shareable_links.modal.title") }}
</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="flex items-center text-sm gap-4 mb-4"> <div class="flex items-center text-sm gap-4 mb-4">
@ -66,13 +66,13 @@
<div class="mb-2"> {{ i18n.t('shareable_links.modal.sharing_link_label') }} </div> <div class="mb-2"> {{ i18n.t('shareable_links.modal.sharing_link_label') }} </div>
<div class="sci-input-container-v2 input-sm text-sm mb-2 flex-row-reverse"> <div class="sci-input-container-v2 input-sm text-sm mb-2 flex-row-reverse">
<input type="text" <input type="text"
class="sci-input-field-v2" class="sci-input-field !pr-16"
ref="clone" ref="clone"
:value="shareableData.attributes ? shareableData.attributes.shareable_url : ''" :value="shareableData.attributes ? shareableData.attributes.shareable_url : ''"
id="#share-link-input" id="#share-link-input"
:disabled="true" :disabled="true"
/> />
<button class="btn btn-primary share-link-copy" <button class="btn btn-primary btn-sm share-link-copy"
tabindex="0" tabindex="0"
@click="copy($refs.clone.value)" @click="copy($refs.clone.value)"
:disabled="!sharedEnabled">{{ i18n.t('shareable_links.modal.copy_button') }} :disabled="!sharedEnabled">{{ i18n.t('shareable_links.modal.copy_button') }}

View file

@ -21,5 +21,3 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="modal-footer">
</div>

View file

@ -70,8 +70,8 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="modal-footer"> <% if gallery.present? %>
<% if gallery %> <div class="modal-footer">
<div class="gallery"> <div class="gallery">
<% previous_asset = Asset.find_by(id: gallery.split(asset.id.to_s)[0]&.last) %> <% previous_asset = Asset.find_by(id: gallery.split(asset.id.to_s)[0]&.last) %>
<% next_asset = Asset.find_by(id: gallery.split(asset.id.to_s)[1]&.first) %> <% next_asset = Asset.find_by(id: gallery.split(asset.id.to_s)[1]&.first) %>
@ -109,7 +109,7 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<% end %> </div>
</div> <% end %>
<%= javascript_include_tag 'shared/file_preview', nonce: true %> <%= javascript_include_tag 'shared/file_preview', nonce: true %>