Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(call): use profile overlay (#3940)

Will Hutchinsonda8ef882bc76
diff --git a/js/app/packages/channel/Call/CallOverlay.tsx b/js/app/packages/channel/Call/CallOverlay.tsx
index 0dbe659d19..ae5850a6e3 100644
--- a/js/app/packages/channel/Call/CallOverlay.tsx
+++ b/js/app/packages/channel/Call/CallOverlay.tsx
@@ -1,6 +1,7 @@
import { useSplitPanel } from '@app/component/split-layout/layoutUtils';
import { UserIcon } from '@core/component/UserIcon';
import { useAuthor, useUserId } from '@core/context/user';
+import { useProfilePictureUrl } from '@core/signal/profilePicture';
import { tryMacroId, useDisplayName } from '@core/user';
import { cn, InlineCheckbox, Tooltip } from '@ui';
import { type RemoteParticipant, Track } from 'livekit-client';
@@ -52,7 +53,7 @@ function ParticipantTileWrapper(props: {
);
}
-function LocalParticipantAvatar(props: {
+function ParticipantAvatar(props: {
userId: string | undefined;
fallbackName: string | undefined;
avatarSize?: 'sm' | 'md';
@@ -118,7 +119,7 @@ function LocalParticipantTile(props: {
<Show
when={!props.isConnecting && !props.isVideoMuted}
fallback={
- <LocalParticipantAvatar
+ <ParticipantAvatar
userId={props.userId}
fallbackName={props.fallbackName}
avatarSize={props.avatarSize}
@@ -141,6 +142,7 @@ function ParticipantTile(props: { participant: RemoteParticipant }) {
const callCtx = useCallContext();
const macroId = () => tryMacroId(props.participant.identity);
const [displayName] = useDisplayName(macroId());
+ const [profilePicUrl] = useProfilePictureUrl(macroId());
const cameraTrack = () => {
callCtx.trackVersion();
@@ -155,11 +157,21 @@ function ParticipantTile(props: { participant: RemoteParticipant }) {
<Show
when={cameraTrack()}
fallback={
- <div class="flex items-center justify-center size-full p-4">
- <div class="size-12 rounded-full bg-hover flex items-center justify-center text-ink-muted text-lg font-medium">
- {displayName().charAt(0).toUpperCase()}
- </div>
- </div>
+ <Show
+ when={profilePicUrl()}
+ fallback={
+ <div class="flex items-center justify-center size-full p-4">
+ <div class="size-12 rounded-full bg-hover flex items-center justify-center text-ink-muted text-lg font-medium">
+ {displayName().charAt(0).toUpperCase()}
+ </div>
+ </div>
+ }
+ >
+ <ParticipantAvatar
+ userId={macroId()}
+ fallbackName={displayName()}
+ />
+ </Show>
}
>
<TrackView track={cameraTrack()} />
diff --git a/js/bun.lock b/js/bun.lock
index 7810b68cf6..9c885f68ee 100644
--- a/js/bun.lock
+++ b/js/bun.lock
@@ -842,7 +842,7 @@
"@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],
- "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#26537c8", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-26537c8"],
+ "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#26537c8", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-26537c8", "sha512-6p5xQAkS6Uw6J8Uh0vlj6MjKZXWps5E1Gu0hciBFq1E2BfPBZAgdeeafKnR3diNb4SXWK0JML49nAr+o5PhwKw=="],
"@inquirer/external-editor": ["@inquirer/[email protected]", "", { "dependencies": { "chardet": "^2.1.1", "iconv-lite": "^0.7.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA=="],
@@ -2570,7 +2570,7 @@
"pathval": ["[email protected]", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="],
- "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6"],
+ "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6", "sha512-HDFaPbCxLG2GHpf1smUG97nku5aPGBGaCcIbK05dGdp07TBLUlDcXsM4WcE82mO5W4RBPIBVYobX5N/6M6NFrA=="],
"performance-now": ["[email protected]", "", {}, "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="],