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

Add footer messages for developer/beta builds

Kristan Kenney 5 лет назад
Родитель
Сommit
16b2eb4ca0
3 измененных файлов с 92 добавлено и 2 удалено
  1. 66 1
      web/css/src/themes/default.css
  2. 0 0
      web/css/themes/default.min.css
  3. 26 1
      web/templates/footer.html

+ 66 - 1
web/css/src/themes/default.css

@@ -839,7 +839,7 @@ a {
   padding: 4rem;
 }
 
-.notification-container .empty .status-icon {
+.notification-container .empty . {
   color: #54a6e5;
 }
 
@@ -3677,6 +3677,71 @@ form#vstobjects.suspended {
   padding-right: 59px !important;
 }
 
+.footer-banner {
+  width: 100%;
+  text-align:center;
+  border-top: 1px solid rgba(255,255,255,0.25);
+  box-shadow: 0px -2px 4px rgb(0 0 0 / 40%);
+  font-size: 0.75rem;
+  padding: 10px;
+  position: fixed;
+  bottom: 0px;
+}
+
+.footer-banner b, .footer-banner strong {
+  color: unset;
+}
+
+.footer-banner a {
+  font-weight: 500;
+  color: #fff;
+}
+
+.footer-banner a:hover {
+  color: #fff;
+}
+
+.footer-banner a:hover {
+  text-decoration: underline;
+}
+
+.footer-banner.alpha {
+  background-color: #222;
+  color: #fff;
+}
+
+.footer-banner.alpha a {
+  color: #fff;
+}
+
+.footer-banner.alpha a:hover {
+  color: #fff;
+}
+
+.footer-banner.beta {
+  background-color: #eaeaea;
+  color: #404040;
+}
+
+.footer-banner.beta a {
+  color: #404040;
+}
+
+.footer-banner.developer {
+  background-color: yellow;
+  color: #000;
+}
+
+.footer-banner.developer a {
+  font-weight: 500;
+  color: #000;
+}
+
+.footer-banner.updates {
+  background-color: green;
+  color: #fff;
+}
+
 .float-left {
   float: left;
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/css/themes/default.min.css


+ 26 - 1
web/templates/footer.html

@@ -1,5 +1,30 @@
   </div>
-
+  <? if (($_SESSION['RELEASE_BRANCH'] !== "release") && ($_SESSION['RELEASE_BRANCH'] !== "beta")) { ?>
+    <div class="footer-banner alpha" id="banner">
+      <div>
+        <b>Pre-release development build for testing purposes only.</b> Please report bugs or issues to our development team on <a href="https://github.com/hestiacp/hestiacp/"><i class="fab fa-github icon-large icon-pad-right"></i>GitHub</a>.<br> Hestia Control Panel <b>v<?php echo $_SESSION['VERSION']; ?></b> (code branch <b><?php echo $_SESSION['RELEASE_BRANCH']; ?></b>)
+      </div>
+      <div style="margin-top: 4px;"><a href="javascript:elementHideShow('banner');">Hide</a></div>
+    </div>
+  <?}?>
+  <? if ($_SESSION['RELEASE_BRANCH'] === "beta") { ?>
+    <div class="footer-banner beta" id="banner">
+      <div>
+        <b>Thank you for testing <?=_('Hestia Control Panel')?> v<?=$_SESSION['VERSION']?>!</b><br> Please report any issues that you encounter to our development team on <a href="https://github.com/hestiacp/hestiacp/"><i class="fab fa-github icon-large icon-pad-right"></i>GitHub</a>.
+      </div>
+      <div style="margin-top: 4px;"><a href="javascript:elementHideShow('banner');">Hide</a></div>
+    </div>
+  <?}?>
+  <? if ($_SESSION['user'] === 'admin') {?>
+    <? if ($_SESSION['updateAvailableNotify'] === "yes") { ?>
+      <div class="footer-banner updates" id="banner">
+        <div>
+          <b>New updates are available!</b> To upgrade your server now, run <span style="font-family:'Courier New', Courier, monospace">apt update && apt upgrade</span> from a shell session.
+        </div>
+        <div style="margin-top: 4px;"></div><a href="javascript:elementHideShow('banner');">Hide</a></div>
+      </div>
+    <?}?>
+  <?}?>
   <div title="<?=_('Confirmation')?>" class="confirmation-text-redirect hidden">
     <p class="confirmation"><?=_('LEAVE_PAGE_CONFIRMATION')?></p>
   </div>

Некоторые файлы не были показаны из-за большого количества измененных файлов