feat: unify workspace dialogs

This commit is contained in:
lingniu
2026-07-19 08:32:48 +08:00
parent 49ae75937e
commit c3881bf25c
7 changed files with 619 additions and 31 deletions

View File

@@ -22266,3 +22266,354 @@
padding: 10px;
}
}
/*
* Shared Semi UI dialog language.
* High-impact forms and confirmations now use one title, content, impact
* summary and footer hierarchy on desktop and mobile.
*/
.v2-workspace-dialog .semi-modal {
width: min(480px, calc(100vw - 32px)) !important;
max-width: calc(100vw - 32px);
}
.v2-workspace-dialog .semi-modal-content {
overflow: hidden;
border: 1px solid #d9e3ef;
border-radius: 17px;
background: #fff;
box-shadow: 0 28px 88px rgba(19, 37, 61, .22);
}
.v2-workspace-dialog .semi-modal-header {
min-height: 78px;
border-bottom: 1px solid #e5ebf2;
background:
radial-gradient(circle at 0 0, rgba(18, 104, 243, .07), transparent 44%),
linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
padding: 15px 19px;
}
.v2-workspace-dialog .semi-modal-title {
width: 100%;
min-width: 0;
}
.v2-workspace-dialog-title {
display: grid;
min-width: 0;
grid-template-columns: 40px minmax(0, 1fr) auto 34px;
align-items: center;
gap: 11px;
}
.v2-workspace-dialog-title-icon {
display: grid;
width: 40px;
height: 40px;
place-items: center;
border: 1px solid #d7e5f8;
border-radius: 12px;
background: #edf5ff;
color: #1268f3;
font-size: 18px;
}
.v2-workspace-confirm-dialog .v2-workspace-dialog-title-icon {
border-color: #f4ddbd;
background: #fff7e8;
color: #dc7b12;
}
.v2-workspace-dialog-title > span:nth-child(2) {
display: grid;
min-width: 0;
gap: 3px;
}
.v2-workspace-dialog-title strong {
overflow: hidden;
color: #263b53;
font-size: 17px;
font-weight: 740;
letter-spacing: -.02em;
line-height: 1.2;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-workspace-dialog-title small {
overflow: hidden;
color: #7d8da1;
font-size: 10px;
font-weight: 520;
line-height: 1.35;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-workspace-dialog-title > .semi-tag {
height: 25px;
border-radius: 999px;
padding-inline: 9px;
font-size: 9px;
font-weight: 720;
}
.v2-workspace-dialog-close.semi-button {
width: 34px;
min-width: 34px;
height: 34px;
border-radius: 10px;
color: #72839a;
padding: 0;
}
.v2-workspace-dialog-close.semi-button:hover {
background: #edf3fb;
color: #23415f;
}
.v2-workspace-dialog .semi-modal-body {
padding: 0;
}
.v2-workspace-dialog-content {
padding: 16px 18px 18px;
}
.v2-workspace-dialog .semi-modal-footer {
margin: 0;
border-top: 1px solid #e5ebf2;
background: rgba(251, 252, 254, .96);
padding: 11px 14px;
}
.v2-workspace-dialog-footer {
display: flex;
min-width: 0;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.v2-workspace-dialog-footer-note {
display: flex;
min-width: 0;
align-items: center;
gap: 6px;
overflow: hidden;
color: #75869b;
font-size: 9px;
line-height: 1.4;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-workspace-dialog-footer-note > svg {
flex: 0 0 auto;
color: #d78624;
}
.v2-workspace-dialog-footer-actions {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 8px;
}
.v2-workspace-dialog-footer-actions > .semi-button {
min-height: 38px;
justify-content: center;
border-radius: 9px;
padding-inline: 16px;
font-size: 11px;
font-weight: 700;
}
.v2-workspace-confirm-copy {
margin: 0 0 13px;
color: #53677f;
font-size: 12px;
line-height: 1.65;
}
.v2-workspace-dialog-summary {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
overflow: hidden;
border: 1px solid #dfe7f0;
border-radius: 12px;
background: #f8fafc;
}
.v2-workspace-dialog-summary > span {
display: grid;
min-width: 0;
min-height: 86px;
align-content: center;
gap: 4px;
padding: 12px;
}
.v2-workspace-dialog-summary > span + span {
border-left: 1px solid #dfe7f0;
}
.v2-workspace-dialog-summary small {
color: #8795a7;
font-size: 8px;
font-weight: 650;
}
.v2-workspace-dialog-summary strong {
overflow: hidden;
color: #2d425a;
font-size: 14px;
font-weight: 740;
line-height: 1.2;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-workspace-dialog-summary em {
overflow: hidden;
color: #7b8b9f;
font-size: 8px;
font-style: normal;
line-height: 1.35;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-workspace-dialog-summary > .is-primary strong {
color: #1268f3;
}
.v2-workspace-dialog-summary > .is-success strong {
color: #16805b;
}
.v2-workspace-dialog-summary > .is-warning strong {
color: #b86c18;
}
.v2-workspace-dialog-summary > .is-danger strong {
color: #c33c32;
}
.v2-password-modal.v2-workspace-dialog .semi-modal {
width: min(500px, calc(100vw - 32px)) !important;
}
.v2-password-modal .v2-workspace-dialog-content {
padding: 16px 18px 18px;
}
.v2-password-modal .v2-password-dialog > label {
font-size: 12px;
}
.v2-password-modal .v2-password-dialog > label .semi-input-wrapper {
height: 44px;
}
@media (max-width: 680px) {
.v2-workspace-dialog .semi-modal {
width: calc(100vw - 16px) !important;
max-width: calc(100vw - 16px);
}
.v2-workspace-dialog .semi-modal-content {
max-height: calc(100dvh - 16px);
border-radius: 16px;
}
.v2-workspace-dialog .semi-modal-header {
min-height: 70px;
padding: 11px 12px;
}
.v2-workspace-dialog-title {
grid-template-columns: 36px minmax(0, 1fr) auto 34px;
gap: 9px;
}
.v2-workspace-dialog-title-icon {
width: 36px;
height: 36px;
border-radius: 11px;
font-size: 16px;
}
.v2-workspace-dialog-title strong {
font-size: 15px;
}
.v2-workspace-dialog-title small {
font-size: 9px;
}
.v2-workspace-dialog-title > .semi-tag {
display: none;
}
.v2-workspace-dialog-content {
max-height: calc(100dvh - 158px);
overflow-y: auto;
padding: 13px 12px 14px;
}
.v2-workspace-confirm-copy {
margin-bottom: 10px;
font-size: 11px;
}
.v2-workspace-dialog-summary > span {
min-height: 76px;
padding: 9px 8px;
}
.v2-workspace-dialog-summary strong {
font-size: 12px;
}
.v2-workspace-dialog-summary em {
white-space: normal;
}
.v2-workspace-dialog .semi-modal-footer {
padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
}
.v2-workspace-dialog-footer {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 7px;
}
.v2-workspace-dialog-footer-note {
min-height: 18px;
justify-content: center;
font-size: 8px;
}
.v2-workspace-dialog-footer-actions {
display: grid;
grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
gap: 8px;
}
.v2-workspace-dialog-footer-actions > .semi-button {
width: 100%;
min-height: 42px;
}
.v2-password-modal .v2-workspace-dialog-content {
padding: 12px;
}
.v2-password-modal .v2-password-dialog > label .semi-input-wrapper {
height: 46px;
}
}