Skip to content

Commit b4af81e

Browse files
authored
Migrate List Mail/DNS/Web to .units-table (hestiacp#3628)
* Migrate List Mail to .units-table And improve spacing on mobile. * Remove some special chars from password generator hestiacp#3625 * Improve login form attributes for password managers * Tidy formatting * Fix error display in password reset form Missing from hestiacp#3553 * Bump npm deps * Fix JS error on List Backup Detail page * Add title attributes * Refine list view spacing * Migrate List DNS to .units-table * Tidy formatting * Remove incorrect link * Migrate List Web to .units-table * Tidy formatting * Simplify * Formatting
1 parent d65342e commit b4af81e

30 files changed

+1048
-923
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"normalize.css": "^8.0.1"
2828
},
2929
"devDependencies": {
30-
"@prettier/plugin-php": "^0.19.4",
31-
"@typescript-eslint/eslint-plugin": "^5.59.6",
32-
"@typescript-eslint/parser": "^5.59.6",
30+
"@prettier/plugin-php": "^0.19.5",
31+
"@typescript-eslint/eslint-plugin": "^5.59.7",
32+
"@typescript-eslint/parser": "^5.59.7",
3333
"cssnano": "^6.0.1",
3434
"esbuild": "^0.17.19",
35-
"eslint": "^8.40.0",
35+
"eslint": "^8.41.0",
3636
"eslint-config-prettier": "^8.8.0",
3737
"eslint-plugin-editorconfig": "^4.0.3",
3838
"eslint-plugin-import": "^2.27.5",
@@ -48,10 +48,10 @@
4848
"prettier-plugin-nginx": "^1.0.3",
4949
"prettier-plugin-sh": "^0.12.8",
5050
"prettier-plugin-sql": "^0.14.0",
51-
"stylelint": "^15.6.1",
51+
"stylelint": "^15.6.2",
5252
"stylelint-config-standard": "^33.0.0",
5353
"typescript": "^5.0.4",
54-
"vitepress": "1.0.0-alpha.76",
54+
"vitepress": "1.0.0-beta.1",
5555
"vue": "^3.3.4"
5656
},
5757
"browserslist": [

web/css/src/themes/default.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,10 @@
883883
border: 1px solid #ddd;
884884
border-radius: 6px;
885885

886+
&:last-child {
887+
margin-bottom: 10px;
888+
}
889+
886890
&.selected {
887891
background-color: #f8f8f8;
888892
box-shadow: 0 2px 10px rgb(150 150 150 / 20%);
@@ -915,6 +919,7 @@
915919

916920
&:last-child {
917921
border-bottom-color: transparent;
922+
margin-bottom: 0;
918923
}
919924

920925
&:hover {
@@ -951,8 +956,11 @@
951956
}
952957

953958
.units-table-cell {
959+
/* Row heading cell */
954960
&:nth-child(2) {
955961
font-size: 0.9rem;
962+
padding-top: 5px;
963+
padding-bottom: 5px;
956964
}
957965

958966
& a {
@@ -975,6 +983,8 @@
975983
/* Row heading cell */
976984
&:nth-child(2) {
977985
font-size: 0.8rem;
986+
padding-top: 10px;
987+
padding-bottom: 10px;
978988
}
979989

980990
/* Metadata cells */
@@ -988,23 +998,24 @@
988998
display: flex;
989999
flex-wrap: wrap;
9901000
padding-top: 5px;
991-
padding-bottom: 5px;
9921001

9931002
@media (--viewport-large) {
9941003
visibility: hidden;
995-
padding: 0;
1004+
padding-top: 0;
9961005
}
9971006
}
9981007

9991008
.units-table-row-action {
1000-
margin-right: 10px;
1009+
margin-right: 5px;
1010+
margin-bottom: 5px;
10011011

10021012
&:last-child {
10031013
margin-right: 0;
10041014
}
10051015

10061016
@media (--viewport-large) {
10071017
margin-right: 0;
1018+
margin-bottom: 0;
10081019
}
10091020
}
10101021

@@ -2142,6 +2153,7 @@
21422153
padding: 3px;
21432154

21442155
& .fas {
2156+
line-height: 1.1;
21452157
margin-right: 0;
21462158
}
21472159
}

web/js/src/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function randomPassword(length = 16) {
55
const uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
66
const lowercase = 'abcdefghijklmnopqrstuvwxyz';
77
const numbers = '0123456789';
8-
const symbols = '!@#$%^&*()_+-=[]{}|;:,./<>?';
8+
const symbols = '!@#$%^&*()_+-=[]{}|;:/?';
99
const allCharacters = uppercase + lowercase + numbers + symbols;
1010
const generate = customAlphabet(allCharacters, length);
1111

web/templates/includes/js.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
NOTIFICATIONS_EMPTY: '<?= _("No notifications") ?>',
1010
NOTIFICATIONS_DELETE_ALL: '<?= _("Delete all notifications") ?>',
1111
CONFIRM_LEAVE_PAGE: '<?= _("Are you sure you want to leave the page?") ?>',
12-
ERROR_MESSAGE: '<?= !empty($_SESSION['error_msg']) ? htmlentities($_SESSION['error_msg']) : '' ?>',
12+
ERROR_MESSAGE: '<?= !empty($_SESSION["error_msg"]) ? htmlentities($_SESSION["error_msg"]) : "" ?>',
1313
BLACKLIST: '<?= _("BLACKLIST") ?>',
1414
IPVERSE: '<?= _("IPVERSE") ?>'
1515
});
1616
})
1717
</script>
18-
<?php
19-
$_SESSION['unset_alerts'] = true;
20-
?>
18+
<?php $_SESSION["unset_alerts"] = true; ?>
2119

2220
<?php
2321
$customScriptDirectory = new DirectoryIterator($_SERVER["HESTIA"] . "/web/js/custom_scripts");

web/templates/includes/title.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<meta charset="utf-8">
2-
<title><?= display_title($TAB); ?></title>
2+
<title><?= display_title($TAB) ?></title>
33
<meta name="viewport" content="width=device-width, initial-scale=1">

web/templates/pages/add_firewall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
class="form-select js-ip-list-select"
5555
tabindex="-1"
5656
onchange="this.nextElementSibling.value=this.value"
57-
data-ipset-lists="<?= htmlspecialchars($ipset_lists_json, ENT_QUOTES, 'UTF-8') ?>"
57+
data-ipset-lists="<?= htmlspecialchars($ipset_lists_json, ENT_QUOTES, "UTF-8") ?>"
5858
>
5959
<option value=""><?= _("Clear") ?></option>
6060
</select>

web/templates/pages/edit_whitelabel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class="form-control"
8080

8181
<div class="u-mb10">
8282
<label for="v_from_email" class="form-label">
83-
<?= _("Sender Email Address") ?><span class="optional">(<?= _("Default") ?>: <?=sprintf('noreply@%s', htmlentities(trim(get_hostname(), "'")));?>)</span>
83+
<?= _("Sender Email Address") ?><span class="optional">(<?= _("Default") ?>: <?= sprintf("noreply@%s", htmlentities(trim(get_hostname(), "'"))) ?>)</span>
8484
</label>
8585
<input
8686
type="text"
@@ -107,8 +107,8 @@ class="form-control"
107107
<?= _("Hide link to Documentation") ?>
108108
</label>
109109
<select x-model="hide_docs" class="form-select" name="v_hide_docs" id="v_hide_docs">
110-
<option value="yes"><?=_('Yes');?></option>
111-
<option value="no"><?=_('No');?></option>
110+
<option value="yes"><?= _("Yes") ?></option>
111+
<option value="no"><?= _("No") ?></option>
112112
</select>
113113
</div>
114114
</div>
@@ -126,7 +126,7 @@ class="form-control"
126126
</label>
127127
</div>
128128
<div class="u-mb10">
129-
<p><?=sprintf(_("Upload the files to %s"), '/usr/local/hestia/web/images/custom/');?></p>
129+
<p><?= sprintf(_("Upload the files to %s"), "/usr/local/hestia/web/images/custom/") ?></p>
130130
<ul>
131131
<li>logo.svg <small>(100px x 120px)</small></li>
132132
<li>logo.png <small>(100px x 120px)</small></li>

web/templates/pages/list_backup_detail.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
foreach ($mail as $key) {
8787
if (!empty($key)) {
8888
?>
89-
<div class="l-unit">
89+
<div class="l-unit animate__animated animate__fadeIn js-unit">
9090
<div class="l-unit__col l-unit__col--right">
9191
<div class="clearfix l-unit__stat-col--left super-compact">
9292
<input id="check2<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="mail[]" value="<?= $key ?>">
@@ -118,7 +118,7 @@
118118
foreach ($dns as $key) {
119119
if (!empty($key)) {
120120
?>
121-
<div class="l-unit">
121+
<div class="l-unit animate__animated animate__fadeIn js-unit">
122122
<div class="l-unit__col l-unit__col--right">
123123
<div class="clearfix l-unit__stat-col--left super-compact">
124124
<input id="check3<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="dns[]" value="<?= $key ?>">
@@ -150,7 +150,7 @@
150150
foreach ($db as $key) {
151151
if (!empty($key)) {
152152
?>
153-
<div class="l-unit">
153+
<div class="l-unit animate__animated animate__fadeIn js-unit">
154154
<div class="l-unit__col l-unit__col--right">
155155
<div class="clearfix l-unit__stat-col--left super-compact">
156156
<input id="check4<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="db[]" value="<?= $key ?>">
@@ -179,7 +179,7 @@
179179
<!-- List Cron Jobs -->
180180
<?php if (!empty($data[$backup]["CRON"])) {
181181
if (!empty($key)) { ?>
182-
<div class="l-unit">
182+
<div class="l-unit animate__animated animate__fadeIn js-unit">
183183
<div class="l-unit__col l-unit__col--right">
184184
<div class="clearfix l-unit__stat-col--left super-compact">
185185
<input id="check5<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="check" value="<?= $key ?>">
@@ -211,7 +211,7 @@
211211
foreach ($udir as $key) {
212212
if (!empty($key)) {
213213
?>
214-
<div class="l-unit">
214+
<div class="l-unit animate__animated animate__fadeIn js-unit">
215215
<div class="l-unit__col l-unit__col--right">
216216
<div class="clearfix l-unit__stat-col--left super-compact">
217217
<input id="check6<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="udir[]" value="<?= $key ?>">

web/templates/pages/list_backup_exclusions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@
4444
<div class="clearfix l-unit__stat-col--left compact u-text-right"><b>&nbsp;</b></div>
4545
<div class="clearfix l-unit__stat-col--left wide-3">
4646
<?php
47-
if (empty($value)) echo _('No exclusions');
47+
if (empty($value)) {
48+
echo _("No exclusions");
49+
}
4850
foreach ($value as $ex_key => $ex_value) {
49-
echo '<b>'.$ex_key.' </b>'.$ex_value.'<br>';
51+
echo "<b>" . $ex_key . " </b>" . $ex_value . "<br>";
5052
}
5153
?>
5254
</div>

web/templates/pages/list_cron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<?= _("Sort by") ?>:
2424
<b>
2525
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Command'); } else { $label = _('Date'); } ?>
26-
<?=$label;?> <i class="fas fa-arrow-down-a-z"></i>
26+
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
2727
</b>
2828
</button>
2929
<ul class="toolbar-sorting-menu animate__animated animate__fadeIn js-sorting-menu u-hidden">

0 commit comments

Comments
 (0)