From 1755e3ac8c7b6873be2a49d557073ea185412ba9 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 10 May 2021 13:48:25 +0200 Subject: [PATCH] Show avatar and url in org profile --- public/index.css | 8 +++-- src/Form.svelte | 3 +- src/base/orgs/Profile.svelte | 47 ++++++++++++++++++++++++--- src/base/register/Registration.svelte | 2 ++ 4 files changed, 52 insertions(+), 8 deletions(-) diff --git a/public/index.css b/public/index.css index 54313292a..6abbfa849 100644 --- a/public/index.css +++ b/public/index.css @@ -222,7 +222,7 @@ input.wide { color: var(--color-secondary); } .bold { - font-weight: bold; + font-weight: bold !important; } button.error:hover { @@ -242,15 +242,17 @@ td strong { font-weight: 600; } -h1 { +h1, .title { font-size: 1.75rem; - margin-bottom: 2rem; font-weight: normal; color: var(--color-secondary); text-align: left; text-overflow: ellipsis; overflow-x: hidden; } +h1 { + margin-bottom: 2rem; +} p { margin: 0.5rem 0; diff --git a/src/Form.svelte b/src/Form.svelte index 314863dcc..332d7a5ee 100644 --- a/src/Form.svelte +++ b/src/Form.svelte @@ -2,6 +2,7 @@ export interface Field { name: string value: string | null + label?: string placeholder?: string editable: boolean } @@ -78,7 +79,7 @@
{#each fields as field}
- {capitalize(field.name)} + {field.label || capitalize(field.name)}
{ - navigate("/orgs"); - }; + getRegistration(name, config).then(r => { + registration = r; + }); + + const back = () => navigate("/orgs"); {#await Org.get(address, config)} @@ -38,7 +65,19 @@ {#if org}
-

{address}

+ {#if registration && registration.avatar} +
+ avatar +
+ {:else} +
+ {/if} +
+ {address} + {#if registration && registration.url} + {registration.url} + {/if} +
diff --git a/src/base/register/Registration.svelte b/src/base/register/Registration.svelte index 3845c5c7c..1f02e7567 100644 --- a/src/base/register/Registration.svelte +++ b/src/base/register/Registration.svelte @@ -27,6 +27,8 @@ value: r.owner, editable: false }, { name: "address", placeholder: "Not set", value: r.address, editable: true }, + { name: "url", label: "URL", placeholder: "Not set", + value: r.url, editable: true }, { name: "avatar", placeholder: "Not set", value: r.avatar, editable: true }, { name: "twitter", placeholder: "Not set",