Skip to content

Commit 3ba430e

Browse files
committed
feat: improve the input area
1 parent 0a02442 commit 3ba430e

File tree

2 files changed

+47
-32
lines changed

2 files changed

+47
-32
lines changed

src/pages/acp/acp.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,14 @@ export default function AcpPageInclude() {
251251
{$emptyState}
252252
{$messages}
253253
<div className="acp-input-area">
254-
<div className="acp-input-wrapper">
255-
{$attachBtn}
254+
<div className="acp-input-container">
256255
{$textarea}
257-
{$sendBtn}
258-
{$cancelBtn}
256+
<div className="acp-input-toolbar">
257+
{$attachBtn}
258+
<div className="acp-toolbar-spacer"></div>
259+
{$sendBtn}
260+
{$cancelBtn}
261+
</div>
259262
</div>
260263
</div>
261264
</div>

src/pages/acp/acp.scss

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -322,19 +322,18 @@
322322
);
323323
border-top: 1px solid var(--border-color);
324324

325-
.acp-input-wrapper {
325+
.acp-input-container {
326326
display: flex;
327-
align-items: flex-end;
328-
gap: 6px;
327+
flex-direction: column;
328+
border-radius: 14px;
329329
border: 1.5px solid
330-
color-mix(in srgb, var(--border-color), transparent 30%);
331-
border-radius: 16px;
330+
color-mix(in srgb, var(--border-color), transparent 20%);
332331
background: color-mix(
333332
in srgb,
334333
var(--popup-background-color),
335334
var(--secondary-color) 40%
336335
);
337-
padding: 4px 4px 4px 12px;
336+
overflow: hidden;
338337
transition:
339338
border-color 0.2s,
340339
box-shadow 0.2s;
@@ -351,69 +350,82 @@
351350
}
352351

353352
textarea {
354-
flex: 1;
353+
width: 100%;
355354
min-height: 40px;
356355
max-height: 128px;
357356
resize: none;
358357
border: none;
359358
background: transparent;
360359
color: var(--popup-text-color);
361-
padding: 10px 0;
360+
padding: 14px 16px 8px;
362361
font-size: 0.88rem;
363362
font-family: inherit;
364-
line-height: 1.4;
363+
line-height: 1.5;
365364
outline: none;
365+
box-sizing: border-box;
366+
}
367+
368+
.acp-input-toolbar {
369+
display: flex;
370+
align-items: center;
371+
gap: 2px;
372+
padding: 4px 8px 8px;
373+
}
374+
375+
.acp-toolbar-spacer {
376+
flex: 1;
366377
}
367378

368379
.acp-attach-btn {
369-
width: 32px;
370-
height: 32px;
380+
width: 34px;
381+
height: 34px;
371382
border-radius: 8px;
372383
border: none;
373-
background: none;
384+
background: transparent;
374385
color: var(--secondary-text-color);
375-
opacity: 0.35;
386+
opacity: 0.4;
376387
font-size: 1.1rem;
377388
cursor: pointer;
378389
display: flex;
379390
align-items: center;
380391
justify-content: center;
381392
flex-shrink: 0;
382-
margin-bottom: 4px;
383-
transition: opacity 0.15s;
393+
transition:
394+
opacity 0.15s,
395+
background 0.15s;
384396

385397
&:active {
386398
opacity: 0.7;
399+
background: color-mix(
400+
in srgb,
401+
var(--secondary-text-color),
402+
transparent 88%
403+
);
387404
}
388405
}
389406

390407
.acp-send-btn,
391408
.acp-cancel-btn {
392-
width: 36px;
393-
height: 36px;
394-
border-radius: 10px;
409+
width: 34px;
410+
height: 34px;
411+
border-radius: 8px;
395412
border: none;
396-
font-size: 0.88rem;
413+
font-size: 1rem;
397414
cursor: pointer;
398415
display: flex;
399416
align-items: center;
400417
justify-content: center;
401418
transition: all 0.15s;
402419
flex-shrink: 0;
403-
margin-bottom: 2px;
404420
}
405421

406422
.acp-send-btn {
407-
background: color-mix(
408-
in srgb,
409-
var(--secondary-text-color),
410-
transparent 20%
411-
);
412-
color: var(--secondary-color);
423+
background: transparent;
424+
color: var(--secondary-text-color);
425+
opacity: 0.4;
413426

414427
&:active {
415-
transform: scale(0.92);
416-
opacity: 0.85;
428+
opacity: 0.8;
417429
}
418430

419431
&:disabled {

0 commit comments

Comments
 (0)