mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-21 23:24:19 +01:00
Merge pull request #119 from MutinyWallet/small-ui-may-12
Small UI may 12
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { LoadingSpinner, NiceP, SmallAmount, SmallHeader } from './layout';
|
||||
import { For, Match, ParentComponent, Show, Switch, createMemo, createResource, createSignal } from 'solid-js';
|
||||
import { For, Match, ParentComponent, Show, Switch, createEffect, createMemo, createResource, createSignal } from 'solid-js';
|
||||
import { useMegaStore } from '~/state/megaStore';
|
||||
import { MutinyInvoice } from '@mutinywallet/mutiny-wasm';
|
||||
import { JsonModal } from '~/components/JsonModal';
|
||||
@@ -156,7 +156,14 @@ export function CombinedActivity(props: { limit?: number }) {
|
||||
return activity;
|
||||
}
|
||||
|
||||
const [activity] = createResource(getAllActivity);
|
||||
const [activity, { refetch }] = createResource(getAllActivity);
|
||||
|
||||
createEffect(() => {
|
||||
// After every sync we should refetch the activity
|
||||
if (!state.is_syncing) {
|
||||
refetch();
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<Switch>
|
||||
@@ -167,7 +174,7 @@ export function CombinedActivity(props: { limit?: number }) {
|
||||
<NiceP>No activity to show</NiceP>
|
||||
</Match>
|
||||
<Match when={activity.state === "ready" && activity().length >= 0}>
|
||||
<For each={activity()}>
|
||||
<For each={activity.latest}>
|
||||
{(activityItem) =>
|
||||
<Switch>
|
||||
<Match when={activityItem.type === "onchain"}>
|
||||
|
||||
@@ -93,7 +93,7 @@ export default function WaitlistForm() {
|
||||
validate={[required("We need some way to contact you"), email("That doesn't look like an email address to me")]}
|
||||
>
|
||||
{(field, props) => (
|
||||
<TextField {...props} value={field.value} error={field.error} label="Email" placeholder="email@nokycemail.com" />
|
||||
<TextField {...props} value={field.value} error={field.error} type="email" label="Email" placeholder="email@nokycemail.com" />
|
||||
)}
|
||||
</Field>
|
||||
</Match>
|
||||
|
||||
@@ -182,7 +182,7 @@ export default function Receive() {
|
||||
</Card>
|
||||
|
||||
<div class="flex-1" />
|
||||
<Button class="w-full flex-grow-0 mb-4" disabled={!amount() || !selectedValues().length} intent="green" onClick={onSubmit}>Create Invoice</Button>
|
||||
<Button class="w-full flex-grow-0 mb-4" disabled={!amount() || !selectedValues().length} intent="green" onClick={onSubmit}>Create Request</Button>
|
||||
</div>
|
||||
</Match>
|
||||
<Match when={unified() && receiveState() === "show"}>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { TagEditor } from "~/components/TagEditor";
|
||||
import { StringShower } from "~/components/ShareCard";
|
||||
import { AmountCard } from "~/components/AmountCard";
|
||||
import { MutinyTagItem, UNKNOWN_TAG, sortByLastUsed, tagsToIds } from "~/utils/tags";
|
||||
import { BackButton } from "~/components/layout/BackButton";
|
||||
|
||||
type SendSource = "lightning" | "onchain";
|
||||
|
||||
@@ -273,7 +274,9 @@ export default function Send() {
|
||||
<MutinyWalletGuard>
|
||||
<SafeArea>
|
||||
<DefaultMain>
|
||||
<BackLink />
|
||||
<Show when={address() || invoice() || nodePubkey()} fallback={<BackLink />}>
|
||||
<BackButton onClick={() => clearAll()} title="Start Over" />
|
||||
</Show>
|
||||
<LargeHeader>Send Bitcoin</LargeHeader>
|
||||
<FullscreenModal
|
||||
title={sentDetails()?.amount ? "Sent" : "Payment Failed"}
|
||||
|
||||
Reference in New Issue
Block a user