update about modal to be monospace and have core version

This commit is contained in:
John Mitchell
2017-03-06 11:14:06 -05:00
committed by Matthew Jones
parent 6e586282f5
commit 8f5253014b
3 changed files with 23 additions and 23 deletions

View File

@@ -1,6 +1,16 @@
/** @define About */
@import "./client/src/shared/branding/colors.default.less";
.About-ansibleVersion,
.About-cowsay--code {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
}
.About-ansibleVersion {
color: @default-data-txt;
}
.About-cowsay--container{
width: 340px;
margin: 0 auto;
@@ -25,6 +35,7 @@
.About-brand--redhat{
float: left;
width: 112px;
padding-top: 13px;
}
.About-brand--ansible{
max-width: 120px;

View File

@@ -1,27 +1,12 @@
export default
['$scope', '$state', 'ConfigService', 'i18n',
function($scope, $state, ConfigService, i18n){
var processVersion = function(version){
// prettify version & calculate padding
// e,g 3.0.0-0.git201602191743/ -> 3.0.0
var split = version.split('-')[0];
var spaces = Math.floor((16-split.length)/2),
paddedStr = "";
for(var i=0; i<=spaces; i++){
paddedStr = paddedStr +" ";
}
paddedStr = paddedStr + split;
for(var j = paddedStr.length; j<16; j++){
paddedStr = paddedStr + " ";
}
return paddedStr;
};
var init = function(){
ConfigService.getConfig()
.then(function(config){
$scope.version = config.version.split('-')[0];
$scope.ansible_version = config.ansible_version;
$scope.subscription = config.license_info.subscription_name;
$scope.version = processVersion(config.version);
$scope.version_str = i18n._("Version");
$('#about-modal').modal('show');
});
};

View File

@@ -10,10 +10,9 @@
<div class="About-cowsay--container">
<!-- Don't indent this properly, you'll break the cow -->
<pre class="About-cowsay--code">
________________
/ Tower {{version_str}} \
\<span>{{version}}</span>/
----------------
_______________
< Tower {{version}} >
---------------
\ ^__^
\ (oo)\_______
(__) A )\/\
@@ -23,8 +22,13 @@
</div>
<div class="About-modal--footer">
<img class="About-brand--redhat img-responsive" src="/static/assets/tower-logo-login.svg" />
<p class="text-right">Copyright &copy; 2017 Red Hat, Inc. <br>
Visit <a href="http://www.ansible.com/" target="_blank">Ansible.com</a> for more information.<br>
<p class="text-right">
<span class="About-ansibleVersion">
Ansible {{ ansible_version }}
</span> <br>
Copyright &copy; 2017 Red Hat, Inc. <br>
Visit <a href="http://www.ansible.com/" target="_blank">Ansible.com</a> for more information.<br>
</p>
</div>
</div>
</div>