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

Fix lots of aliases impacting table (#3651)

Alec Rust 2 лет назад
Родитель
Сommit
cfc125f0f0

+ 1 - 1
docs/docs/contributing/development.md

@@ -15,7 +15,7 @@ These are example instructions for creating a virtual machine running Hestia for
 These instructions use [Multipass](https://multipass.run/) to create the VM. Feel free to adapt the commands for any virtualization software you prefer.
 
 ::: warning
-Sometimes the mapping between the source code directory on your local machine to the directory in the VM can be lost. If this happens simply unmount and remount e.g.
+Sometimes the mapping between the source code directory on your local machine to the directory in the VM can be lost with a "failed to obtain exit status for remote process" error. If this happens simply unmount and remount e.g.
 
 ```bash
 multipass unmount hestia-dev

+ 10 - 0
web/css/src/utilities.css

@@ -127,6 +127,12 @@
 	width: 100% !important;
 }
 
+.u-text-ellipsis {
+	overflow: hidden !important;
+	text-overflow: ellipsis !important;
+	white-space: nowrap !important;
+}
+
 .u-min-height100 {
 	min-height: 100px !important;
 }
@@ -139,6 +145,10 @@
 	min-height: 600px !important;
 }
 
+.u-max-width300 {
+	max-width: 300px !important;
+}
+
 .u-max-height300 {
 	max-height: 300px !important;
 }

+ 2 - 2
web/templates/pages/list_user.php

@@ -144,14 +144,14 @@
 					<?php if ($key == $user_plain) { ?>
 						<a href="/edit/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Edit User") ?>">
 							<span class="u-text-bold">
-								<?=$key?>
+								<?= $key ?>
 							</span>
 							(<?=$data[$key]['NAME'];?>)
 						</a>
 					<?php } else { ?>
 						<a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Log in as") ?> <?=$key?>">
 							<span class="u-text-bold">
-								<?=$key?>
+								<?= $key ?>
 							</span>
 							(<?=$data[$key]['NAME'];?>)
 						</a>

+ 9 - 6
web/templates/pages/list_web.php

@@ -195,22 +195,25 @@
 				</div>
 				<div class="units-table-cell u-text-bold">
 					<span class="u-hide-desktop"><?= _("Name") ?>:</span>
-					<?php if ($read_only === 'true') {?>
-						<?=$key?>
+					<?php if ($read_only === 'true') { ?>
+						<?= $key ?>
 					<?php } else {
 						$aliases = explode(',', $data[$key]['ALIAS']);
 						$alias_new = array();
 						foreach($aliases as $alias){
-							if($alias != 'www.'.$key){
+							if ($alias != 'www.'.$key) {
 								$alias_new[] = trim($alias);
 							}
 						}
 						?>
 						<a href="/edit/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Edit Domain") ?>: <?=$key?>">
 							<?= $key ?>
-							<?php if (!empty($alias_new) && !empty($data[$key]['ALIAS'])) {
-								echo " <span class=\"hint\">(".implode(',',$alias_new).")";
-							} ?>
+							<?php
+								if (!empty($alias_new) && !empty($data[$key]['ALIAS'])) {
+									$aliases = implode(', ', $alias_new);
+									echo "<p class='hint u-max-width300 u-text-ellipsis'>($aliases)</p>";
+								}
+							?>
 						</a>
 					<?php } ?>
 				</div>