+
Skip to content

Add copy npub button in profile view #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion src/app/shared/PersonName.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
import WotScore from "src/partials/WotScore.svelte"
import {displayPubkey} from "src/domain"
import {userFollows, 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)
Expand All @@ -35,7 +37,12 @@
<div class="flex flex-col overflow-hidden text-ellipsis">
<span class="cy-person-name">{$profileDisplay}</span>
{#if $profileDisplay != npubDisplay}
<small class="text-xs">{npubDisplay}</small>
<div class="flex flex-row items-center text-xs">
<small>{npubDisplay}</small>
{#if displayNpubCopyButton}
<CopyValueSimple class="pl-1" value={pubkey} label={npubDisplay} />
{/if}
</div>
{/if}
</div>
{#if $session}
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/PersonDetail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<div class="flex min-w-0 flex-grow flex-col gap-4">
<div class="flex flex-col">
<div class="flex items-center justify-between gap-4">
<PersonName class="text-2xl" {pubkey} />
<PersonName class="text-2xl" {pubkey} displayNpubCopyButton />
<div class="hidden xs:block">
<PersonActions {pubkey} />
</div>
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载