Skip to content
9 changes: 9 additions & 0 deletions app/src/pricing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ impl PricingInfoModel {
.find(|p| &p.plan == plan)
}

/// Returns the pricing data for all known plans, or an empty slice if
/// pricing information has not yet been fetched from the server.
pub fn plans(&self) -> &[PlanPricing] {
self.pricing_info
.as_ref()
.map(|info| info.plans.as_slice())
.unwrap_or(&[])
}

/// Returns the overage cost in dollars (converted from cents).
#[allow(dead_code)]
pub fn overage_cost_dollars(&self) -> Option<f64> {
Expand Down
5 changes: 5 additions & 0 deletions app/src/settings_view/admin_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ impl AdminActions {
pub fn contact_support(ctx: &mut AppContext) {
ctx.open_url("mailto:support@warp.dev");
}

/// Open the contact sales page
pub fn contact_sales(ctx: &mut AppContext) {
ctx.open_url("https://warp.dev/contact-sales");
}
}

#[cfg(test)]
Expand Down
Loading
Loading