Skip to content

Commit

Permalink
Add redirection to main app, closes #107 (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
ail3ngrimaldi authored Oct 25, 2024
1 parent 2eeeaa8 commit afcc72f
Showing 1 changed file with 33 additions and 21 deletions.
54 changes: 33 additions & 21 deletions src/pages/onboarding.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
components::{
atoms::{
button::Variant, dropdown::ElementSize, ArrowLeft, ArrowRight, Button, Icon, VirtoLogo,
button::Variant, dropdown::ElementSize, ArrowLeft, ArrowRight, Button, Icon, IconButton, VirtoLogo
},
molecules::{OnboardingBasics, OnboardingInvite, OnboardingManagement},
},
Expand Down Expand Up @@ -100,13 +100,20 @@ pub fn Onboarding() -> Element {
div { class: "row",
div { class: "onboarding__form",
div { class: "form__wrapper",
Icon {
icon: VirtoLogo,
height: 64,
width: 64,
stroke_width: 1,
fill: "var(--color-lavanda-400)"
IconButton {
on_click: move |_| {
nav.push(vec![], "/");
},
body: rsx! {
Icon {
icon: VirtoLogo,
height: 64,
width: 64,
stroke_width: 1,
fill: "var(--color-lavanda-400)"
}
}
}
div { class: "progress progress--steps",
button {
class: "step",
Expand Down Expand Up @@ -172,10 +179,15 @@ pub fn Onboarding() -> Element {
}
},
status: None,
left_icon: rsx!(
Icon { icon : ArrowLeft, height : 32, width : 32, stroke_width : 1, fill :
"var(--text-primary)" }
)
left_icon: rsx! {
Icon {
icon: ArrowLeft,
height: 32,
width: 32,
stroke_width: 1,
fill: "var(--text-primary)"
}
}
}
}
if !matches!(onboarding_step(), OnboardingStep::Invite) {
Expand All @@ -201,10 +213,9 @@ pub fn Onboarding() -> Element {
};
},
status: None,
right_icon: rsx!(
Icon { icon : ArrowRight, height : 32, width : 32, stroke_width : 1, fill :
"var(--white)" }
)
right_icon: rsx! {
Icon { icon: ArrowRight, height: 32, width: 32, stroke_width: 1, fill: "var(--white)" }
}
}
} else {
Button {
Expand Down Expand Up @@ -341,20 +352,21 @@ pub fn Onboarding() -> Element {
};
},
status: None,
right_icon: rsx!(
Icon { icon : ArrowRight, height : 32, width : 32, stroke_width : 1, fill :
"var(--white)" }
)
right_icon: rsx! {
Icon { icon: ArrowRight, height: 32, width: 32, stroke_width: 1, fill: "var(--white)" }
}
}
}
}
}
div { class: "onboarding__image",
img { src: match *onboarding_step.read() {
img {
src: match *onboarding_step.read() {
OnboardingStep::Basics => "images/window.png",
OnboardingStep::Management => "images/phone.png",
OnboardingStep::Invite => "images/faces.png",
} }
}
}
}
}
}
Expand Down

0 comments on commit afcc72f

Please sign in to comment.