diff --git a/website/assets/js/pages/entrance/login.page.js b/website/assets/js/pages/entrance/login.page.js index cecf09d412..c31e25faac 100644 --- a/website/assets/js/pages/entrance/login.page.js +++ b/website/assets/js/pages/entrance/login.page.js @@ -25,17 +25,6 @@ parasails.registerPage('login', { // Server error state for the form cloudError: '', showCustomerLogin: true, - - // For redirecting users who come to this page from a /try-fleet/explore-data/* page back to the page they were visiting before they were redirected. - exploreDataRedirectSlug: undefined, - // Used for the 'create an account' link - registrationSlug: '/register', - // Possible /try-fleet/explore-data/ redirects - redirectSlugsByTargetPlatform: { - 'macos': 'macos/account_policy_data', - 'windows': 'windows/appcompat_shims', - 'linux': 'linux/apparmor_events', - }, }, // ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗ @@ -45,18 +34,6 @@ parasails.registerPage('login', { if(window.location.search === '?admin') { this.showCustomerLogin = false; } - // If the user navigated to this page from an /explore-data page, we'll keep track of the page this user came from so we can redirect them, and we'll strip all query parameters from the URL. - if(window.location.search) { - // https://caniuse.com/mdn-api_urlsearchparams_get - let possibleSearchParamsToFilterBy = new URLSearchParams(window.location.search); - let posibleRedirect = possibleSearchParamsToFilterBy.get('targetPlatform'); - // If the provided platform matches a key in the userFriendlyPlatformNames array, we'll set this.selectedPlatform. - if(posibleRedirect && this.redirectSlugsByTargetPlatform[posibleRedirect] !== undefined){ - this.registrationSlug +=`?targetPlatform=${posibleRedirect}`; - this.exploreDataRedirectSlug = `/try-fleet/explore-data/${this.redirectSlugsByTargetPlatform[posibleRedirect]}`; - } - window.history.replaceState({}, document.title, '/login' ); - } }, mounted: async function() { //… @@ -68,16 +45,11 @@ parasails.registerPage('login', { methods: { submittedForm: async function() { - // Redirect to the logged-in dashboard on success. + // Redirect to the /start page on success. // > (Note that we re-enable the syncing state here. This is on purpose-- // > to make sure the spinner stays there until the page navigation finishes.) this.syncing = true; - if(this.exploreDataRedirectSlug){ - window.location = this.exploreDataRedirectSlug; - } else { - window.location = '/start'; - } - + window.location = '/start'; }, } diff --git a/website/assets/js/pages/entrance/signup.page.js b/website/assets/js/pages/entrance/signup.page.js index d527b084a1..1528c7d780 100644 --- a/website/assets/js/pages/entrance/signup.page.js +++ b/website/assets/js/pages/entrance/signup.page.js @@ -25,31 +25,15 @@ parasails.registerPage('signup', { cloudError: '', // For displaying the full signup form. showFullForm: false, - exploreDataRedirectSlug: undefined, - // Used for the 'I have an account' link - loginSlug: '/login', - // Possible /try-fleet/explore-data/ redirects - redirectSlugsByTargetPlatform: { - 'macos': 'macos/account_policy_data', - 'windows': 'windows/appcompat_shims', - 'linux': 'linux/apparmor_events', - }, }, // ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗ // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ beforeMount: function() { - // If the user navigated to this page from an /explore-data page, we'll keep track of the page this user came from so we can redirect them, and we'll strip all query parameters from the URL. + // Removing the query string for users redirected to this page by the /try-fleet/explore-data pages. + // FUTURE: remove this when that view-query-report is updated. if(window.location.search){ - // https://caniuse.com/mdn-api_urlsearchparams_get - let possibleSearchParamsToFilterBy = new URLSearchParams(window.location.search); - let posibleRedirect = possibleSearchParamsToFilterBy.get('targetPlatform'); - // If the provided platform matches a key in the userFriendlyPlatformNames array, we'll set this.selectedPlatform. - if(posibleRedirect && this.redirectSlugsByTargetPlatform[posibleRedirect] !== undefined){ - this.loginSlug +=`?targetPlatform=${posibleRedirect}`; - this.exploreDataRedirectSlug = `/try-fleet/explore-data/${this.redirectSlugsByTargetPlatform[posibleRedirect]}`; - } window.history.replaceState({}, document.title, '/register' ); } }, @@ -81,11 +65,7 @@ parasails.registerPage('signup', { // > (Note that we re-enable the syncing state here. This is on purpose-- // > to make sure the spinner stays there until the page navigation finishes.) this.syncing = true; - if(this.exploreDataRedirectSlug){ - window.location = this.exploreDataRedirectSlug; - } else { - window.location = '/start'; - } + window.location = '/start'; } diff --git a/website/views/pages/entrance/login.ejs b/website/views/pages/entrance/login.ejs index 489e87bbab..0f38e452bc 100644 --- a/website/views/pages/entrance/login.ejs +++ b/website/views/pages/entrance/login.ejs @@ -1,7 +1,7 @@
-

Welcome to Premium

+

Welcome to Fleet

We just need a few details in order to get started.

@@ -12,7 +12,7 @@
-

This email is already linked to a Fleet account.
Please sign in with your email and password.

+

This email is already linked to a Fleet account.
Please sign in with your email and password.

Please enter a valid work email address