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
This commit is contained in:
Eric 2024-11-05 17:45:20 -06:00 committed by GitHub
parent ea8b58a356
commit 245c9c6f7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {