diff --git a/index.css b/index.css index a4dde3f..8b85934 100644 --- a/index.css +++ b/index.css @@ -2,13 +2,12 @@ @tailwind components; @tailwind utilities; - @font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; - src: url('./assets/fonts/SpaceGrotesk-Variable.ttf') format('truetype'); + src: url("./assets/fonts/SpaceGrotesk-Variable.ttf") format("truetype"); } @font-face { @@ -16,13 +15,39 @@ font-style: normal; font-weight: 100 900; font-display: swap; - src: url('./assets/fonts/Inter-Variable.ttf') format('truetype'); + src: url("./assets/fonts/Inter-Variable.ttf") format("truetype"); } -@layer components { +@layer base { + h1 { + @apply text-2xl md:text-4xl lg:text-5xl; + } + h2 { + @apply text-xl md:text-3xl lg:text-4xl; + } + h3 { + @apply text-lg md:text-2xl lg:text-3xl; + } + h4 { + @apply text-base md:text-xl lg:text-2xl; + } + h5 { + @apply text-sm md:text-lg lg:text-xl; + } + h6 { + @apply text-xs md:text-base lg:text-lg; + } + p { + @apply text-base md:text-lg; + } + button { + @apply text-lg md:text-xl lg:text-2xl; + } +} + +@layer components { .ease { @apply transition duration-300 ease-in-out; } - } diff --git a/src/components/app.rs b/src/components/app.rs index 5055e02..4f7ed90 100644 --- a/src/components/app.rs +++ b/src/components/app.rs @@ -4,6 +4,7 @@ use leptos_meta::{Link, Meta, Title}; use tracing::info; use crate::client::ClientRpc; +use crate::components::create_wallet::CreateWallet; use crate::components::service_worker::ServiceWorker; use crate::components::{Footer, Joined, Logo, SubmitForm, WalletSelector}; use crate::context::provide_client_context; @@ -72,7 +73,7 @@ pub fn App() -> impl IntoView {
-
+
@@ -88,6 +89,9 @@ pub fn App() -> impl IntoView { available=wallets on_select=move |wallet_name| select_wallet_action.dispatch(wallet_name) /> + }.into_view() } else { empty_view().into_view() @@ -100,7 +104,7 @@ pub fn App() -> impl IntoView { when=show_join fallback=|| empty_view() > -

"Join a Federation"

+

"Join a Federation"

impl IntoView { when=show_join_error fallback=|| empty_view() > - {move || view!{
{ + {move || view!{
{ format!("✗ Failed to join federation: {:?}", join_action.value().with(|r| { match r { Some(Err(e)) =>anyhow!("{:?}", e), diff --git a/src/components/balance.rs b/src/components/balance.rs index 25c9789..d742513 100644 --- a/src/components/balance.rs +++ b/src/components/balance.rs @@ -34,8 +34,8 @@ pub fn Balance(#[prop(optional, into)] class: String) -> impl IntoView { view! {
-

"Balance"

-

{balance}

+

"Balance"

+

{balance}

} } diff --git a/src/components/copyable_text.rs b/src/components/copyable_text.rs index 091fe97..8ba2d94 100644 --- a/src/components/copyable_text.rs +++ b/src/components/copyable_text.rs @@ -36,7 +36,7 @@ pub fn CopyableText( let copy = copy.clone(); move |_| copy(text.get().as_str()) } - class="w-full py-3 text-xl bg-blue-500 hover:enabled:bg-blue-600 + class="w-full py-3 bg-blue-500 hover:enabled:bg-blue-600 text-white font-semibold font-body rounded-lg cursor-pointer enabled:ease disabled:opacity-70 disabled:cursor-not-allowed hover:enabled:shadow-lg" > diff --git a/src/components/create_wallet.rs b/src/components/create_wallet.rs new file mode 100644 index 0000000..988d98c --- /dev/null +++ b/src/components/create_wallet.rs @@ -0,0 +1,44 @@ +use leptos::*; + +use crate::components::SubmitForm; +use crate::utils::empty_view; + +#[component] +pub fn CreateWallet(on_select: F) -> impl IntoView +where + F: Fn(String) + 'static + Copy, +{ + let (loading, set_loading) = create_signal(false); + let (show_create_wallet_form, set_show_create_wallet_form) = create_signal(false); + let select = move |name: String| { + set_loading.set(true); + on_select(name); + }; + + view! { +
+ + + + + + +
+ } +} diff --git a/src/components/footer.rs b/src/components/footer.rs index 337d4fc..a43bc19 100644 --- a/src/components/footer.rs +++ b/src/components/footer.rs @@ -6,7 +6,7 @@ use crate::components::LogoFedimint; pub fn Footer(version: &'static str, #[prop(optional, into)] class: String) -> impl IntoView { let version_prefix: &'static str = &version[..7]; view! { -
+
"Webimint version " impl IntoView { ]; view! { -

{federation_label}

+

{federation_label}

- { - items.iter().enumerate().map(|(i, item)| { - view! { -
  • - -
  • - } - }).collect_view() - } - +
      + { + items.iter().enumerate().map(|(i, item)| { + view! { +
    • + +
    • + } + }).collect_view() + } +
    { items.iter().enumerate().map(|(i, item)| { let view = item.view.to_owned(); diff --git a/src/components/ln_receive_form.rs b/src/components/ln_receive_form.rs index efb383f..c5cd1df 100644 --- a/src/components/ln_receive_form.rs +++ b/src/components/ln_receive_form.rs @@ -37,7 +37,7 @@ where impl IntoView { {move || if let Some(result) = submit_action.value().get() { view!( -
    { +
    { match result { Err(error) => view!({format!("✗ Failed to redeem e-cash: {error}")}), Ok(value) => view!({format!("✓ Redeemed {:?} msat", value.msats)}) diff --git a/src/components/send_ln.rs b/src/components/send_ln.rs index b3df59d..5a3e0ac 100644 --- a/src/components/send_ln.rs +++ b/src/components/send_ln.rs @@ -30,7 +30,7 @@ pub fn SendLn() -> impl IntoView { {move || if let Some(result) = submit_action.value().get() { view!( -
    { +
    { match result { Err(error) => view!({format!("✗ Failed to send invoice {error}")}), Ok(_) => view!("✓ Invoice successfully sent") diff --git a/src/components/submit_button.rs b/src/components/submit_button.rs index 30429b1..8c8a3d1 100644 --- a/src/components/submit_button.rs +++ b/src/components/submit_button.rs @@ -19,7 +19,7 @@ where } }) .collect::>(); view! { - + "To switch wallets after selecting one just reload the web app." - "Webimint is a highly experimental Fedimint wallet, use at your own risk. - It's currently compatible with the 0.2 release of Fedimint." + "Webimint is a highly experimental Fedimint wallet, use at your own risk." -

    "Select a wallet:"

    -
      - { available_list } -
    - - + +

    "Select a wallet:"

    +
    +
    + { available_list } +
    } }