mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
cloud_api_types: Add ZedVip variant to Plan (#59443)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
This PR adds a new `ZedVip` variant to the `Plan` enum. Closes CLO-881. Release Notes: - N/A
This commit is contained in:
parent
080838387a
commit
69b602c797
9 changed files with 46 additions and 0 deletions
1
assets/images/vip_stamp.svg
Normal file
1
assets/images/vip_stamp.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.9 KiB |
|
|
@ -506,6 +506,7 @@ impl AgentConfiguration {
|
|||
Plan::ZedProTrial => ("Pro Trial", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedPro => ("Pro", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedBusiness => ("Business", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedVip => ("VIP", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedStudent => ("Student", Color::Accent, pro_chip_bg),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,13 @@ impl ZedAiOnboarding {
|
|||
)
|
||||
}
|
||||
|
||||
fn vip_stamp(cx: &App) -> impl IntoElement {
|
||||
div().absolute().bottom_1().right_1().child(
|
||||
Vector::new(VectorName::VipStamp, rems_from_px(156.), rems_from_px(60.))
|
||||
.color(Color::Custom(cx.theme().colors().text.alpha(0.8))),
|
||||
)
|
||||
}
|
||||
|
||||
fn student_stamp(cx: &App) -> impl IntoElement {
|
||||
div().absolute().bottom_1().right_1().child(
|
||||
Vector::new(
|
||||
|
|
@ -332,6 +339,23 @@ impl ZedAiOnboarding {
|
|||
.into_any_element()
|
||||
}
|
||||
|
||||
fn render_vip_plan_state(&self, cx: &mut App) -> AnyElement {
|
||||
v_flex()
|
||||
.w_full()
|
||||
.relative()
|
||||
.gap_1()
|
||||
.child(Self::vip_stamp(cx))
|
||||
.child(Headline::new("Welcome to Zed VIP"))
|
||||
.child(
|
||||
Label::new("Here's what you get:")
|
||||
.color(Color::Muted)
|
||||
.mb_2(),
|
||||
)
|
||||
.child(PlanDefinitions.vip_plan())
|
||||
.children(self.render_dismiss_button())
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
fn render_student_plan_state(&self, cx: &mut App) -> AnyElement {
|
||||
v_flex()
|
||||
.w_full()
|
||||
|
|
@ -359,6 +383,7 @@ impl RenderOnce for ZedAiOnboarding {
|
|||
Some(Plan::ZedProTrial) => self.render_trial_state(cx),
|
||||
Some(Plan::ZedPro) => self.render_pro_plan_state(cx),
|
||||
Some(Plan::ZedBusiness) => self.render_business_plan_state(cx),
|
||||
Some(Plan::ZedVip) => self.render_vip_plan_state(cx),
|
||||
Some(Plan::ZedStudent) => self.render_student_plan_state(cx),
|
||||
}
|
||||
} else {
|
||||
|
|
@ -436,6 +461,10 @@ impl Component for ZedAiOnboarding {
|
|||
"Business Plan",
|
||||
onboarding(SignInStatus::SignedIn, Some(Plan::ZedBusiness), false),
|
||||
),
|
||||
single_example(
|
||||
"VIP Plan",
|
||||
onboarding(SignInStatus::SignedIn, Some(Plan::ZedVip), false),
|
||||
),
|
||||
single_example(
|
||||
"Student Plan",
|
||||
onboarding(SignInStatus::SignedIn, Some(Plan::ZedStudent), false),
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ impl PlanDefinitions {
|
|||
.child(ListBulletItem::new("Usage-based billing"))
|
||||
}
|
||||
|
||||
pub fn vip_plan(&self) -> impl IntoElement {
|
||||
List::new()
|
||||
.child(ListBulletItem::new("Unlimited edit predictions"))
|
||||
.child(ListBulletItem::new("Tokens in the Zed agent"))
|
||||
}
|
||||
|
||||
pub fn student_plan(&self) -> impl IntoElement {
|
||||
List::new()
|
||||
.child(ListBulletItem::new("Unlimited edit predictions"))
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ pub enum Plan {
|
|||
ZedPro,
|
||||
ZedProTrial,
|
||||
ZedBusiness,
|
||||
ZedVip,
|
||||
ZedStudent,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -439,6 +439,11 @@ impl RenderOnce for ZedAiConfiguration {
|
|||
},
|
||||
true,
|
||||
),
|
||||
Some(Plan::ZedVip) => (
|
||||
"You have access to Zed's hosted models through your VIP subscription.",
|
||||
true,
|
||||
),
|
||||
|
||||
Some(Plan::ZedFree) | None => (
|
||||
if self.eligible_for_trial {
|
||||
"Subscribe for access to Zed's hosted models. Start with a 14 day free trial."
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ impl Onboarding {
|
|||
Some(Plan::ZedPro) => "pro",
|
||||
Some(Plan::ZedProTrial) => "trial",
|
||||
Some(Plan::ZedBusiness) => "business",
|
||||
Some(Plan::ZedVip) => "vip",
|
||||
Some(Plan::ZedStudent) => "student",
|
||||
Some(Plan::ZedFree) | None => "free",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ impl RenderOnce for PlanChip {
|
|||
Plan::ZedProTrial => ("Pro Trial", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedPro => ("Pro", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedBusiness => ("Business", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedVip => ("VIP", Color::Accent, pro_chip_bg),
|
||||
Plan::ZedStudent => ("Student", Color::Accent, pro_chip_bg),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use crate::traits::transformable::Transformable;
|
|||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum VectorName {
|
||||
BusinessStamp,
|
||||
VipStamp,
|
||||
Grid,
|
||||
ProTrialStamp,
|
||||
ProUserStamp,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue