From 245c9c6f7a522ac7ae4637fa324f28199e5ca69b Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 5 Nov 2024 17:45:20 -0600 Subject: [PATCH] Website: Add ability to directly link to a filtered pricing page view. (#23549) Closes: https://github.com/fleetdm/confidential/issues/8672 Changes: - Updated the pricing page script to switch the pricing table to a different buying mode if a user visits /pricing#it or /pricing#security --- website/assets/js/pages/pricing.page.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/website/assets/js/pages/pricing.page.js b/website/assets/js/pages/pricing.page.js index 37a7118abc..4efd110f4b 100644 --- a/website/assets/js/pages/pricing.page.js +++ b/website/assets/js/pages/pricing.page.js @@ -13,7 +13,17 @@ parasails.registerPage('pricing', { // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ beforeMount: function() { - if(this.primaryBuyingSituation){ + // Switch the pricing features table's mode and show all features if a user visits /pricing#it or /pricing#security + if(window.location.hash){ + if(window.location.hash.toLowerCase() === '#it') { + this.pricingMode = 'IT'; + this.showExpandedTable = true; + } else if(window.location.hash.toLowerCase() === '#security'){ + this.pricingMode = 'Security'; + this.showExpandedTable = true; + } + window.location.hash = ''; + } else if(this.primaryBuyingSituation){ if(['eo-security', 'vm'].includes(this.primaryBuyingSituation)){ this.pricingMode = 'Security'; } else {