]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Limit fallback error width to window width
authorPierre Ossman <ossman@cendio.se>
Thu, 2 Mar 2017 13:21:29 +0000 (14:21 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 27 Mar 2017 14:29:38 +0000 (16:29 +0200)
Change the layout a bit to make sure the entire message can be read.

app/styles/base.css
vnc.html

index f7c5de4bbb97b828f890cdcf8878c2d677fdd9de..ce31cf7edbde65475776fdf8a13cce664fd0f7dd 100644 (file)
@@ -216,18 +216,21 @@ select:active {
  */
 
 #noVNC_fallback_error {
-  position: fixed;
   z-index: 1000;
-  left: 50%;
-  transform: translate(-50%, -50px);
-  transition: 0.5s ease-in-out;
-
   visibility: hidden;
-  opacity: 0;
+}
+#noVNC_fallback_error.noVNC_open {
+  visibility: visible;
+}
 
-  top: 60px;
+#noVNC_fallback_error > div {
+  max-width: 90%;
   padding: 15px;
-  width: auto;
+
+  transition: 0.5s ease-in-out;
+
+  transform: translateY(-50px);
+  opacity: 0;
 
   text-align: center;
   font-weight: bold;
@@ -237,9 +240,8 @@ select:active {
   box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
   background: rgba(200,55,55,0.8);
 }
-#noVNC_fallback_error.noVNC_open {
-  transform: translate(-50%, 0);
-  visibility: visible;
+#noVNC_fallback_error.noVNC_open > div {
+  transform: translateY(0);
   opacity: 1;
 }
 
index 02fe5c69b2bfe3ea5ed5fe5bf3e1d2d329ba9de5..b96b0aa1b2862c22a85e50959922fae82e2b6805 100644 (file)
--- a/vnc.html
+++ b/vnc.html
 
 <body>
 
-    <div id="noVNC_fallback_error">
-        <div>noVNC encountered an error:</div>
-        <br>
-        <div id="noVNC_fallback_errormsg"></div>
+    <div id="noVNC_fallback_error" class="noVNC_center">
+        <div>
+            <div>noVNC encountered an error:</div>
+            <br>
+            <div id="noVNC_fallback_errormsg"></div>
+        </div>
     </div>
 
     <!-- noVNC Control Bar -->