Skip to content

Commit

Permalink
adds card creator in details view
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed Jan 9, 2024
1 parent d24974b commit cf29d40
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 6 additions & 2 deletions ui/src/Avatar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { getContext } from "svelte";
import type { KanDoStore } from "./store";
import SvgIcon from "./SvgIcon.svelte";
import "@shoelace-style/shoelace/dist/components/skeleton/skeleton.js";
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
Expand All @@ -26,8 +27,11 @@
<div class="avatar-{namePosition}"
>
{#if $profile.status == "pending"}
( ? )
{:else if $profile.status == "complete"}
<sl-skeleton
effect="pulse"
style={`height: ${size}px; width: ${size}px;`}
></sl-skeleton>
{:else if $profile.status == "complete"}

{#if showAvatar}
{#if placeholder && !$profile.value.entry.fields.avatar}
Expand Down
7 changes: 6 additions & 1 deletion ui/src/CardDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,12 @@
</div>
</div>
</div>
<div class="belongs-to">In column <strong>{store.getCardGroupName(cardId, $state)}</strong></div>
<div class="belongs-to" style="display:flex; align-items: center;">
<div >In column <strong>{store.getCardGroupName(cardId, $state)}</strong></div>
{#if card && card.creator}
<div style="margin-left:20px;margin-right:5px;">Created by:</div><Avatar size={20} agentPubKey={decodeHashFromBase64(card.creator)}/>
{/if}
</div>
{#if editingDescription}
<sl-textarea id="edit-desc" use:doFocus bind:this={editDescriptionElement} rows=10 class='textarea' value={editDesc}
on:sl-input={e=>{
Expand Down
3 changes: 2 additions & 1 deletion ui/src/KanDoPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
const card:Card = {
id: uuidv1(),
comments: {},
checklists: {},
checklists: {},
creator: store.myAgentPubKeyB64,
props,
};
activeBoard.requestChanges([{ type: "add-card", value: card, group: column}]);
Expand Down
1 change: 1 addition & 0 deletions ui/src/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type Card = {
props: CardProps;
comments: Comments
checklists: Checklists
creator: AgentPubKeyB64
};

export const UngroupedId = "_"
Expand Down

0 comments on commit cf29d40

Please sign in to comment.