Просмотр исходного кода

fix(bootstrap5): left-align status alert text after handleNotification rerender (#1833)

Drop `justify-content-between` from `#status` so the alert icon and text
stay together on the left when JS rerenders the alert via
`Alert.showStatus`. The deleted-paste case still needs the "Start over"
button on the right, so move the anchor onto the button via `ms-auto`
instead of relying on the parent flex layout.

Closes #1833
Trevin Chow 3 месяцев назад
Родитель
Сommit
7f61ff139c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tpl/bootstrap5.php

+ 2 - 2
tpl/bootstrap5.php

@@ -378,7 +378,7 @@ if ($FILEUPLOAD) :
 <?php
 endif;
 ?>
-				<div id="status" role="alert" class="d-flex justify-content-between align-items-center alert alert-<?php echo $ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
+				<div id="status" role="alert" class="d-flex align-items-center alert alert-<?php echo $ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
 					<div>
 						<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#info-circle" /></svg>
 						<?php echo I18n::encode($STATUS), PHP_EOL; ?>
@@ -386,7 +386,7 @@ endif;
 <?php
 if ($ISDELETED) :
 ?>
-					<button type="button" class="btn btn-secondary d-flex justify-content-center align-items-center gap-1" id="new-from-alert">
+					<button type="button" class="btn btn-secondary d-flex justify-content-center align-items-center gap-1 ms-auto" id="new-from-alert">
 						<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#repeat" /></svg>
 						<?php echo I18n::_('Start over'), PHP_EOL; ?>
 					</button>