From a1e13267cb0254f714e13f0be4acdb1c474651a2 Mon Sep 17 00:00:00 2001 From: talksik Date: Sat, 7 May 2022 15:25:06 -0500 Subject: [PATCH] ungrayscale if connected --- packages/api/routes/line.ts | 2 +- .../desktop/src/components/lines/lineIcon/index.tsx | 10 ++++++++-- .../desktop/src/components/lines/lineRow.tsx/index.tsx | 7 +++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/api/routes/line.ts b/packages/api/routes/line.ts index d50d99c..32f9944 100644 --- a/packages/api/routes/line.ts +++ b/packages/api/routes/line.ts @@ -74,7 +74,7 @@ async function createLine(req: Request, res: Response) { const newLine = new Line( new ObjectId(userInfo.userId), - reqObj.lineName, + reqObj.lineName ?? undefined, new Date(), new Date(), new ObjectId() diff --git a/packages/desktop/src/components/lines/lineIcon/index.tsx b/packages/desktop/src/components/lines/lineIcon/index.tsx index 4000942..a6d194d 100644 --- a/packages/desktop/src/components/lines/lineIcon/index.tsx +++ b/packages/desktop/src/components/lines/lineIcon/index.tsx @@ -1,6 +1,12 @@ import { Avatar } from "antd"; -export default function LineIcon({ sourceImages }: { sourceImages: string[] }) { +export default function LineIcon({ + sourceImages, + grayscale = true, +}: { + sourceImages: string[]; + grayscale: boolean; +}) { return ( ))} diff --git a/packages/desktop/src/components/lines/lineRow.tsx/index.tsx b/packages/desktop/src/components/lines/lineRow.tsx/index.tsx index 62d09d6..a3b3f6c 100644 --- a/packages/desktop/src/components/lines/lineRow.tsx/index.tsx +++ b/packages/desktop/src/components/lines/lineRow.tsx/index.tsx @@ -142,7 +142,9 @@ export default function LineRow({ {renderActivityIcon} - {profilePictures && } + {profilePictures && ( + + )}

- {masterLineData.lineDetails.name} + {masterLineData.lineDetails.name || + masterLineData.otherUserObjects[0].givenName}