notes(shared): show Send button on notes inside shared folders
User report (AR, RH on iPad): no Send button visible inside a shared "desk" folder. The shared-folder view was passing `hideSend` to every NoteCard for editors and rendered no card actions at all for read-only viewers, so nobody could send a note from a shared folder. Changes (artifacts/tx-os/src/pages/notes.tsx, SharedFolderView): - Editors: removed `hideSend` from the NoteCard so the existing Send affordance (and color/labels/archive/delete) appears as it does on the user's own notes. - Read-only viewers: added a small Send icon button to the static card (testid `shared-folder-note-send-<id>`) so they can also send the note via the existing send dialog. The send endpoint authorizes off the authenticated caller, so the note is sent under RH's identity (no server change needed).
This commit is contained in:
@@ -3500,7 +3500,6 @@ function SharedFolderView({
|
||||
labels={labels}
|
||||
onEdit={onEdit}
|
||||
onSend={onSend}
|
||||
hideSend
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
@@ -3515,12 +3514,12 @@ function SharedFolderView({
|
||||
<div
|
||||
key={n.id}
|
||||
data-testid={`shared-folder-note-${n.id}`}
|
||||
className={`text-start break-inside-avoid mb-3 w-full rounded-xl border border-black/5 shadow-sm p-3 ${colorBg(
|
||||
className={`relative text-start break-inside-avoid mb-3 w-full rounded-xl border border-black/5 shadow-sm p-3 ${colorBg(
|
||||
n.color,
|
||||
)}`}
|
||||
>
|
||||
{n.title && (
|
||||
<div className="font-semibold text-sm text-foreground break-words">
|
||||
<div className="font-semibold text-sm text-foreground break-words pe-8">
|
||||
{n.title}
|
||||
</div>
|
||||
)}
|
||||
@@ -3538,6 +3537,18 @@ function SharedFolderView({
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onSend(n);
|
||||
}}
|
||||
className="absolute top-2 end-2 p-1.5 rounded-md bg-white/70 hover:bg-white text-muted-foreground hover:text-primary transition-colors"
|
||||
aria-label={t("notes.send", "Send")}
|
||||
data-testid={`shared-folder-note-send-${n.id}`}
|
||||
>
|
||||
<Send size={15} />
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user