From a1894549a2fbf39043556e5907f3468dbb092770 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 3 Nov 2012 19:24:30 -0700 Subject: [PATCH] Improve styling and handling of missing history. --- guacamole/src/main/webapp/index.xhtml | 39 ++++++----- .../src/main/webapp/scripts/interface.js | 66 ++++++++++--------- guacamole/src/main/webapp/styles/login.css | 15 ++++- 3 files changed, 72 insertions(+), 48 deletions(-) diff --git a/guacamole/src/main/webapp/index.xhtml b/guacamole/src/main/webapp/index.xhtml index 87d14ce0a..5474cd775 100644 --- a/guacamole/src/main/webapp/index.xhtml +++ b/guacamole/src/main/webapp/index.xhtml @@ -74,6 +74,7 @@

Recent Connections

+

No recent connections.

Other Connections

@@ -133,16 +134,20 @@ // Remove all rows from connections list var recent_connections = document.getElementById("recent-connections"); var other_connections = document.getElementById("other-connections"); + var no_recent_connections = document.getElementById("no-recent"); // Get thumbnail set from local storage - var thumbnails = {}; - try { - thumbnails = JSON.parse(localStorage.getItem("GUAC_THUMBNAILS")); + if (localStorage) { + var thumbnails = {}; + try { + var thumbnail_json = localStorage.getItem("GUAC_THUMBNAILS"); + if (thumbnail_json) + thumbnails = JSON.parse(thumbnail_json); + } + catch (e) {} } - catch (e) { - } - for (var test in thumbnails) - console.log(test); + else + document.body.className += " history-unavailable"; // Add connection icons for (var i=0; i