diff --git a/ssr/public/img/dont_leave_us_gobgob.png b/ssr/public/img/dont_leave_us_gobgob.png new file mode 100644 index 00000000..05db9b81 Binary files /dev/null and b/ssr/public/img/dont_leave_us_gobgob.png differ diff --git a/ssr/src/app.rs b/ssr/src/app.rs index cafe4904..f63c1971 100644 --- a/ssr/src/app.rs +++ b/ssr/src/app.rs @@ -1,3 +1,4 @@ +use crate::page::account_help::AccountHelp; use crate::page::icpump::ai::ICPumpAi; use crate::page::icpump::ICPumpLanding; @@ -148,6 +149,7 @@ pub fn App() -> impl IntoView { + diff --git a/ssr/src/component/menu_item.rs b/ssr/src/component/menu_item.rs new file mode 100644 index 00000000..77c29186 --- /dev/null +++ b/ssr/src/component/menu_item.rs @@ -0,0 +1,37 @@ +use leptos::{component, view, Callback, IntoView}; +use leptos_icons::*; + +#[component] +pub fn MenuLink( + #[prop(into)] text: String, + #[prop(into)] href: String, + #[prop(into)] icon: icondata::Icon, + #[prop(into, optional)] target: String, +) -> impl IntoView { + view! { + +
+ + {text} +
+ +
+ } +} + +#[component] +pub fn MenuButton( + #[prop(into)] text: String, + #[prop(into)] icon: icondata::Icon, + #[prop(into)] on_click: Callback<()>, +) -> impl IntoView { + view! { + + } +} diff --git a/ssr/src/component/mod.rs b/ssr/src/component/mod.rs index 38bd66c1..2c1dee72 100644 --- a/ssr/src/component/mod.rs +++ b/ssr/src/component/mod.rs @@ -14,6 +14,7 @@ pub mod ic_symbol; pub mod infinite_scroller; pub mod loading; pub mod login_modal; +pub mod menu_item; pub mod modal; pub mod nav; pub mod nav_icons; diff --git a/ssr/src/page/account_help.rs b/ssr/src/page/account_help.rs new file mode 100644 index 00000000..14abb2ca --- /dev/null +++ b/ssr/src/page/account_help.rs @@ -0,0 +1,136 @@ +use crate::component::menu_item::{MenuButton, MenuLink}; +use crate::component::overlay::ShadowOverlay; +use crate::component::social::{Discord, IcWebsite, Telegram, Twitter}; +use crate::component::title::Title; +use crate::state::auth::account_connected_reader; +use candid::Principal; +use leptos::*; + +#[derive(Default, Clone, Copy)] +pub struct AuthorizedUserToSeedContent(pub RwSignal>); + +#[component] +fn MenuFooter() -> impl IntoView { + view! { +
+ Follow us on +
+ + + + +
+ + + + + + +
+ } +} + +#[component] +fn ConfirmDeleteModal(#[prop(into)] show: RwSignal) -> impl IntoView { + view! { + +
+

Are you sure you want to delete your account?

+ Yes + +
+
+ } +} + +#[component] +fn ConfirmPermaDeleteModal(#[prop(into)] show: RwSignal) -> impl IntoView { + view! { + +
+

Do you want to permanently delete your account?

+ // might make anchor + +
+
+ } +} + +#[component] +fn DeleteModal( + #[prop(into)] show_self: RwSignal, + #[prop(into)] show_confirm_delete_modal: RwSignal, + #[prop(into)] show_confirm_perma_delete_modal: RwSignal, +) -> impl IntoView { + view! { + +
+
+ +
+

Delete Account

+
Deleting account will keep you away. Once you log in again, your data will be restored.
+
+ + +
+
+ +
+
+
+ } +} + +#[component] +pub fn AccountHelp() -> impl IntoView { + let (is_connected, _) = account_connected_reader(); + let show_delete_modal = create_rw_signal(false); + let show_confirm_delete_modal = create_rw_signal(false); + let show_confirm_perma_delete_modal = create_rw_signal(false); + + view! { + + + + +
+
+ + <div class="flex flex-row justify-center"> + <span class="font-bold text-2xl">Account & Help</span> + </div> + +
+
+ + + + + + +
+ +
+ } +} diff --git a/ssr/src/page/menu.rs b/ssr/src/page/menu.rs index 21e88534..bbad1ac6 100644 --- a/ssr/src/page/menu.rs +++ b/ssr/src/page/menu.rs @@ -1,6 +1,7 @@ use crate::component::canisters_prov::with_cans; use crate::component::canisters_prov::{AuthCansProvider, WithAuthCans}; use crate::component::content_upload::YoutubeUpload; +use crate::component::menu_item::MenuLink; use crate::component::modal::Modal; use crate::component::spinner::Spinner; use crate::component::title::Title; @@ -22,24 +23,6 @@ use yral_canisters_common::utils::profile::ProfileDetails; #[derive(Default, Clone, Copy)] pub struct AuthorizedUserToSeedContent(pub RwSignal>); -#[component] -fn MenuItem( - #[prop(into)] text: String, - #[prop(into)] href: String, - #[prop(into)] icon: icondata::Icon, - #[prop(into, optional)] target: String, -) -> impl IntoView { - view! { - -
- - {text} -
- -
- } -} - #[component] fn MenuFooter() -> impl IntoView { view! { @@ -252,26 +235,21 @@ pub fn Menu() -> impl IntoView {
- - - - + + - - - - - - - // + +
diff --git a/ssr/src/page/mod.rs b/ssr/src/page/mod.rs index 58474ff0..61cd7248 100644 --- a/ssr/src/page/mod.rs +++ b/ssr/src/page/mod.rs @@ -1,4 +1,5 @@ pub mod about_us; +pub mod account_help; pub mod account_transfer; pub mod airdrop; pub mod err;