diff --git a/public/elevations.css b/public/elevations.css index e7a3ab5f4..20e595bb2 100644 --- a/public/elevations.css +++ b/public/elevations.css @@ -1,11 +1,11 @@ :root { --elevation-low: 0px 16px 32px 32px #00000070; - --elevation-high: 0px 8px 64px var(--color-secondary-5); - --elevation-high-negative: 0px 8px 64px var(--color-negative-5); + --elevation-high: 0px 0px 1px var(--color-secondary), + 0px 8px 64px var(--color-secondary-5); } [data-theme="light"] { --elevation-low: 0px 16px 32px 16px #00000020; - --elevation-high: 0px 8px 64px var(--color-secondary-5); - --elevation-high-negative: 0px 8px 64px var(--color-negative-5); + --elevation-high: 0px 0px 1px var(--color-secondary), + 0px 8px 64px var(--color-secondary-3); } diff --git a/public/index.css b/public/index.css index 4227b2e07..0fd76dd35 100644 --- a/public/index.css +++ b/public/index.css @@ -17,8 +17,6 @@ --button-small-height: 2rem; --button-tiny-height: 1.5rem; - --glow: var(--color-secondary-3); - --glow-error: var(--color-negative-3); --header-gradient: linear-gradient( 180deg, var(--color-secondary-3) 0%, diff --git a/public/typography.css b/public/typography.css index 6b3ad54c7..06390ae71 100644 --- a/public/typography.css +++ b/public/typography.css @@ -77,7 +77,8 @@ --font-size-regular: 1rem; --font-size-medium: 1.25rem; --font-size-large: 1.75rem; - --font-size-huge: 2rem; + --font-size-x-large: 2rem; + --font-size-xx-large: 3rem; } [data-codefont="system"] { @@ -124,7 +125,10 @@ p { font-size: var(--font-size-large); } .txt-huge { - font-size: var(--font-size-huge); + font-size: var(--font-size-x-large); +} +.txt-humongous { + font-size: var(--font-size-xx-large); } .txt-monospace { diff --git a/src/App.svelte b/src/App.svelte index 0bdaf9b5e..ad819753c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,16 +4,17 @@ import { Connection, state, session } from "@app/lib/session"; import { getWallet } from "@app/lib/wallet"; import { initialize, activeRouteStore } from "@app/lib/router"; - import { twemoji, unreachable } from "@app/lib/utils"; + import { unreachable } from "@app/lib/utils"; - import ColorPalette from "./App/ColorPalette.svelte"; import Header from "./App/Header.svelte"; + import ModalPortal from "./App/ModalPortal.svelte"; + import Hotkeys from "./App/Hotkeys.svelte"; import Loading from "@app/components/Loading.svelte"; - import Modal from "@app/components/Modal.svelte"; import NotFound from "@app/components/NotFound.svelte"; + import Error from "@app/components/Error.svelte"; - import Faucet from "@app/views/faucet/Routes.svelte"; + import Faucet from "@app/views/faucet/Faucet.svelte"; import Home from "@app/views/home/Index.svelte"; import Profile from "@app/views/profiles/Profile.svelte"; import Projects from "@app/views/projects/View.svelte"; @@ -46,16 +47,6 @@ } return wallet; }); - - function handleKeydown(event: KeyboardEvent) { - if (event.key === "Enter") { - const elems = document.querySelectorAll("button.primary"); - if (elems.length === 1) { - // We only allow this when there's one primary button. - elems[0].click(); - } - } - } - Radicle + + +
{#await loadWallet} -
{:then wallet} -
{#if $activeRouteStore.resource === "home"} {:else if $activeRouteStore.resource === "faucet"} - + {:else if $activeRouteStore.resource === "seeds"} {:else if $activeRouteStore.resource === "registrations"} - + {:else if $activeRouteStore.resource === "vesting"} {:else if $activeRouteStore.resource === "projects"} @@ -113,23 +98,18 @@ addressOrName={$activeRouteStore.params.addressOrName} {wallet} /> {:else if $activeRouteStore.resource === "404"} - +
+ +
{:else} {unreachable($activeRouteStore)} {/if}
{:catch err} -
- - -
👻
-
Error connecting to network
-
- - - {err.message ? err.message : JSON.stringify(err)} - -
+
+
{/await}
diff --git a/src/App/ColorPalette.svelte b/src/App/ColorPalette.svelte index 877e98671..968aeffa9 100644 --- a/src/App/ColorPalette.svelte +++ b/src/App/ColorPalette.svelte @@ -1,4 +1,6 @@ - - -{#if show} + -
(checkers = !checkers)}> -
- {#each colorGroups as colorGroup} -
- {#each colors.filter(color => { - return color.match(`--color-${colorGroup}`); - }) as color} -
-
-
- {/each} -
- {/each} +
+
(checkers = !checkers)}> +
+ {#each colorGroups as colorGroup} +
+ {#each colors.filter(color => { + return color.match(`--color-${colorGroup}`); + }) as color} +
+
+
+ {/each} +
+ {/each} +
-{/if} + diff --git a/src/App/Header.svelte b/src/App/Header.svelte index ff94198d1..f99a47d86 100644 --- a/src/App/Header.svelte +++ b/src/App/Header.svelte @@ -1,6 +1,5 @@ - - dispatch("close")} /> - - - ️🔍 - -

- - Results for {query} - -

-
- + + {#if results.projects.length > 0} -

Projects

+
Projects
    {#each results.projects as project}
  • {/if} {#if results.profiles.length > 0} -

    ENS names

    +
    ENS names
      {#each results.profiles as profile}
    • @@ -81,9 +70,4 @@
    {/if} - - - diff --git a/src/App/HelpModal.svelte b/src/App/HelpModal.svelte new file mode 100644 index 000000000..89faca922 --- /dev/null +++ b/src/App/HelpModal.svelte @@ -0,0 +1,79 @@ + + + + + +
    +
    +
    +
    +
    ?
    +
    Shortcuts
    +
    + +
    +
    /
    +
    Search
    +
    + + {#if import.meta.env.DEV} +
    +
    d
    +
    Color palette
    +
    + {/if} +
    + +
    +
    +
    enter
    +
    Submit
    +
    + +
    +
    esc
    +
    Close
    +
    +
    +
    +
    +
    diff --git a/src/App/Hotkeys.svelte b/src/App/Hotkeys.svelte new file mode 100644 index 000000000..2481cd768 --- /dev/null +++ b/src/App/Hotkeys.svelte @@ -0,0 +1,35 @@ + + + diff --git a/src/App/ModalPortal.svelte b/src/App/ModalPortal.svelte new file mode 100644 index 000000000..f38cadfa7 --- /dev/null +++ b/src/App/ModalPortal.svelte @@ -0,0 +1,41 @@ + + + + +{#if $modalStore} +
    + +
    +
    + +
    +
    +{/if} diff --git a/src/components/Button.svelte b/src/components/Button.svelte index 2652b6c0d..970fa270e 100644 --- a/src/components/Button.svelte +++ b/src/components/Button.svelte @@ -8,6 +8,7 @@ | "text"; export let size: "tiny" | "small" | "regular" = "regular"; + export let autofocus: boolean = false; export let disabled: boolean = false; export let waiting: boolean = false; export let style: string | undefined = undefined; @@ -112,10 +113,12 @@ } + - -
    - -
diff --git a/src/components/Connect/ConnectWalletModal.svelte b/src/components/Connect/ConnectWalletModal.svelte new file mode 100644 index 000000000..35f45c1c3 --- /dev/null +++ b/src/components/Connect/ConnectWalletModal.svelte @@ -0,0 +1,72 @@ + + + + + { + state.connectMetamask(wallet); + }, + props: { + variant: "secondary", + size: "small", + disabled: !wallet.metamask.signer, + }, + }} + closeAction={{ + callback: onClose, + props: { size: "small" }, + }}> +
+
+ Scan the QR code with WalletConnect + or use + Metamask + . +
+
+ +
+
+
+ {@html svgString} +
+
+
+
diff --git a/src/components/Emoji.svelte b/src/components/Emoji.svelte new file mode 100644 index 000000000..c6d4c2f8e --- /dev/null +++ b/src/components/Emoji.svelte @@ -0,0 +1,16 @@ + + +{@html twemoji.parse(emoji, { + base, + folder: "twemoji", + ext: ".svg", + className: "txt-emoji", +})} diff --git a/src/components/Error.svelte b/src/components/Error.svelte new file mode 100644 index 000000000..ddf89f8b6 --- /dev/null +++ b/src/components/Error.svelte @@ -0,0 +1,35 @@ + + + + +
+
{emoji}
+
{title}
+
{message}
+
diff --git a/src/components/ErrorModal.svelte b/src/components/ErrorModal.svelte index 1d6ee3752..c61347b67 100644 --- a/src/components/ErrorModal.svelte +++ b/src/components/ErrorModal.svelte @@ -1,51 +1,83 @@ - - - - {#if emoji} -
{emoji}
- {/if} - {title} -
+ - - - - - -
+{#if error} + +
{caption}
+
+
+ +
+ +
+
+ {error} +
+
+
+
+{:else} + +
{caption}
+
+{/if} diff --git a/src/components/Markdown.svelte b/src/components/Markdown.svelte index 84fc5af4a..77e2e7477 100644 --- a/src/components/Markdown.svelte +++ b/src/components/Markdown.svelte @@ -121,7 +121,7 @@ } .markdown :global(h1) { - font-size: calc(var(--font-size-huge) * 0.75); + font-size: calc(var(--font-size-x-large) * 0.75); font-weight: var(--font-weight-medium); padding: 1rem 0 0.5rem 0; margin: 0 0 0.75rem; diff --git a/src/components/Message.svelte b/src/components/Message.svelte index 9f1b35f22..1a702bfdd 100644 --- a/src/components/Message.svelte +++ b/src/components/Message.svelte @@ -9,7 +9,7 @@ .message-error { color: var(--color-negative); border-radius: var(--border-radius); - background-color: var(--glow-error); + background-color: var(--color-negative-3); } diff --git a/src/components/Modal.svelte b/src/components/Modal.svelte index 9a0528d71..77503100d 100644 --- a/src/components/Modal.svelte +++ b/src/components/Modal.svelte @@ -1,35 +1,47 @@ + + -{#if floating} -
-{/if} - -
-