perf: improve prompt list performance

This commit is contained in:
Yidadaa
2023-05-02 02:26:43 +08:00
parent a69cec89fb
commit e509749421
12 changed files with 240 additions and 80 deletions

View File

@@ -7,6 +7,20 @@
cursor: pointer;
}
.edit-prompt-modal {
display: flex;
flex-direction: column;
.edit-prompt-title {
max-width: unset;
margin-bottom: 20px;
text-align: left;
}
.edit-prompt-content {
max-width: unset;
}
}
.user-prompt-modal {
min-height: 40vh;
@@ -18,47 +32,42 @@
}
.user-prompt-list {
padding: 10px 0;
border: var(--border-in-light);
border-radius: 10px;
.user-prompt-item {
margin-bottom: 10px;
widows: 100%;
display: flex;
justify-content: space-between;
padding: 10px;
&:not(:last-child) {
border-bottom: var(--border-in-light);
}
.user-prompt-header {
display: flex;
widows: 100%;
margin-bottom: 5px;
max-width: calc(100% - 100px);
.user-prompt-title {
flex-grow: 1;
max-width: 100%;
margin-right: 5px;
padding: 5px;
font-size: 12px;
text-align: left;
font-size: 14px;
line-height: 2;
font-weight: bold;
}
.user-prompt-buttons {
display: flex;
align-items: center;
.user-prompt-button {
height: 100%;
&:not(:last-child) {
margin-right: 5px;
}
}
.user-prompt-content {
font-size: 12px;
}
}
.user-prompt-content {
width: 100%;
box-sizing: border-box;
padding: 5px;
margin-right: 10px;
font-size: 12px;
flex-grow: 1;
.user-prompt-buttons {
display: flex;
align-items: center;
.user-prompt-button {
height: 100%;
&:not(:last-child) {
margin-right: 5px;
}
}
}
}
}