Skip to content

Commit 576841c

Browse files
authored
fix: bug report add scroll if the screen to small (#1089)
1 parent f40b864 commit 576841c

File tree

2 files changed

+52
-29
lines changed

2 files changed

+52
-29
lines changed

src/pages/BugReportForm .tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ const BugReportForm = () => {
173173
</Upload>
174174
</Form.Item>
175175

176-
<Form.Item wrapperCol={{ offset: 4, span: 16 }}>
176+
<Form.Item>
177177
<Button type="primary" htmlType="submit">
178-
{t('bug_submit')}{' '}
178+
{t('bug_submit')}
179179
</Button>
180180
</Form.Item>
181181
</Form>

src/pages/BugReportForm.scss

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
// BugReportForm.scss
1+
main:has(> div > .bug-report-form-container) {
2+
display: flex;
3+
justify-content: center;
4+
align-items: center;
5+
margin: 0 !important;
6+
padding: 24px;
7+
8+
> div {
9+
display: contents;
10+
}
11+
}
212

313
.bug-report-form-container {
414
max-width: 800px;
515
width: 100%;
6-
margin: 0 auto;
7-
padding: 30px;
816
border-radius: 8px;
917
box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
10-
18+
padding: 24px;
19+
max-height: 100%;
20+
display: flex;
21+
flex-direction: column;
22+
23+
.MuiCardContent-root {
24+
display: contents;
25+
}
26+
27+
form {
28+
overflow-y: auto !important;
29+
}
30+
1131
@media (width <= 600px) {
1232
padding: 15px;
1333

@@ -18,14 +38,8 @@
1838
border-bottom: 6px solid gray;
1939
}
2040

21-
.ant-form-item-label {
22-
text-align: left;
23-
}
24-
2541
.ant-btn-primary {
26-
max-width: calc(100% - 100px);
27-
margin: 0 auto;
28-
display: block;
42+
width: 100%;
2943
}
3044
}
3145

@@ -38,16 +52,28 @@
3852
border-bottom: 8px solid gray;
3953
padding-bottom: 0;
4054
line-height: 25px;
41-
text-align: center;
55+
text-align: center;
4256
display: flex;
4357
}
4458

4559
.ant-form-item {
4660
margin-bottom: 20px;
61+
width: 100%;
62+
63+
&:last-child {
64+
margin-bottom: 0;
65+
text-align: end;
66+
67+
& > div > div {
68+
max-width: 100%;
69+
}
70+
}
4771

4872
&-label {
73+
text-align: start;
4974
font-weight: bold;
50-
text-align: right;
75+
white-space: warp;
76+
text-wrap: pretty;
5177
}
5278
}
5379

@@ -60,22 +86,19 @@
6086
width: 100%;
6187
}
6288

63-
.ant-btn {
64-
margin-right: 8px;
89+
.ant-btn-primary {
90+
background-color: #1890ff;
91+
border-color: #1890ff;
92+
display: inline-block;
93+
font-weight: 500;
6594

66-
&-primary {
67-
background-color: #1890ff;
68-
border-color: #1890ff;
69-
width: 100%;
70-
71-
&:hover {
72-
background-color: #40a9ff;
73-
border-color: #40a9ff;
74-
}
95+
&:hover {
96+
background-color: #40a9ff;
97+
border-color: #40a9ff;
98+
}
7599

76-
&:focus {
77-
box-shadow: 0 0 0 2px rgb(24 144 255 / 20%);
78-
}
100+
&:focus {
101+
box-shadow: 0 0 0 2px rgb(24 144 255 / 20%);
79102
}
80103
}
81104
}

0 commit comments

Comments
 (0)