+
diff --git a/app/src/components/ui/collaboration/function/textAreaHeightAdjust.ts b/app/src/components/ui/collaboration/function/textAreaHeightAdjust.ts
new file mode 100644
index 0000000..63640d1
--- /dev/null
+++ b/app/src/components/ui/collaboration/function/textAreaHeightAdjust.ts
@@ -0,0 +1,17 @@
+export const adjustHeight = (textareaRef: HTMLTextAreaElement) => {
+ const el = textareaRef;
+ if (el) {
+ el.style.height = "auto";
+ el.style.height = "38px";
+
+ // Clamp to max height for 6 lines
+ const lineHeight = 18; // px, adjust if needed
+ const maxHeight = lineHeight * 6;
+ if (el.scrollHeight > maxHeight) {
+ el.style.overflowY = "auto";
+ el.style.height = `${maxHeight}px`;
+ } else {
+ el.style.overflowY = "hidden";
+ }
+ }
+};
\ No newline at end of file
diff --git a/app/src/modules/scene/setup/setup.tsx b/app/src/modules/scene/setup/setup.tsx
index f3f8d15..184bc56 100644
--- a/app/src/modules/scene/setup/setup.tsx
+++ b/app/src/modules/scene/setup/setup.tsx
@@ -5,7 +5,6 @@ import Controls from '../controls/controls';
import { Environment } from '@react-three/drei'
import background from "../../../assets/textures/hdr/mudroadpuresky2k.hdr";
-import { MovingClouds } from '../clouds/clouds';
function Setup() {
return (
@@ -18,7 +17,7 @@ function Setup() {
-
+ {/*
*/}
>
diff --git a/app/src/modules/visualization/widgets/3d/cards/ProductionCapacity.tsx b/app/src/modules/visualization/widgets/3d/cards/ProductionCapacity.tsx
index 8e3d817..a0df039 100644
--- a/app/src/modules/visualization/widgets/3d/cards/ProductionCapacity.tsx
+++ b/app/src/modules/visualization/widgets/3d/cards/ProductionCapacity.tsx
@@ -31,6 +31,7 @@ interface ProductionCapacityProps {
type: string;
position: [number, number, number];
rotation: [number, number, number];
+ scale?: [number, number, number];
Data?: any;
onContextMenu?: (event: React.MouseEvent) => void;
// onPointerDown:any
@@ -41,7 +42,8 @@ const ProductionCapacity: React.FC
= ({
type,
Data,
position,
- rotation,
+ rotation = [0, 0, 0],
+ scale = [0.5, 0.5, 0.5],
onContextMenu,
}) => {
const { selectedChartId, setSelectedChartId } = useWidgetStore();
@@ -198,74 +200,75 @@ const ProductionCapacity: React.FC = ({
useEffect(() => {}, [rotation]);
return (
- {
- e.preventDefault();
- e.stopPropagation();
- }}
- onDrop={(e) => {
- e.preventDefault();
- }}
- >
- setSelectedChartId({ id: id, type: type })}
- onContextMenu={onContextMenu}
- style={{
- width: "300px", // Original width
- height: "300px", // Original height
- // transform: transformStyle.transform,
- transformStyle: "preserve-3d",
- position: "absolute",
- transform: "translate(-50%, -50%)",
+ <>
+ {position && scale && rotation && {
+ e.preventDefault();
+ e.stopPropagation();
+ }}
+ onDrop={(e) => {
+ e.preventDefault();
}}
>
-
-
Production Capacity
-
-
1,200
{" "}
-
units/hour
-
-
-
-
Current
-
1500
+
setSelectedChartId({ id: id, type: type })}
+ onContextMenu={onContextMenu}
+ style={{
+ width: "300px", // Original width
+ height: "300px", // Original height
+ // transform: transformStyle.transform,
+ transformStyle: "preserve-3d",
+ position: "absolute",
+ transform: "translate(-50%, -50%)",
+ }}
+ >
+
+
Production Capacity
+
+
1,200
{" "}
+
units/hour
-
-
Target
-
2.345
+
- {/*
units/hour
*/}
+
{" "}
+
+ {/* Bar Chart */}
+ 0
+ ? chartData
+ : defaultChartData
+ }
+ options={chartOptions}
+ />
-
{" "}
-
- {/* Bar Chart */}
- 0
- ? chartData
- : defaultChartData
- }
- options={chartOptions}
- />
-
-
+ }
+ >
);
};
diff --git a/app/src/pages/Project.tsx b/app/src/pages/Project.tsx
index a5f1c73..7369842 100644
--- a/app/src/pages/Project.tsx
+++ b/app/src/pages/Project.tsx
@@ -185,7 +185,6 @@ const Project: React.FC = () => {
>
)}
- {/*
*/}
);
};
diff --git a/app/src/styles/components/input.scss b/app/src/styles/components/input.scss
index 749094a..9ce31a7 100644
--- a/app/src/styles/components/input.scss
+++ b/app/src/styles/components/input.scss
@@ -3,7 +3,8 @@
// global input style
-input {
+input,
+textarea {
width: 100%;
padding: 4px 8px;
border-radius: #{$border-radius-large};
diff --git a/app/src/styles/scene/comments.scss b/app/src/styles/scene/comments.scss
index b5150d1..02e001d 100644
--- a/app/src/styles/scene/comments.scss
+++ b/app/src/styles/scene/comments.scss
@@ -93,66 +93,216 @@
}
}
-.thread-char-wrapper {
+.thread-chat-wrapper {
position: absolute;
// remove later
top: 50%;
left: 50%;
- transform: translate(-50%, -50%);
// ----
- z-index: 10000;
- .thread-char-container {
+ z-index: #{$z-index-ui-highest};
+ .thread-chat-container {
+ background: var(--background-color);
+ backdrop-filter: blur(14px);
+ border-radius: #{$border-radius-extra-large};
+ width: 20rem;
.header-wrapper {
- .header {
- }
+ padding: 12px;
+ @include flex-space-between;
.header-options {
- .options-button {
- }
+ @include flex-center;
+ position: relative;
.options-list {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ transform: translate(-24px, 100%);
+ background: var(--background-color);
+ padding: 8px 4px;
+ border-radius: #{$border-radius-medium};
+ backdrop-filter: blur(10px);
+ z-index: 100;
.options {
+ text-wrap: nowrap;
+ padding: 2px 4px;
+ border-radius: #{$border-radius-medium};
+ cursor: pointer;
+ &:hover {
+ color: var(--text-button-color);
+ background: var(--background-color-accent);
+ }
+ &.delete {
+ &:hover {
+ color: var(--log-error-text-color);
+ background: var(--log-error-background-color);
+ }
+ }
+ }
+ }
+ .options-button,
+ .close-button {
+ @include flex-center;
+ height: 24px;
+ width: 24px;
+ border-radius: #{$border-radius-medium};
+ &:hover {
+ background: var(--background-color-solid);
}
}
.close-button {
+ svg {
+ scale: 1.4;
+ }
}
}
}
.messages-wrapper {
+ padding: 12px;
+ padding-top: 0;
.edit-container {
.input-container {
+ textarea{
+ background: var(--background-color);
+ &:focus{
+ outline-color: var(--border-color-accent);
+ }
+ }
}
.actions-container {
+ @include flex-space-between;
+ width: 100%;
+ margin: 8px 0;
.actions {
- .cancel-button {
+ @include flex-center;
+ gap: 4px;
+ .cancel-button,
+ .save-button {
+ padding: 4px 10px;
+ border-radius: #{$border-radius-large};
+ background: var(--background-color-solid);
+ outline: 1px solid var(--border-color);
}
.save-button {
+ color: var(--text-button-color);
+ background: var(--background-color-accent);
+ outline: none;
}
}
}
}
.message-container {
+ position: relative;
+ @include flex-space-between;
+ align-items: flex-start;
+ gap: 12px;
+ margin-top: 8px;
+ &:first-child{
+ margin: 0;
+ }
.profile {
+ height: 28px;
+ width: 28px;
+ min-width: 28px;
+ text-transform: uppercase;
+ line-height: 28px;
+ text-align: center;
+ border-radius: #{$border-radius-circle};
}
.content {
+ width: 100%;
.user-details {
+ display: flex;
+ align-items: flex-end;
+ gap: 8px;
.user-name {
+ text-transform: capitalize;
}
.time {
+ font-size: var(--font-size-tiny);
+ color: var(--input-text-color);
}
}
}
.more-options {
+ position: absolute;
+ right: 0;
+ top: 0;
.more-options-button {
- }
- .options-list {
- .option {
+ @include flex-center;
+ height: 18px;
+ width: 18px;
+ border-radius: #{$border-radius-small};
+ &:hover{
+ background: var(--background-color-solid);
}
}
+ .options-list {
+ position: absolute;
+ right: 0;
+ padding: 3px 6px;
+ background: var(--background-color);
+ backdrop-filter: blur(10px);
+ outline: 1px solid var(--border-color);
+ border-radius: #{$border-radius-medium};
+ z-index: 100;
+ .option {
+ width: 100%;
+ border-radius: #{$border-radius-medium};
+ padding: 2px 6px;
+ text-align: start;
+ &:hover{
+ background: var(--background-color-accent);
+ color: var(--text-button-color);
+ }
+ }
+ }
+ }
+ .message{
+ margin-top: 6px;
}
}
}
.send-message-wrapper {
+ padding: 12px;
+ padding-top: 8px;
.input-container {
+ position: relative;
+ @include flex-space-between;
+ background: var(--background-color);
+ border-radius: #{$border-radius-extra-large};
+ outline: 1px solid var(--border-color);
+ textarea {
+ background: transparent;
+ outline: none;
+ width: calc(100% - 36px);
+ overflow: hidden;
+ line-height: 28px;
+ max-height: 108px;
+ }
.sent-button {
+ position: absolute;
+ right: 2px;
+ bottom: 2px;
+ @include flex-center;
+ padding: 2px;
+ svg {
+ rotate: 45deg;
+ }
+ }
+ .disable-send-btn {
+ filter: saturate(0);
+ }
+ &.active {
+ background: var(--background-color-solid);
+ padding-top: 4px;
+ flex-direction: column;
+ align-items: end;
+ textarea {
+ width: 100%;
+ line-height: 18px;
+ }
+ .sent-button {
+ position: relative;
+ }
}
}
}