feat: simplify page ai drawer ui

This commit is contained in:
lix-2026
2026-05-15 03:32:54 +08:00
parent 0fc9fa7551
commit 0e6cf5cf13
4 changed files with 308 additions and 115 deletions
+206 -47
View File
@@ -2654,10 +2654,10 @@ body {
height: 100%;
display: flex;
flex-direction: column;
gap: 14px;
padding: 16px;
gap: 12px;
padding: 14px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 18px;
border-radius: 14px;
background: rgba(255, 255, 255, 0.98);
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.14);
}
@@ -2668,19 +2668,28 @@ body {
gap: 4px;
}
.wolai-page-ai-statusbar {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(68px, auto) minmax(82px, auto) minmax(72px, auto) auto;
gap: 8px;
align-items: stretch;
.wolai-page-ai-header-actions {
display: inline-flex;
align-items: center;
gap: 4px;
}
.wolai-page-ai-statusitem {
min-width: 0;
padding: 8px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 8px;
background: #FAFAFA;
.wolai-page-ai-icon {
width: 28px;
height: 28px;
border: 0;
border-radius: 6px;
background: transparent;
color: #5A5A5A;
font-size: 16px;
line-height: 1;
cursor: pointer;
}
.wolai-page-ai-icon:hover,
.wolai-page-ai-icon.is-active {
background: #F3F3F2;
color: #1B1C1C;
}
.wolai-page-ai-statuslabel,
@@ -2695,6 +2704,27 @@ body {
line-height: 16px;
}
.wolai-page-ai-subtitle {
display: flex;
min-width: 0;
flex-wrap: wrap;
gap: 4px 8px;
}
.wolai-page-ai-subtitle span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wolai-page-ai-subtitle span:not(:first-child)::before,
.wolai-page-ai-chat-meta span:not(:first-child)::before {
margin-right: 8px;
color: #C9C5BE;
content: "·";
}
.wolai-page-ai-statusvalue {
display: block;
min-width: 0;
@@ -2726,7 +2756,7 @@ body {
cursor: not-allowed;
}
.wolai-page-ai-topbar {
.wolai-page-ai-settings-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 132px;
gap: 8px;
@@ -2769,13 +2799,7 @@ body {
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 16px;
}
.wolai-page-ai-tabs {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 6px;
gap: 10px;
}
.wolai-page-ai-panel-section {
@@ -2783,17 +2807,87 @@ body {
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 12px;
gap: 10px;
}
.wolai-page-ai-panel-section[hidden] {
display: none !important;
}
.wolai-page-ai-drawer:not([data-page-ai-page="chat"]) .wolai-page-ai-footer {
display: none;
}
.wolai-page-ai-chat-meta {
display: flex;
min-height: 24px;
align-items: center;
gap: 8px;
overflow: hidden;
color: #8B8782;
font-size: 11px;
line-height: 16px;
}
.wolai-page-ai-session-button {
min-width: 0;
max-width: 190px;
overflow: hidden;
padding: 0;
border: 0;
background: transparent;
color: #5A5A5A;
font: inherit;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.wolai-page-ai-session-button:hover {
color: #1B1C1C;
}
.wolai-page-ai-settings-head {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
gap: 8px;
align-items: center;
}
.wolai-page-ai-back {
height: 30px;
padding: 0 8px;
border: 0;
border-radius: 6px;
background: transparent;
color: #5A5A5A;
font-size: 12px;
cursor: pointer;
}
.wolai-page-ai-back:hover {
background: #F3F3F2;
color: #1B1C1C;
}
.wolai-page-ai-settings-tabs {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 4px;
padding: 2px;
border-radius: 8px;
background: #F3F3F2;
}
.wolai-page-ai-suggestions {
display: flex;
flex-direction: column;
gap: 10px;
gap: 8px;
}
.wolai-page-ai-suggestions[hidden] {
display: none !important;
}
.wolai-page-ai-suggestions-header,
@@ -2886,10 +2980,10 @@ body {
}
.wolai-page-ai-suggestion {
min-height: 32px;
padding: 8px 10px;
min-height: 30px;
padding: 6px 9px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 10px;
border-radius: 8px;
background: #FFF;
color: #1B1C1C;
font-size: 12px;
@@ -3057,7 +3151,18 @@ body {
.wolai-page-ai-footer {
display: flex;
flex-direction: column;
gap: 10px;
gap: 8px;
}
.wolai-page-ai-tab {
min-height: 28px;
padding: 0 8px;
border: 0;
border-radius: 6px;
background: transparent;
color: #5A5A5A;
font-size: 12px;
cursor: pointer;
}
.wolai-page-ai-tab.is-active {
@@ -3070,33 +3175,90 @@ body {
color: #FFF;
}
.wolai-page-ai-input-row {
.wolai-page-ai-composer {
display: flex;
gap: 8px;
align-items: flex-end;
flex-direction: column;
overflow: hidden;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 10px;
background: #FFF;
}
.wolai-page-ai-composer:focus-within {
border-color: rgba(27, 28, 28, 0.32);
}
.wolai-page-ai-composer-bar {
display: flex;
min-height: 36px;
align-items: center;
gap: 6px;
padding: 0 6px 6px;
}
.wolai-page-ai-composer-spacer {
flex: 1 1 auto;
}
.wolai-page-ai-tool-button {
width: 28px;
height: 28px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 6px;
background: #FFF;
color: #5A5A5A;
font-size: 14px;
cursor: pointer;
}
.wolai-page-ai-tool-button:hover {
border-color: rgba(27, 28, 28, 0.2);
color: #1B1C1C;
}
.wolai-page-ai-input {
flex: 1 1 auto;
min-height: 88px;
padding: 10px 12px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 12px;
background: #FFF;
width: 100%;
min-height: 76px;
padding: 10px 10px 4px;
border: 0;
background: transparent;
color: #1B1C1C;
font-size: 13px;
line-height: 20px;
resize: none;
}
.wolai-page-ai-send {
width: 36px;
height: 36px;
.wolai-page-ai-input:focus {
outline: none;
}
.wolai-page-ai-stop {
min-width: 42px;
height: 28px;
padding: 0 10px;
border: 0;
border-radius: 10px;
border-radius: 6px;
background: #F3F3F2;
color: #5A5A5A;
font-size: 12px;
cursor: pointer;
}
.wolai-page-ai-stop:disabled {
color: #B5B1AA;
cursor: not-allowed;
}
.wolai-page-ai-send {
min-width: 52px;
height: 28px;
padding: 0 12px;
border: 0;
border-radius: 6px;
background: #1B1C1C;
color: #FFF;
font-size: 16px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
@@ -3119,11 +3281,8 @@ body {
width: min(100vw - 24px, 420px);
}
.wolai-page-ai-statusbar {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wolai-page-ai-topbar {
.wolai-page-ai-settings-grid,
.wolai-page-ai-settings-head {
grid-template-columns: minmax(0, 1fr);
}