diff options
| author | Adam Soltys <[email protected]> | 2025-05-03 08:48:56 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-05-03 08:48:56 -0700 |
| commit | e28fed9f2243509a8c8c84e836cfa38cbd47a3cf (patch) | |
| tree | 5d0927f5492586c6faf790a54d31b6f1a9eac5b2 /src | |
| parent | 5d4c882cc48bbee005ba65f082ad7bd771070b3d (diff) | |
| download | coinos-ui-e28fed9f2243509a8c8c84e836cfa38cbd47a3cf.tar.gz coinos-ui-e28fed9f2243509a8c8c84e836cfa38cbd47a3cf.zip | |
fund fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/fund/[id]/+page.svelte | 18 | ||||
| -rw-r--r-- | src/routes/(app)/fund/[id]/access/+page.svelte | 3 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/routes/(app)/fund/[id]/+page.svelte b/src/routes/(app)/fund/[id]/+page.svelte index 6cb3b05d..f1a1838e 100644 --- a/src/routes/(app)/fund/[id]/+page.svelte +++ b/src/routes/(app)/fund/[id]/+page.svelte @@ -69,13 +69,15 @@ {/if} </div> - <a - href={`/fund/${id}/access`} - class="btn !w-auto ml-auto text-secondary grow" - > - <iconify-icon icon="ph:gear-bold" width={32}></iconify-icon> - {$t("funds.manage")} - </a> + {#if (user && !managers.length) || managers.some((m) => m.id === user?.id)} + <a + href={`/fund/${id}/access`} + class="btn !w-auto ml-auto text-secondary grow" + > + <iconify-icon icon="ph:gear-bold" width={32}></iconify-icon> + {$t("funds.manage")} + </a> + {/if} </div> <div class="flex flex-wrap gap-2" data-sveltekit-prefetch="off"> <div class="grow"> @@ -87,7 +89,7 @@ </button> </a> </div> - {#if !managers.length || managers.some((m) => m.id === user.id)} + {#if !managers.length || managers.some((m) => m.id === user?.id)} <div class="grow"> <a href={`/fund/${id}/withdraw`}> <button class="btn"> diff --git a/src/routes/(app)/fund/[id]/access/+page.svelte b/src/routes/(app)/fund/[id]/access/+page.svelte index f18d6357..a2ea9dff 100644 --- a/src/routes/(app)/fund/[id]/access/+page.svelte +++ b/src/routes/(app)/fund/[id]/access/+page.svelte @@ -1,5 +1,5 @@ <script> - import { fail, post } from "$lib/utils"; + import { focus, fail, post } from "$lib/utils"; import { enhance } from "$app/forms"; import { t } from "$lib/translations"; import Avatar from "$comp/Avatar.svelte"; @@ -42,6 +42,7 @@ <form method="post" use:enhance class="space-y-2"> <input type="hidden" name="id" value={id} /> <input + use:focus name="username" bind:value={username} placeholder={$t("funds.username")} |
