diff --git a/src/app/components/ChatItem.svelte b/src/app/components/ChatItem.svelte index be9658c4..43f0d87f 100644 --- a/src/app/components/ChatItem.svelte +++ b/src/app/components/ChatItem.svelte @@ -7,7 +7,7 @@ import {pubkey, inboxRelaySelectionsByPubkey, loadInboxRelaySelections} from "@welshman/app" import Link from "@lib/components/Link.svelte" import Icon from "@lib/components/Icon.svelte" - import Name from "@app/components/Name.svelte" + import ProfileName from "@app/components/ProfileName.svelte" import ProfileCircle from "@app/components/ProfileCircle.svelte" import ProfileCircles from "@app/components/ProfileCircles.svelte" @@ -35,11 +35,11 @@
{#if others.length === 1} - + {:else}

- + and {others.length - 1} {others.length > 2 ? "others" : "other"}

diff --git a/src/app/components/ProfileList.svelte b/src/app/components/ProfileList.svelte new file mode 100644 index 00000000..dedfdacc --- /dev/null +++ b/src/app/components/ProfileList.svelte @@ -0,0 +1,11 @@ + + +
+ {#each pubkeys as pubkey (pubkey)} + + {/each} +
diff --git a/src/app/components/ProfileMultiSelect.svelte b/src/app/components/ProfileMultiSelect.svelte index a92adb49..a8cf3596 100644 --- a/src/app/components/ProfileMultiSelect.svelte +++ b/src/app/components/ProfileMultiSelect.svelte @@ -8,7 +8,7 @@ import Button from "@lib/components/Button.svelte" import Suggestions from "@lib/editor/Suggestions.svelte" import SuggestionProfile from "@lib/editor/SuggestionProfile.svelte" - import Name from "@app/components/Name.svelte" + import ProfileName from "@app/components/ProfileName.svelte" import ProfileDetail from "@app/components/ProfileDetail.svelte" import {pushDrawer} from "@app/modal" @@ -54,7 +54,7 @@
{/each} diff --git a/src/app/components/Name.svelte b/src/app/components/ProfileName.svelte similarity index 100% rename from src/app/components/Name.svelte rename to src/app/components/ProfileName.svelte diff --git a/src/routes/home/[chat]/+page.svelte b/src/routes/home/[chat]/+page.svelte index d060d265..76cb36e9 100644 --- a/src/routes/home/[chat]/+page.svelte +++ b/src/routes/home/[chat]/+page.svelte @@ -27,12 +27,16 @@ import Spinner from "@lib/components/Spinner.svelte" import PageBar from "@lib/components/PageBar.svelte" import Divider from "@lib/components/Divider.svelte" - import Name from "@app/components/Name.svelte" + import Button from "@lib/components/Button.svelte" + import ProfileName from "@app/components/ProfileName.svelte" import ProfileCircle from "@app/components/ProfileCircle.svelte" import ProfileCircles from "@app/components/ProfileCircles.svelte" + import ProfileDetail from "@app/components/ProfileDetail.svelte" + import ProfileList from "@app/components/ProfileList.svelte" import ChatMessage from "@app/components/ChatMessage.svelte" import ChatCompose from "@app/components/ChannelCompose.svelte" import {deriveChat, splitChatId} from "@app/state" + import {pushModal} from "@app/modal" import {sendWrapped} from "@app/commands" const id = $page.params.chat === "notes" ? $pubkey! : $page.params.chat @@ -47,6 +51,8 @@ const assertNotNil = (x: T | undefined) => x! + const showMembers = () => pushModal(ProfileList, {pubkeys: others}) + const onSubmit = async ({content, ...params}: EventContent) => { const tags = [...params.tags, ...remove($pubkey!, pubkeys).map(tagPubkey)] const template = createEvent(DIRECT_MESSAGE, {content, tags}) @@ -101,14 +107,21 @@
{#if others.length === 1} - - + {@const pubkey = others[0]} + {@const showProfile = () => pushModal(ProfileDetail, {pubkey})} + {:else}

- + and {others.length - 1} {others.length > 2 ? "others" : "other"} +

{/if}