Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/src/components/MindMapHeader/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export default function Profile() {
const { open: profileModal, openModal: openProfileModal, closeModal: closeProfileModal } = useModal();
const isAuthenticated = useConnectionStore((state) => state.token);

function handleProfileModal() {
function handleProfileModal(e) {
e.stopPropagation();
if (isAuthenticated) {
openProfileModal();
profileModal ? closeProfileModal() : openProfileModal();
return;
}
openLoginModal();
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/MindMapHeader/ProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export default function ProfileModal({ open, close }: ProfileModalProps) {
};

if (open) {
document.addEventListener("mousedown", handleClickOutside);
document.addEventListener("click", handleClickOutside);
}

return () => {
document.removeEventListener("mousedown", handleClickOutside);
document.removeEventListener("click", handleClickOutside);
};
}, [open, close]);

Expand Down
2 changes: 1 addition & 1 deletion client/src/constants/color.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const colors = ["skyblue", "lightgreen", "lightcoral", "purple", "lemonchiffon"];
export const colors = ["#0053B5", "#64B5F6", "#6B95BC", "#E6F4F1", "#FCFCD4"];
7 changes: 3 additions & 4 deletions client/src/konva_mindmap/components/MindMapNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function MindMapNode({ data, parentNode, node, depth, parentRef,
selectNode({ nodeId: node.id, parentNodeId: parentNode ? parentNode.id : null });
}

const NodeStroke = selectedGroup.includes(node.id.toString()) ? "red" : "";
const NodeStroke = selectedGroup.includes(node.id.toString()) ? "#cb575f" : "";

const handleDragMove = (e: Konva.KonvaEventObject<DragEvent>) => {
e.evt.preventDefault();
Expand Down Expand Up @@ -114,12 +114,11 @@ export default function MindMapNode({ data, parentNode, node, depth, parentRef,
>
<Circle
stroke={NodeStroke}
fill={selectedNode?.nodeId === node.id ? "orange" : colors[depth - 1]}
fill={selectedNode?.nodeId === node.id ? "#EE92BA" : colors[depth - 1]}
width={NODE_WIDTH_AND_HEIGHT}
height={NODE_WIDTH_AND_HEIGHT}
strokeWidth={3}
strokeWidth={5}
radius={NODE_RADIUS(depth)}
shadowBlur={5}
/>
<EditableText
id={node.id}
Expand Down