From fe7646e939623eee73eb7f4911c386814bd9df88 Mon Sep 17 00:00:00 2001 From: Kevan Ahlquist Date: Sun, 10 Jan 2016 20:02:04 -0600 Subject: [PATCH] Use localStorage to only show 'learn more' banner on first load. --- app/components/dashboard/dashboardController.js | 1 + app/shared/services.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/dashboard/dashboardController.js b/app/components/dashboard/dashboardController.js index 07646c007..e5863dc59 100644 --- a/app/components/dashboard/dashboardController.js +++ b/app/components/dashboard/dashboardController.js @@ -21,6 +21,7 @@ angular.module('dashboard', []) if (Settings.firstLoad) { opts.animation = true; Settings.firstLoad = false; + localStorage.setItem('firstLoad', false); $('#masthead').show(); setTimeout(function () { diff --git a/app/shared/services.js b/app/shared/services.js index e3e73a480..f2b9da742 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -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() {