Skip to content

Commit 0f89b5a

Browse files
committed
fix responsiveness detail page
1 parent feb158c commit 0f89b5a

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ const EnvironmentDetail: React.FC = () => {
109109
);
110110
}
111111
return (
112-
<div className="environment-detail-container" style={{ padding: "24px", flex: 1 }}>
113-
114-
<Breadcrumb style={{ marginBottom: "16px" }}>
112+
<div
113+
className="environment-detail-container"
114+
style={{ padding: "24px", flex: 1 }}
115+
>
116+
<Breadcrumb style={{ marginBottom: "16px" }}>
115117
<Breadcrumb.Item>
116-
<span
118+
<span
117119
style={{ cursor: "pointer" }}
118120
onClick={() => history.push("/setting/environments")}
119121
>
@@ -122,7 +124,6 @@ const EnvironmentDetail: React.FC = () => {
122124
</Breadcrumb.Item>
123125
<Breadcrumb.Item>{environment.environmentName}</Breadcrumb.Item>
124126
</Breadcrumb>
125-
126127

127128
{/* Header with environment name and controls */}
128129
<div
@@ -131,33 +132,35 @@ const EnvironmentDetail: React.FC = () => {
131132
marginBottom: "24px",
132133
display: "flex",
133134
justifyContent: "space-between",
134-
alignItems: "center",
135+
alignItems: "flex-start", // Changed from center to allow wrapping
136+
flexWrap: "wrap", // Allow wrapping on small screens
137+
gap: "16px", // Add spacing between wrapped elements
135138
}}
136139
>
137-
<div>
138-
<Title level={3}>
140+
<div style={{ flex: "1 1 auto", minWidth: "200px" }}>
141+
<Title level={3} style={{ margin: 0, wordBreak: "break-word" }}>
139142
{environment.environmentName || "Unnamed Environment"}
140143
</Title>
141144
<Text type="secondary">ID: {environment.environmentId}</Text>
142145
</div>
143-
<Dropdown overlay={actionsMenu} trigger={['click']}>
144-
<Button
145-
icon={<MoreOutlined />}
146-
shape="circle"
147-
size="large"
148-
/>
149-
</Dropdown>
146+
<div style={{ flexShrink: 0 }}>
147+
<Dropdown overlay={actionsMenu} trigger={["click"]}>
148+
<Button icon={<MoreOutlined />} shape="circle" size="large" />
149+
</Dropdown>
150+
</div>
150151
</div>
151152

152-
{/* Basic Environment Information Card */}
153+
{/* Basic Environment Information Card - improved responsiveness */}
153154
<Card
154155
title="Environment Overview"
155156
style={{ marginBottom: "24px" }}
156157
extra={environment.isMaster && <Tag color="green">Master</Tag>}
157158
>
158159
<Descriptions
159160
bordered
161+
layout="vertical" // Change to vertical layout on smaller screens
160162
column={{ xxl: 4, xl: 3, lg: 3, md: 2, sm: 1, xs: 1 }}
163+
size="small" // Use smaller size on mobile
161164
>
162165
<Descriptions.Item label="Domain">
163166
{environment.environmentFrontendUrl ? (
@@ -200,7 +203,7 @@ const EnvironmentDetail: React.FC = () => {
200203

201204
{/* Tabs for Workspaces and User Groups */}
202205
<Tabs defaultActiveKey="workspaces">
203-
<TabPane tab="Workspaces" key="workspaces">
206+
<TabPane tab="Workspaces" key="workspaces">
204207
{/* Using our new generic component with the workspace config */}
205208
<DeployableItemsTab
206209
environment={environment}
@@ -215,14 +218,13 @@ const EnvironmentDetail: React.FC = () => {
215218
</span>
216219
}
217220
key="userGroups"
218-
>
221+
>
219222
{/* Using our new generic component with the user group config */}
220223
<DeployableItemsTab
221224
environment={environment}
222225
config={userGroupsConfig}
223226
title="User Groups in this Environment"
224227
/>
225-
226228
</TabPane>
227229
</Tabs>
228230
{/* Edit Environment Modal */}
@@ -235,7 +237,6 @@ const EnvironmentDetail: React.FC = () => {
235237
loading={isUpdating}
236238
/>
237239
)}
238-
239240
</div>
240241
);
241242
};

0 commit comments

Comments
 (0)