Use localStorage to only show 'learn more' banner on first load.

pull/2/head
Kevan Ahlquist 2016-01-10 20:02:04 -06:00
parent 00528edd7c
commit fe7646e939
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ angular.module('dashboard', [])
if (Settings.firstLoad) {
opts.animation = true;
Settings.firstLoad = false;
localStorage.setItem('firstLoad', false);
$('#masthead').show();
setTimeout(function () {

View File

@ -145,12 +145,13 @@ angular.module('dockerui.services', ['ngResource'])
if (DOCKER_PORT) {
url = url + DOCKER_PORT + '\\' + DOCKER_PORT;
}
var firstLoad = (localStorage.getItem('firstLoad') || 'true') === 'true';
return {
displayAll: false,
endpoint: DOCKER_ENDPOINT,
uiVersion: UI_VERSION,
url: url,
firstLoad: true
firstLoad: firstLoad
};
}])
.factory('ViewSpinner', function ViewSpinnerFactory() {