tazpanel rev 470

settings.cgi: hide empty output of the `who` and `last` (in the Live CD/USB mode).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Apr 28 18:19:43 2015 +0300 (2015-04-28)
parents c65bbbb1b0e1
children 4ad87af96a43
files settings.cgi styles/default/base.css
line diff
     1.1 --- a/settings.cgi	Mon Apr 27 00:16:35 2015 +0200
     1.2 +++ b/settings.cgi	Tue Apr 28 18:19:43 2015 +0300
     1.3 @@ -286,19 +286,27 @@
     1.4  		</footer>
     1.5  	</form>
     1.6  </section>
     1.7 +EOT
     1.8  
     1.9 -
    1.10 +		# `who` output is empty in the Live mode
    1.11 +		if [ -n "$(who)" ]; then
    1.12 +			cat <<EOT
    1.13  <section>
    1.14  	<header>$(_ 'Current user sessions')</header>
    1.15  	<pre>$(who)</pre>
    1.16  </section>
    1.17 +EOT
    1.18 +		fi
    1.19  
    1.20 -
    1.21 +		# `last` output is empty (just header) in the Live mode
    1.22 +		if [ "$(last | wc -l)" != "1" ]; then
    1.23 +			cat <<EOT
    1.24  <section>
    1.25  	<header>$(_ 'Last user sessions')</header>
    1.26  	<div class="scroll"><pre>$(last)</pre></div>
    1.27  </section>
    1.28  EOT
    1.29 +		fi
    1.30  		;;
    1.31  
    1.32  
     2.1 --- a/styles/default/base.css	Mon Apr 27 00:16:35 2015 +0200
     2.2 +++ b/styles/default/base.css	Tue Apr 28 18:19:43 2015 +0300
     2.3 @@ -139,7 +139,7 @@
     2.4  	display: table; width: 100%;
     2.5  	border-radius: 0.3rem 0.3rem 0 0;
     2.6  	font-weight: bold; font-size: 1.1rem;/* line-height: 0;*/
     2.7 -	text-shadow: 0 1px 1px hsla(0, 0%, 0%, 0.5);
     2.8 +	text-shadow: 0 1px 1px hsla(0, 0%, 0%, 0.2);
     2.9  	overflow: auto; /* provide break after floated objects */
    2.10  	vertical-align: baseline;
    2.11  }