From a60dc2a333c58aa64f2a6194ee2988c6eac4d087 Mon Sep 17 00:00:00 2001 From: Zachary Johnson Date: Sat, 31 Aug 2024 14:52:39 -0400 Subject: [PATCH 1/2] add copy button for npub --- src/app/shared/PersonName.svelte | 9 ++++++++- src/app/views/PersonDetail.svelte | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/shared/PersonName.svelte b/src/app/shared/PersonName.svelte index 899bcb13e..8b0e93703 100644 --- a/src/app/shared/PersonName.svelte +++ b/src/app/shared/PersonName.svelte @@ -20,8 +20,10 @@ import WotScore from "src/partials/WotScore.svelte" import {displayPubkey} from "src/domain" import {userFollows, deriveProfileDisplay, session, maxWot, getWotScore} from "src/engine" + import CopyValueSimple from "src/partials/CopyValueSimple.svelte" export let pubkey + export let displayNpubCopyButton = false const following = derived(userFollows, $m => $m.has(pubkey)) const wotScore = getWotScore($session?.pubkey, pubkey) @@ -34,7 +36,12 @@
{$profileDisplay} {#if $profileDisplay != npubDisplay} - {npubDisplay} +
+ {npubDisplay} + {#if displayNpubCopyButton} + + {/if} +
{/if}
{#if $session} diff --git a/src/app/views/PersonDetail.svelte b/src/app/views/PersonDetail.svelte index d8e10809a..575086e15 100644 --- a/src/app/views/PersonDetail.svelte +++ b/src/app/views/PersonDetail.svelte @@ -71,7 +71,7 @@
- + From b1584a7daf4d9a0242e0df8d783ef6ad3c8bbeb7 Mon Sep 17 00:00:00 2001 From: Zachary Johnson Date: Sat, 31 Aug 2024 16:44:42 -0400 Subject: [PATCH 2/2] small updates to the contributing doc that I noticed seemed out of date --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d04c907b..a66103cdb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,13 +77,13 @@ Enhancement suggestions are tracked as [GitHub issues](/issues). We welcome pull requests. To ensure your pull request is accepted, please follow the guidelines below: -- Base your pull request on an issue that has already been discussed and acknowledged as a problem or desirable enhancement. (ROADMAP.md)[ROADMAP.md] also contains several tasks that have not been put into issues yet. +- Base your pull request on an issue that has already been discussed and acknowledged as a problem or desirable enhancement. - Set your pull request up to merge into the `dev` branch of the upstream repo. - Make sure your pull request passes all checks and follows code style. You can autoformat, lint, and check types using the scripts in package.json. More broadly, code style is generally procedural, with some functional paradigms, using objects mostly as singletons with an initialization step. Try to use (but not over-use) svelte stores, ramda, and hurdak when possible. #### Development and Deployment -To create a working copy, please fork the repository and clone it so that all PRs can go through a review. Run `yarn && yarn dev` to start the dev server, and `yarn run check` to run all checks. Pushes to the `dev` branch are autodeployed via render.com to `dev.coracle.social`. Pushes to `master` are autodeployed via render.com to `app.coracle.social`. +To create a working copy, please fork the repository and clone it so that all PRs can go through a review. Run `npm i && npm run dev` to start the dev server, and `npm run check` to run all checks. Pushes to the `dev` branch are autodeployed via render.com to `dev.coracle.social`. Pushes to `master` are autodeployed via render.com to `app.coracle.social`. ### Project Structure