diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-24 19:43:06 +0300 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-24 19:43:06 +0300 |
commit | c291de34a179faefa84ea53bee89176a5d380817 (patch) | |
tree | 994d2d5cae0ec6f0902952d215fd657e40450b00 | |
parent | feed670bbdcb81b673de85f3327e0c232c915fd9 (diff) |
Add showEmptyNamespaceAsKey and make <empty> grey
-rw-r--r-- | css/index.css | 4 | ||||
-rw-r--r-- | includes/config.sample.inc.php | 1 | ||||
-rw-r--r-- | index.php | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/css/index.css b/css/index.css index 80ceade..7b898e5 100644 --- a/css/index.css +++ b/css/index.css @@ -44,6 +44,10 @@ margin-top: .05em; cursor: pointer; } +#keys li.empty a { +color: #888; +} + #keys li.current a { background-color: #eee; } diff --git a/includes/config.sample.inc.php b/includes/config.sample.inc.php index e24aa52..10ed201 100644 --- a/includes/config.sample.inc.php +++ b/includes/config.sample.inc.php @@ -38,6 +38,7 @@ $config = array( 'seperator' => ':', + 'showEmptyNamespaceAsKey' => false, // Hide empty databases in the database list (global, valid for all servers unless set at server level) 'hideEmptyDBs' => false, @@ -34,6 +34,10 @@ if($redis) { } $key = explode($server['seperator'], $key); + if ($key[count($key) - 1] == '' && $config['showEmptyNamespaceAsKey']) { + array_pop($key); + $key[count($key) - 1] .= ':'; + } // $d will be a reference to the current namespace. $d = &$namespaces; @@ -98,6 +102,7 @@ if($redis) { if (empty($name) && $name != '0') { $name = '<empty>'; + $class[] = 'empty'; } ?> |